diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index f559f704d5..952beda19b 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -4,7 +4,7 @@ steps: provider: "gcp" env: TEST_SUITE: "{{ matrix.suite }}" - STACK_VERSION: 8.16.0-SNAPSHOT + STACK_VERSION: 8.17.0-SNAPSHOT WORKSPACE: /tmp/go-elasticsearch matrix: setup: diff --git a/Makefile b/Makefile index 283682fbcb..b723e6c079 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL := /bin/bash -ELASTICSEARCH_DEFAULT_BUILD_VERSION = "8.16.0-SNAPSHOT" +ELASTICSEARCH_DEFAULT_BUILD_VERSION = "8.17.0-SNAPSHOT" ##@ Test test-unit: ## Run unit tests diff --git a/_benchmarks/benchmarks/go.mod b/_benchmarks/benchmarks/go.mod index a4ad43ef05..d87265c368 100644 --- a/_benchmarks/benchmarks/go.mod +++ b/_benchmarks/benchmarks/go.mod @@ -1,14 +1,17 @@ module github.com/elastic/go-elasticsearch/v8/benchmarks -go 1.14 +go 1.22 + +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../../ require ( - github.com/elastic/elastic-transport-go/v8 v8.0.0-20211216131617-bbee439d559c + github.com/elastic/elastic-transport-go/v8 v8.6.0 github.com/elastic/go-elasticsearch/v8 v8.0.0-20200408073057-6f36a473b19f github.com/fatih/color v1.7.0 - github.com/mattn/go-colorable v0.1.6 // indirect github.com/montanaflynn/stats v0.6.3 github.com/tidwall/gjson v1.9.3 ) + +require github.com/mattn/go-colorable v0.1.6 // indirect diff --git a/_examples/bulk/benchmarks/go.mod b/_examples/bulk/benchmarks/go.mod index cc652cf6c6..a9c5e50e58 100644 --- a/_examples/bulk/benchmarks/go.mod +++ b/_examples/bulk/benchmarks/go.mod @@ -1,7 +1,7 @@ module github.com/elastic/go-elasticsearch/v8/_examples/bulk/benchmarks -go 1.21 -toolchain go1.21.0 +go 1.22 +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../../.. diff --git a/_examples/bulk/go.mod b/_examples/bulk/go.mod index c3237b2b8d..744c519aea 100644 --- a/_examples/bulk/go.mod +++ b/_examples/bulk/go.mod @@ -1,7 +1,8 @@ module github.com/elastic/go-elasticsearch/v8/_examples/bulk -go 1.21 -toolchain go1.21.0 +go 1.22 + +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../.. diff --git a/_examples/bulk/kafka/go.mod b/_examples/bulk/kafka/go.mod index eff6c665a5..ecc89764a2 100644 --- a/_examples/bulk/kafka/go.mod +++ b/_examples/bulk/kafka/go.mod @@ -1,7 +1,7 @@ module github.com/elastic/go-elasticsearch/v8/_examples/bulk/kafka -go 1.21 -toolchain go1.21.0 +go 1.22 +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../../.. diff --git a/_examples/cloudfunction/go.mod b/_examples/cloudfunction/go.mod index 1f79461a30..afe8b83b38 100644 --- a/_examples/cloudfunction/go.mod +++ b/_examples/cloudfunction/go.mod @@ -1,7 +1,8 @@ module github.com/elastic/go-elasticsearch/v8/_examples/clusterstatus -go 1.21 -toolchain go1.21.0 +go 1.22 + +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../.. diff --git a/_examples/cloudfunction/go.sum b/_examples/cloudfunction/go.sum index 55fd35b5d6..5874f0b317 100644 --- a/_examples/cloudfunction/go.sum +++ b/_examples/cloudfunction/go.sum @@ -3,8 +3,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA= github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -15,18 +13,12 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= diff --git a/_examples/encoding/go.mod b/_examples/encoding/go.mod index 2362ce44c9..9d49969481 100644 --- a/_examples/encoding/go.mod +++ b/_examples/encoding/go.mod @@ -1,7 +1,8 @@ module github.com/elastic/go-elasticsearch/v8/_examples/encoding -go 1.21 -toolchain go1.21.0 +go 1.22 + +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../.. diff --git a/_examples/encoding/go.sum b/_examples/encoding/go.sum index e374e36611..7febed8c50 100644 --- a/_examples/encoding/go.sum +++ b/_examples/encoding/go.sum @@ -5,8 +5,6 @@ github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8 github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -32,18 +30,12 @@ github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/_examples/extension/go.mod b/_examples/extension/go.mod index eeb981c272..a709f366f8 100644 --- a/_examples/extension/go.mod +++ b/_examples/extension/go.mod @@ -1,7 +1,8 @@ module github.com/elastic/go-elasticsearch/v8/_examples/extension -go 1.21 -toolchain go1.21.0 +go 1.22 + +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../.. diff --git a/_examples/fasthttp/go.mod b/_examples/fasthttp/go.mod index 23347ca0c1..4e37a24618 100644 --- a/_examples/fasthttp/go.mod +++ b/_examples/fasthttp/go.mod @@ -1,7 +1,8 @@ module github.com/elastic/go-elasticsearch/v8/_examples/fasthttp -go 1.21 -toolchain go1.21.0 +go 1.22 + +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../.. diff --git a/_examples/fasthttp/go.sum b/_examples/fasthttp/go.sum index 02a4d0c884..1c6b1b06e8 100644 --- a/_examples/fasthttp/go.sum +++ b/_examples/fasthttp/go.sum @@ -5,8 +5,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA= github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -25,18 +23,12 @@ github.com/valyala/fasthttp v1.34.0 h1:d3AAQJ2DRcxJYHm7OXNXtXt2as1vMDfxeIcFvhmGG github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0= github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= diff --git a/_examples/go.mod b/_examples/go.mod index 3ab9752de4..a1539769fb 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -1,7 +1,7 @@ module _examples -go 1.21 -toolchain go1.21.0 +go 1.22 +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../ diff --git a/_examples/instrumentation/go.mod b/_examples/instrumentation/go.mod index 5d09edfd40..c2b6d37699 100644 --- a/_examples/instrumentation/go.mod +++ b/_examples/instrumentation/go.mod @@ -1,7 +1,8 @@ module github.com/elastic/go-elasticsearch/v8/_examples/instrumentation/opencensus -go 1.21 -toolchain go1.21.0 +go 1.22 + +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../.. diff --git a/_examples/instrumentation/go.sum b/_examples/instrumentation/go.sum index 51a6ffbd09..a96246d6e6 100644 --- a/_examples/instrumentation/go.sum +++ b/_examples/instrumentation/go.sum @@ -26,8 +26,6 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -106,18 +104,12 @@ go.elastic.co/fastjson v1.1.0 h1:3MrGBWWVIxe/xvsbpghtkFoPciPhOCmjsR/HfwEeQR4= go.elastic.co/fastjson v1.1.0/go.mod h1:boNGISWMjQsUPy/t6yqt2/1Wx4YNPSe+mZjlyw9vKKI= go.opencensus.io v0.19.0 h1:+jrnNy8MR4GZXvwF9PEuSyHxA4NaTf6601oNRwCSXq0= go.opencensus.io v0.19.0/go.mod h1:AYeH0+ZxYyghG8diqaaIq/9P3VgCCt5GF2ldCY4dkFg= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/_examples/logging/go.mod b/_examples/logging/go.mod index 31fa43e788..34600ff313 100644 --- a/_examples/logging/go.mod +++ b/_examples/logging/go.mod @@ -1,7 +1,8 @@ module github.com/elastic/go-elasticsearch/v8/_examples/logging -go 1.21 -toolchain go1.21.0 +go 1.22 + +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../.. diff --git a/_examples/logging/go.sum b/_examples/logging/go.sum index 6408ed138b..abc5018938 100644 --- a/_examples/logging/go.sum +++ b/_examples/logging/go.sum @@ -5,8 +5,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA= github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -30,18 +28,12 @@ github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/_examples/security/go.mod b/_examples/security/go.mod index a7a40bac6b..45ea67de2f 100644 --- a/_examples/security/go.mod +++ b/_examples/security/go.mod @@ -1,7 +1,8 @@ module github.com/elastic/go-elasticsearch/v8/_examples/security -go 1.21 -toolchain go1.21.0 +go 1.22 + +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../.. diff --git a/_examples/security/go.sum b/_examples/security/go.sum index 55fd35b5d6..5874f0b317 100644 --- a/_examples/security/go.sum +++ b/_examples/security/go.sum @@ -3,8 +3,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA= github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -15,18 +13,12 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= diff --git a/_examples/xkcdsearch/go.mod b/_examples/xkcdsearch/go.mod index 117289247e..62c3141fd8 100644 --- a/_examples/xkcdsearch/go.mod +++ b/_examples/xkcdsearch/go.mod @@ -1,7 +1,8 @@ module github.com/elastic/go-elasticsearch/v8/_examples/xkcdsearch -go 1.21 -toolchain go1.21.0 +go 1.22 + +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../.. diff --git a/esapi/api._.go b/esapi/api._.go index a5bafa1819..4139d63f54 100755 --- a/esapi/api._.go +++ b/esapi/api._.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0 (cda8773): DO NOT EDIT +// Code generated from specification version 8.17.0 (2fb99c8): DO NOT EDIT package esapi @@ -130,6 +130,7 @@ type API struct { InferenceGet InferenceGet InferenceInference InferenceInference InferencePut InferencePut + InferenceStreamInference InferenceStreamInference Info Info KnnSearch KnnSearch LogstashDeletePipeline LogstashDeletePipeline @@ -153,6 +154,7 @@ type API struct { QueryRulesListRulesets QueryRulesListRulesets QueryRulesPutRule QueryRulesPutRule QueryRulesPutRuleset QueryRulesPutRuleset + QueryRulesTest QueryRulesTest RankEval RankEval Reindex Reindex ReindexRethrottle ReindexRethrottle @@ -335,15 +337,18 @@ type Indices struct { // Ingest contains the Ingest APIs type Ingest struct { - DeleteGeoipDatabase IngestDeleteGeoipDatabase - DeletePipeline IngestDeletePipeline - GeoIPStats IngestGeoIPStats - GetGeoipDatabase IngestGetGeoipDatabase - GetPipeline IngestGetPipeline - ProcessorGrok IngestProcessorGrok - PutGeoipDatabase IngestPutGeoipDatabase - PutPipeline IngestPutPipeline - Simulate IngestSimulate + DeleteGeoipDatabase IngestDeleteGeoipDatabase + DeleteIPLocationDatabase IngestDeleteIPLocationDatabase + DeletePipeline IngestDeletePipeline + GeoIPStats IngestGeoIPStats + GetGeoipDatabase IngestGetGeoipDatabase + GetIPLocationDatabase IngestGetIPLocationDatabase + GetPipeline IngestGetPipeline + ProcessorGrok IngestProcessorGrok + PutGeoipDatabase IngestPutGeoipDatabase + PutIPLocationDatabase IngestPutIPLocationDatabase + PutPipeline IngestPutPipeline + Simulate IngestSimulate } // Nodes contains the Nodes APIs @@ -363,18 +368,19 @@ type Remote struct { // Snapshot contains the Snapshot APIs type Snapshot struct { - CleanupRepository SnapshotCleanupRepository - Clone SnapshotClone - CreateRepository SnapshotCreateRepository - Create SnapshotCreate - DeleteRepository SnapshotDeleteRepository - Delete SnapshotDelete - GetRepository SnapshotGetRepository - Get SnapshotGet - RepositoryAnalyze SnapshotRepositoryAnalyze - Restore SnapshotRestore - Status SnapshotStatus - VerifyRepository SnapshotVerifyRepository + CleanupRepository SnapshotCleanupRepository + Clone SnapshotClone + CreateRepository SnapshotCreateRepository + Create SnapshotCreate + DeleteRepository SnapshotDeleteRepository + Delete SnapshotDelete + GetRepository SnapshotGetRepository + Get SnapshotGet + RepositoryAnalyze SnapshotRepositoryAnalyze + RepositoryVerifyIntegrity SnapshotRepositoryVerifyIntegrity + Restore SnapshotRestore + Status SnapshotStatus + VerifyRepository SnapshotVerifyRepository } // Tasks contains the Tasks APIs @@ -731,6 +737,7 @@ func New(t Transport) *API { InferenceGet: newInferenceGetFunc(t), InferenceInference: newInferenceInferenceFunc(t), InferencePut: newInferencePutFunc(t), + InferenceStreamInference: newInferenceStreamInferenceFunc(t), Info: newInfoFunc(t), KnnSearch: newKnnSearchFunc(t), LogstashDeletePipeline: newLogstashDeletePipelineFunc(t), @@ -754,6 +761,7 @@ func New(t Transport) *API { QueryRulesListRulesets: newQueryRulesListRulesetsFunc(t), QueryRulesPutRule: newQueryRulesPutRuleFunc(t), QueryRulesPutRuleset: newQueryRulesPutRulesetFunc(t), + QueryRulesTest: newQueryRulesTestFunc(t), RankEval: newRankEvalFunc(t), Reindex: newReindexFunc(t), ReindexRethrottle: newReindexRethrottleFunc(t), @@ -927,15 +935,18 @@ func New(t Transport) *API { ValidateQuery: newIndicesValidateQueryFunc(t), }, Ingest: &Ingest{ - DeleteGeoipDatabase: newIngestDeleteGeoipDatabaseFunc(t), - DeletePipeline: newIngestDeletePipelineFunc(t), - GeoIPStats: newIngestGeoIPStatsFunc(t), - GetGeoipDatabase: newIngestGetGeoipDatabaseFunc(t), - GetPipeline: newIngestGetPipelineFunc(t), - ProcessorGrok: newIngestProcessorGrokFunc(t), - PutGeoipDatabase: newIngestPutGeoipDatabaseFunc(t), - PutPipeline: newIngestPutPipelineFunc(t), - Simulate: newIngestSimulateFunc(t), + DeleteGeoipDatabase: newIngestDeleteGeoipDatabaseFunc(t), + DeleteIPLocationDatabase: newIngestDeleteIPLocationDatabaseFunc(t), + DeletePipeline: newIngestDeletePipelineFunc(t), + GeoIPStats: newIngestGeoIPStatsFunc(t), + GetGeoipDatabase: newIngestGetGeoipDatabaseFunc(t), + GetIPLocationDatabase: newIngestGetIPLocationDatabaseFunc(t), + GetPipeline: newIngestGetPipelineFunc(t), + ProcessorGrok: newIngestProcessorGrokFunc(t), + PutGeoipDatabase: newIngestPutGeoipDatabaseFunc(t), + PutIPLocationDatabase: newIngestPutIPLocationDatabaseFunc(t), + PutPipeline: newIngestPutPipelineFunc(t), + Simulate: newIngestSimulateFunc(t), }, Nodes: &Nodes{ ClearRepositoriesMeteringArchive: newNodesClearRepositoriesMeteringArchiveFunc(t), @@ -948,18 +959,19 @@ func New(t Transport) *API { }, Remote: &Remote{}, Snapshot: &Snapshot{ - CleanupRepository: newSnapshotCleanupRepositoryFunc(t), - Clone: newSnapshotCloneFunc(t), - CreateRepository: newSnapshotCreateRepositoryFunc(t), - Create: newSnapshotCreateFunc(t), - DeleteRepository: newSnapshotDeleteRepositoryFunc(t), - Delete: newSnapshotDeleteFunc(t), - GetRepository: newSnapshotGetRepositoryFunc(t), - Get: newSnapshotGetFunc(t), - RepositoryAnalyze: newSnapshotRepositoryAnalyzeFunc(t), - Restore: newSnapshotRestoreFunc(t), - Status: newSnapshotStatusFunc(t), - VerifyRepository: newSnapshotVerifyRepositoryFunc(t), + CleanupRepository: newSnapshotCleanupRepositoryFunc(t), + Clone: newSnapshotCloneFunc(t), + CreateRepository: newSnapshotCreateRepositoryFunc(t), + Create: newSnapshotCreateFunc(t), + DeleteRepository: newSnapshotDeleteRepositoryFunc(t), + Delete: newSnapshotDeleteFunc(t), + GetRepository: newSnapshotGetRepositoryFunc(t), + Get: newSnapshotGetFunc(t), + RepositoryAnalyze: newSnapshotRepositoryAnalyzeFunc(t), + RepositoryVerifyIntegrity: newSnapshotRepositoryVerifyIntegrityFunc(t), + Restore: newSnapshotRestoreFunc(t), + Status: newSnapshotStatusFunc(t), + VerifyRepository: newSnapshotVerifyRepositoryFunc(t), }, Tasks: &Tasks{ Cancel: newTasksCancelFunc(t), diff --git a/esapi/api.bulk.go b/esapi/api.bulk.go index 8389c75ce4..3ce6ac30e7 100644 --- a/esapi/api.bulk.go +++ b/esapi/api.bulk.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.capabilities.go b/esapi/api.capabilities.go index 514be3f474..09eacfe535 100644 --- a/esapi/api.capabilities.go +++ b/esapi/api.capabilities.go @@ -15,13 +15,14 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi import ( "context" "net/http" + "strconv" "strings" ) @@ -52,6 +53,7 @@ type Capabilities func(o ...func(*CapabilitiesRequest)) (*Response, error) // CapabilitiesRequest configures the Capabilities API request. type CapabilitiesRequest struct { Capabilities string + LocalOnly *bool Method string Parameters string Path string @@ -97,6 +99,10 @@ func (r CapabilitiesRequest) Do(providedCtx context.Context, transport Transport params["capabilities"] = r.Capabilities } + if r.LocalOnly != nil { + params["local_only"] = strconv.FormatBool(*r.LocalOnly) + } + if r.Method != "" { params["method"] = r.Method } @@ -194,6 +200,13 @@ func (f Capabilities) WithCapabilities(v string) func(*CapabilitiesRequest) { } } +// WithLocalOnly - true if only the node being called should be considered. +func (f Capabilities) WithLocalOnly(v bool) func(*CapabilitiesRequest) { + return func(r *CapabilitiesRequest) { + r.LocalOnly = &v + } +} + // WithMethod - rest method to check. func (f Capabilities) WithMethod(v string) func(*CapabilitiesRequest) { return func(r *CapabilitiesRequest) { diff --git a/esapi/api.cat.aliases.go b/esapi/api.cat.aliases.go index 109a6c7825..c30b80b421 100644 --- a/esapi/api.cat.aliases.go +++ b/esapi/api.cat.aliases.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.allocation.go b/esapi/api.cat.allocation.go index ceb6fa6287..9528ed5a7e 100644 --- a/esapi/api.cat.allocation.go +++ b/esapi/api.cat.allocation.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.component_templates.go b/esapi/api.cat.component_templates.go index 1a7532f282..20bb9bacb4 100644 --- a/esapi/api.cat.component_templates.go +++ b/esapi/api.cat.component_templates.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.count.go b/esapi/api.cat.count.go index 227420c3f9..032e652761 100644 --- a/esapi/api.cat.count.go +++ b/esapi/api.cat.count.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.fielddata.go b/esapi/api.cat.fielddata.go index c62adb1c1f..2c3c1ae5aa 100644 --- a/esapi/api.cat.fielddata.go +++ b/esapi/api.cat.fielddata.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.health.go b/esapi/api.cat.health.go index c5e1c5f1bf..7a66b3d69f 100644 --- a/esapi/api.cat.health.go +++ b/esapi/api.cat.health.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.help.go b/esapi/api.cat.help.go index a03a4f52cc..dfb4ccab89 100644 --- a/esapi/api.cat.help.go +++ b/esapi/api.cat.help.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.indices.go b/esapi/api.cat.indices.go index f7081d8c5f..ac199a3211 100644 --- a/esapi/api.cat.indices.go +++ b/esapi/api.cat.indices.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.master.go b/esapi/api.cat.master.go index a13b9ab237..c2ee66e65e 100644 --- a/esapi/api.cat.master.go +++ b/esapi/api.cat.master.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.nodeattrs.go b/esapi/api.cat.nodeattrs.go index f017502db2..36e97957c7 100644 --- a/esapi/api.cat.nodeattrs.go +++ b/esapi/api.cat.nodeattrs.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.nodes.go b/esapi/api.cat.nodes.go index 2b7b0be9a5..a6eea157c8 100644 --- a/esapi/api.cat.nodes.go +++ b/esapi/api.cat.nodes.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.pending_tasks.go b/esapi/api.cat.pending_tasks.go index de66e85cf4..96e1685eca 100644 --- a/esapi/api.cat.pending_tasks.go +++ b/esapi/api.cat.pending_tasks.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.plugins.go b/esapi/api.cat.plugins.go index 14ac83ca9c..d872b97f48 100644 --- a/esapi/api.cat.plugins.go +++ b/esapi/api.cat.plugins.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.recovery.go b/esapi/api.cat.recovery.go index 1ebc1ffd5f..59146a418c 100644 --- a/esapi/api.cat.recovery.go +++ b/esapi/api.cat.recovery.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.repositories.go b/esapi/api.cat.repositories.go index 7cdeabade6..9793bbb799 100644 --- a/esapi/api.cat.repositories.go +++ b/esapi/api.cat.repositories.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.segments.go b/esapi/api.cat.segments.go index 4139ff08ec..704f38487c 100644 --- a/esapi/api.cat.segments.go +++ b/esapi/api.cat.segments.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.shards.go b/esapi/api.cat.shards.go index 403f4b4839..8eaeeb8990 100644 --- a/esapi/api.cat.shards.go +++ b/esapi/api.cat.shards.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.snapshots.go b/esapi/api.cat.snapshots.go index 74d8ca72f4..27dd9b5bb0 100644 --- a/esapi/api.cat.snapshots.go +++ b/esapi/api.cat.snapshots.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.tasks.go b/esapi/api.cat.tasks.go index de5171ff85..6ebd1919e6 100644 --- a/esapi/api.cat.tasks.go +++ b/esapi/api.cat.tasks.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.templates.go b/esapi/api.cat.templates.go index 2cff2b8746..a52efce915 100644 --- a/esapi/api.cat.templates.go +++ b/esapi/api.cat.templates.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.thread_pool.go b/esapi/api.cat.thread_pool.go index af889c1869..61ce74f162 100644 --- a/esapi/api.cat.thread_pool.go +++ b/esapi/api.cat.thread_pool.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.clear_scroll.go b/esapi/api.clear_scroll.go index 9aa6cc8195..4884e79213 100644 --- a/esapi/api.clear_scroll.go +++ b/esapi/api.clear_scroll.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.allocation_explain.go b/esapi/api.cluster.allocation_explain.go index 385e0ad03d..210f29fd8b 100644 --- a/esapi/api.cluster.allocation_explain.go +++ b/esapi/api.cluster.allocation_explain.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.delete_component_template.go b/esapi/api.cluster.delete_component_template.go index 704d056a41..360a30babf 100644 --- a/esapi/api.cluster.delete_component_template.go +++ b/esapi/api.cluster.delete_component_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.delete_voting_config_exclusions.go b/esapi/api.cluster.delete_voting_config_exclusions.go index 497fa212cd..251dd85f40 100644 --- a/esapi/api.cluster.delete_voting_config_exclusions.go +++ b/esapi/api.cluster.delete_voting_config_exclusions.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.exists_component_template.go b/esapi/api.cluster.exists_component_template.go index 6802b1b1e7..eeb896fc43 100644 --- a/esapi/api.cluster.exists_component_template.go +++ b/esapi/api.cluster.exists_component_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.get_component_template.go b/esapi/api.cluster.get_component_template.go index 7445496f6c..f71124c9e7 100644 --- a/esapi/api.cluster.get_component_template.go +++ b/esapi/api.cluster.get_component_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.get_settings.go b/esapi/api.cluster.get_settings.go index 728bdacb3f..52a955ea31 100644 --- a/esapi/api.cluster.get_settings.go +++ b/esapi/api.cluster.get_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.health.go b/esapi/api.cluster.health.go index 2349ec537d..18f3d7c08b 100644 --- a/esapi/api.cluster.health.go +++ b/esapi/api.cluster.health.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.info.go b/esapi/api.cluster.info.go index 2b74fc438e..1bf448ad70 100644 --- a/esapi/api.cluster.info.go +++ b/esapi/api.cluster.info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.pending_tasks.go b/esapi/api.cluster.pending_tasks.go index 616059e56d..a4f7238279 100644 --- a/esapi/api.cluster.pending_tasks.go +++ b/esapi/api.cluster.pending_tasks.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.post_voting_config_exclusions.go b/esapi/api.cluster.post_voting_config_exclusions.go index e018d275e6..5b509b6c34 100644 --- a/esapi/api.cluster.post_voting_config_exclusions.go +++ b/esapi/api.cluster.post_voting_config_exclusions.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.put_component_template.go b/esapi/api.cluster.put_component_template.go index 977724aca8..d2218ab78b 100644 --- a/esapi/api.cluster.put_component_template.go +++ b/esapi/api.cluster.put_component_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.put_settings.go b/esapi/api.cluster.put_settings.go index 0f9b9c74d9..3e4d328c52 100644 --- a/esapi/api.cluster.put_settings.go +++ b/esapi/api.cluster.put_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.remote_info.go b/esapi/api.cluster.remote_info.go index 2f46cceafd..ecc3fde67c 100644 --- a/esapi/api.cluster.remote_info.go +++ b/esapi/api.cluster.remote_info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.reroute.go b/esapi/api.cluster.reroute.go index d2487f1af6..a5dfba14e8 100644 --- a/esapi/api.cluster.reroute.go +++ b/esapi/api.cluster.reroute.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.state.go b/esapi/api.cluster.state.go index dd219a7c91..1a77e6b71c 100644 --- a/esapi/api.cluster.state.go +++ b/esapi/api.cluster.state.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.cluster.stats.go b/esapi/api.cluster.stats.go index 4c4146c522..97f974b6f3 100644 --- a/esapi/api.cluster.stats.go +++ b/esapi/api.cluster.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -53,8 +53,8 @@ type ClusterStats func(o ...func(*ClusterStatsRequest)) (*Response, error) type ClusterStatsRequest struct { NodeID []string - FlatSettings *bool - Timeout time.Duration + IncludeRemotes *bool + Timeout time.Duration Pretty bool Human bool @@ -101,8 +101,8 @@ func (r ClusterStatsRequest) Do(providedCtx context.Context, transport Transport params = make(map[string]string) - if r.FlatSettings != nil { - params["flat_settings"] = strconv.FormatBool(*r.FlatSettings) + if r.IncludeRemotes != nil { + params["include_remotes"] = strconv.FormatBool(*r.IncludeRemotes) } if r.Timeout != 0 { @@ -194,10 +194,10 @@ func (f ClusterStats) WithNodeID(v ...string) func(*ClusterStatsRequest) { } } -// WithFlatSettings - return settings in flat format (default: false). -func (f ClusterStats) WithFlatSettings(v bool) func(*ClusterStatsRequest) { +// WithIncludeRemotes - include remote cluster data into the response (default: false). +func (f ClusterStats) WithIncludeRemotes(v bool) func(*ClusterStatsRequest) { return func(r *ClusterStatsRequest) { - r.FlatSettings = &v + r.IncludeRemotes = &v } } diff --git a/esapi/api.connector.check_in.go b/esapi/api.connector.check_in.go index 32f435fb91..1fcfa57fda 100644 --- a/esapi/api.connector.check_in.go +++ b/esapi/api.connector.check_in.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.delete.go b/esapi/api.connector.delete.go index a4749cb87e..9c25cee000 100644 --- a/esapi/api.connector.delete.go +++ b/esapi/api.connector.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.get.go b/esapi/api.connector.get.go index 0a2a6081a9..134eefe410 100644 --- a/esapi/api.connector.get.go +++ b/esapi/api.connector.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.last_sync.go b/esapi/api.connector.last_sync.go index ce07ab1325..3e111d6ed2 100644 --- a/esapi/api.connector.last_sync.go +++ b/esapi/api.connector.last_sync.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.list.go b/esapi/api.connector.list.go index d9d61f7999..11c941bcc4 100644 --- a/esapi/api.connector.list.go +++ b/esapi/api.connector.list.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.post.go b/esapi/api.connector.post.go index 1810ba76d5..eb7c84a867 100644 --- a/esapi/api.connector.post.go +++ b/esapi/api.connector.post.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.put.go b/esapi/api.connector.put.go index c710e831ae..56cc7d11ea 100644 --- a/esapi/api.connector.put.go +++ b/esapi/api.connector.put.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.secret_delete.go b/esapi/api.connector.secret_delete.go index dd877e4f49..a80b40669c 100644 --- a/esapi/api.connector.secret_delete.go +++ b/esapi/api.connector.secret_delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.secret_get.go b/esapi/api.connector.secret_get.go index a860294d7a..644649edae 100644 --- a/esapi/api.connector.secret_get.go +++ b/esapi/api.connector.secret_get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.secret_post.go b/esapi/api.connector.secret_post.go index fe1dc7c16d..d2949fe0bc 100644 --- a/esapi/api.connector.secret_post.go +++ b/esapi/api.connector.secret_post.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.secret_put.go b/esapi/api.connector.secret_put.go index 563432118a..5427d8ffbd 100644 --- a/esapi/api.connector.secret_put.go +++ b/esapi/api.connector.secret_put.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.sync_job_cancel.go b/esapi/api.connector.sync_job_cancel.go index 78a1ce91a0..5d2d57d337 100644 --- a/esapi/api.connector.sync_job_cancel.go +++ b/esapi/api.connector.sync_job_cancel.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.sync_job_check_in.go b/esapi/api.connector.sync_job_check_in.go index e75b083acb..1e056abff5 100644 --- a/esapi/api.connector.sync_job_check_in.go +++ b/esapi/api.connector.sync_job_check_in.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.sync_job_claim.go b/esapi/api.connector.sync_job_claim.go index 10a0e26422..fc819dfd8f 100644 --- a/esapi/api.connector.sync_job_claim.go +++ b/esapi/api.connector.sync_job_claim.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.sync_job_delete.go b/esapi/api.connector.sync_job_delete.go index c22be45922..5e2d6bb79d 100644 --- a/esapi/api.connector.sync_job_delete.go +++ b/esapi/api.connector.sync_job_delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.sync_job_error.go b/esapi/api.connector.sync_job_error.go index 9e71bdc7b5..ce414cd302 100644 --- a/esapi/api.connector.sync_job_error.go +++ b/esapi/api.connector.sync_job_error.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.sync_job_get.go b/esapi/api.connector.sync_job_get.go index 7db21eef5f..8332dd484a 100644 --- a/esapi/api.connector.sync_job_get.go +++ b/esapi/api.connector.sync_job_get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.sync_job_list.go b/esapi/api.connector.sync_job_list.go index 508206e768..9009775d1f 100644 --- a/esapi/api.connector.sync_job_list.go +++ b/esapi/api.connector.sync_job_list.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.sync_job_post.go b/esapi/api.connector.sync_job_post.go index 97bf8f023d..c8a8520af1 100644 --- a/esapi/api.connector.sync_job_post.go +++ b/esapi/api.connector.sync_job_post.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.sync_job_update_stats.go b/esapi/api.connector.sync_job_update_stats.go index a4e5791280..690b4b2ef0 100644 --- a/esapi/api.connector.sync_job_update_stats.go +++ b/esapi/api.connector.sync_job_update_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_active_filtering.go b/esapi/api.connector.update_active_filtering.go index af425f2c52..0c8fc645fc 100644 --- a/esapi/api.connector.update_active_filtering.go +++ b/esapi/api.connector.update_active_filtering.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_api_key_id.go b/esapi/api.connector.update_api_key_id.go index 4fe903e2a0..923d98299a 100644 --- a/esapi/api.connector.update_api_key_id.go +++ b/esapi/api.connector.update_api_key_id.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_configuration.go b/esapi/api.connector.update_configuration.go index 667e0683f4..9e7603e0bd 100644 --- a/esapi/api.connector.update_configuration.go +++ b/esapi/api.connector.update_configuration.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_error.go b/esapi/api.connector.update_error.go index 68ab7432bf..2566352b66 100644 --- a/esapi/api.connector.update_error.go +++ b/esapi/api.connector.update_error.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_features.go b/esapi/api.connector.update_features.go index a645dc7741..cc95f0d7e9 100644 --- a/esapi/api.connector.update_features.go +++ b/esapi/api.connector.update_features.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_filtering.go b/esapi/api.connector.update_filtering.go index 3a96096b80..b53e6d3f07 100644 --- a/esapi/api.connector.update_filtering.go +++ b/esapi/api.connector.update_filtering.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_filtering_validation.go b/esapi/api.connector.update_filtering_validation.go index 5bbb9d1126..f7fdb36e4a 100644 --- a/esapi/api.connector.update_filtering_validation.go +++ b/esapi/api.connector.update_filtering_validation.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_index_name.go b/esapi/api.connector.update_index_name.go index 8cf47b74c5..91b157fa52 100644 --- a/esapi/api.connector.update_index_name.go +++ b/esapi/api.connector.update_index_name.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_name.go b/esapi/api.connector.update_name.go index c540c2b407..37bf439c37 100644 --- a/esapi/api.connector.update_name.go +++ b/esapi/api.connector.update_name.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_native.go b/esapi/api.connector.update_native.go index dfbd7aaeaf..b434e9eb7f 100644 --- a/esapi/api.connector.update_native.go +++ b/esapi/api.connector.update_native.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_pipeline.go b/esapi/api.connector.update_pipeline.go index dbc5da91b4..bb2efb2a2d 100644 --- a/esapi/api.connector.update_pipeline.go +++ b/esapi/api.connector.update_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_scheduling.go b/esapi/api.connector.update_scheduling.go index 197ac84c83..a94b880ff7 100644 --- a/esapi/api.connector.update_scheduling.go +++ b/esapi/api.connector.update_scheduling.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_service_type.go b/esapi/api.connector.update_service_type.go index a3ea51318e..c3a7fc7fd4 100644 --- a/esapi/api.connector.update_service_type.go +++ b/esapi/api.connector.update_service_type.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.connector.update_status.go b/esapi/api.connector.update_status.go index a172bfdbba..34bf2146e7 100644 --- a/esapi/api.connector.update_status.go +++ b/esapi/api.connector.update_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.count.go b/esapi/api.count.go index cbbf22707d..d375d5d293 100644 --- a/esapi/api.count.go +++ b/esapi/api.count.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.create.go b/esapi/api.create.go index 5205b3b04b..7a825702b1 100644 --- a/esapi/api.create.go +++ b/esapi/api.create.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.dangling_indices.delete_dangling_index.go b/esapi/api.dangling_indices.delete_dangling_index.go index 2fb1275f44..79a095f725 100644 --- a/esapi/api.dangling_indices.delete_dangling_index.go +++ b/esapi/api.dangling_indices.delete_dangling_index.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.dangling_indices.import_dangling_index.go b/esapi/api.dangling_indices.import_dangling_index.go index 8b1bae064f..6be13678f6 100644 --- a/esapi/api.dangling_indices.import_dangling_index.go +++ b/esapi/api.dangling_indices.import_dangling_index.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.dangling_indices.list_dangling_indices.go b/esapi/api.dangling_indices.list_dangling_indices.go index 2c7daf7395..e298d1d8f4 100644 --- a/esapi/api.dangling_indices.list_dangling_indices.go +++ b/esapi/api.dangling_indices.list_dangling_indices.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.delete.go b/esapi/api.delete.go index b6d3de072c..4c2ae5eb7b 100644 --- a/esapi/api.delete.go +++ b/esapi/api.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.delete_by_query.go b/esapi/api.delete_by_query.go index da43f04daa..e876cc53d4 100644 --- a/esapi/api.delete_by_query.go +++ b/esapi/api.delete_by_query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.delete_by_query_rethrottle.go b/esapi/api.delete_by_query_rethrottle.go index d1441e6683..af214cd236 100644 --- a/esapi/api.delete_by_query_rethrottle.go +++ b/esapi/api.delete_by_query_rethrottle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.delete_script.go b/esapi/api.delete_script.go index 7f22136968..f2ccca572b 100644 --- a/esapi/api.delete_script.go +++ b/esapi/api.delete_script.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.exists.go b/esapi/api.exists.go index 6ce32ba5a7..6d0e435897 100644 --- a/esapi/api.exists.go +++ b/esapi/api.exists.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.exists_source.go b/esapi/api.exists_source.go index 3199ebb08f..0aaa9b72f3 100644 --- a/esapi/api.exists_source.go +++ b/esapi/api.exists_source.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.explain.go b/esapi/api.explain.go index a63bffc1e1..0ce5dba720 100644 --- a/esapi/api.explain.go +++ b/esapi/api.explain.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.features.get_features.go b/esapi/api.features.get_features.go index 055f83c274..a7ed03cf28 100644 --- a/esapi/api.features.get_features.go +++ b/esapi/api.features.get_features.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.features.reset_features.go b/esapi/api.features.reset_features.go index fcce6e3695..7b255f747a 100644 --- a/esapi/api.features.reset_features.go +++ b/esapi/api.features.reset_features.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.field_caps.go b/esapi/api.field_caps.go index 1de29546ac..6332cfecb2 100644 --- a/esapi/api.field_caps.go +++ b/esapi/api.field_caps.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.fleet.delete_secret.go b/esapi/api.fleet.delete_secret.go index 496249a517..af953179ea 100644 --- a/esapi/api.fleet.delete_secret.go +++ b/esapi/api.fleet.delete_secret.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.fleet.get_secret.go b/esapi/api.fleet.get_secret.go index 0ed9da0fb2..e497b69c58 100644 --- a/esapi/api.fleet.get_secret.go +++ b/esapi/api.fleet.get_secret.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.fleet.global_checkpoints.go b/esapi/api.fleet.global_checkpoints.go index cf9ab110ea..8ad149e1a2 100644 --- a/esapi/api.fleet.global_checkpoints.go +++ b/esapi/api.fleet.global_checkpoints.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.fleet.msearch.go b/esapi/api.fleet.msearch.go index a848d1ef92..799d7f7bd1 100644 --- a/esapi/api.fleet.msearch.go +++ b/esapi/api.fleet.msearch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.fleet.post_secret.go b/esapi/api.fleet.post_secret.go index 1aefeaef20..798c40d166 100644 --- a/esapi/api.fleet.post_secret.go +++ b/esapi/api.fleet.post_secret.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.fleet.search.go b/esapi/api.fleet.search.go index b9764f73ed..dd84e358ae 100644 --- a/esapi/api.fleet.search.go +++ b/esapi/api.fleet.search.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.get.go b/esapi/api.get.go index 561ab84669..5a30ac0baf 100644 --- a/esapi/api.get.go +++ b/esapi/api.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.get_script.go b/esapi/api.get_script.go index abbb0ea08c..63b51fc8c1 100644 --- a/esapi/api.get_script.go +++ b/esapi/api.get_script.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.get_script_context.go b/esapi/api.get_script_context.go index 58add2132d..53167af3a5 100644 --- a/esapi/api.get_script_context.go +++ b/esapi/api.get_script_context.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.get_script_languages.go b/esapi/api.get_script_languages.go index 6111542e00..b46f365ea0 100644 --- a/esapi/api.get_script_languages.go +++ b/esapi/api.get_script_languages.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.get_source.go b/esapi/api.get_source.go index 36fa4fd7a3..e919a6f7b6 100644 --- a/esapi/api.get_source.go +++ b/esapi/api.get_source.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.health_report.go b/esapi/api.health_report.go index 276602a3d4..e28c3237cd 100644 --- a/esapi/api.health_report.go +++ b/esapi/api.health_report.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.index.go b/esapi/api.index.go index 50f7b60517..556ac85d77 100644 --- a/esapi/api.index.go +++ b/esapi/api.index.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.add_block.go b/esapi/api.indices.add_block.go index 4297642f49..2aa6c9b7d3 100644 --- a/esapi/api.indices.add_block.go +++ b/esapi/api.indices.add_block.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.analyze.go b/esapi/api.indices.analyze.go index accf120546..eb53af6a00 100644 --- a/esapi/api.indices.analyze.go +++ b/esapi/api.indices.analyze.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.clear_cache.go b/esapi/api.indices.clear_cache.go index 20c931cbfb..11331f2ba5 100644 --- a/esapi/api.indices.clear_cache.go +++ b/esapi/api.indices.clear_cache.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.clone.go b/esapi/api.indices.clone.go index 2754d3f989..606992b51e 100644 --- a/esapi/api.indices.clone.go +++ b/esapi/api.indices.clone.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.close.go b/esapi/api.indices.close.go index 3601cd94cd..6dd0ff7d63 100644 --- a/esapi/api.indices.close.go +++ b/esapi/api.indices.close.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.create.go b/esapi/api.indices.create.go index 4356d58eb4..80242f57d7 100644 --- a/esapi/api.indices.create.go +++ b/esapi/api.indices.create.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.delete.go b/esapi/api.indices.delete.go index 449da765c5..070b39fa97 100644 --- a/esapi/api.indices.delete.go +++ b/esapi/api.indices.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.delete_alias.go b/esapi/api.indices.delete_alias.go index c59086b934..c0df2e268f 100644 --- a/esapi/api.indices.delete_alias.go +++ b/esapi/api.indices.delete_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.delete_data_lifecycle.go b/esapi/api.indices.delete_data_lifecycle.go index 70f0bd18a1..bf5112c9e3 100644 --- a/esapi/api.indices.delete_data_lifecycle.go +++ b/esapi/api.indices.delete_data_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -46,8 +46,6 @@ func newIndicesDeleteDataLifecycleFunc(t Transport) IndicesDeleteDataLifecycle { // IndicesDeleteDataLifecycle deletes the data stream lifecycle of the selected data streams. // -// This API is experimental. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html. type IndicesDeleteDataLifecycle func(name []string, o ...func(*IndicesDeleteDataLifecycleRequest)) (*Response, error) diff --git a/esapi/api.indices.delete_index_template.go b/esapi/api.indices.delete_index_template.go index 5babf1c954..5f2873efb7 100644 --- a/esapi/api.indices.delete_index_template.go +++ b/esapi/api.indices.delete_index_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.delete_template.go b/esapi/api.indices.delete_template.go index 6b7d5b4e70..9e24fd0b66 100644 --- a/esapi/api.indices.delete_template.go +++ b/esapi/api.indices.delete_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.disk_usage.go b/esapi/api.indices.disk_usage.go index e0a94adfa5..554ad98f31 100644 --- a/esapi/api.indices.disk_usage.go +++ b/esapi/api.indices.disk_usage.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.downsample.go b/esapi/api.indices.downsample.go index 3db0e6de86..e61cc4e236 100644 --- a/esapi/api.indices.downsample.go +++ b/esapi/api.indices.downsample.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.exists.go b/esapi/api.indices.exists.go index 3bd22065ca..70bab94dec 100644 --- a/esapi/api.indices.exists.go +++ b/esapi/api.indices.exists.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.exists_alias.go b/esapi/api.indices.exists_alias.go index 1dafdb9309..e1b4626dc2 100644 --- a/esapi/api.indices.exists_alias.go +++ b/esapi/api.indices.exists_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.exists_index_template.go b/esapi/api.indices.exists_index_template.go index 211d8b4885..6be41f167e 100644 --- a/esapi/api.indices.exists_index_template.go +++ b/esapi/api.indices.exists_index_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.exists_template.go b/esapi/api.indices.exists_template.go index 3dcdf54977..0c3030c041 100644 --- a/esapi/api.indices.exists_template.go +++ b/esapi/api.indices.exists_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.explain_data_lifecycle.go b/esapi/api.indices.explain_data_lifecycle.go index 6b0df98cd3..c4b79960f3 100644 --- a/esapi/api.indices.explain_data_lifecycle.go +++ b/esapi/api.indices.explain_data_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -46,8 +46,6 @@ func newIndicesExplainDataLifecycleFunc(t Transport) IndicesExplainDataLifecycle // IndicesExplainDataLifecycle retrieves information about the index's current data stream lifecycle, such as any potential encountered error, time since creation etc. // -// This API is experimental. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html. type IndicesExplainDataLifecycle func(index string, o ...func(*IndicesExplainDataLifecycleRequest)) (*Response, error) diff --git a/esapi/api.indices.field_usage_stats.go b/esapi/api.indices.field_usage_stats.go index 7c7083bb82..ed7a931639 100644 --- a/esapi/api.indices.field_usage_stats.go +++ b/esapi/api.indices.field_usage_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.flush.go b/esapi/api.indices.flush.go index 133a0dc0ba..1f2c76a320 100644 --- a/esapi/api.indices.flush.go +++ b/esapi/api.indices.flush.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.forcemerge.go b/esapi/api.indices.forcemerge.go index 667e749707..390324ac19 100644 --- a/esapi/api.indices.forcemerge.go +++ b/esapi/api.indices.forcemerge.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.get.go b/esapi/api.indices.get.go index 1ac65c0a7a..2654634f5e 100644 --- a/esapi/api.indices.get.go +++ b/esapi/api.indices.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.get_alias.go b/esapi/api.indices.get_alias.go index f69d37f75f..b4b58865fc 100644 --- a/esapi/api.indices.get_alias.go +++ b/esapi/api.indices.get_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.get_data_lifecycle.go b/esapi/api.indices.get_data_lifecycle.go index 937964f14a..89be5242c2 100644 --- a/esapi/api.indices.get_data_lifecycle.go +++ b/esapi/api.indices.get_data_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -47,8 +47,6 @@ func newIndicesGetDataLifecycleFunc(t Transport) IndicesGetDataLifecycle { // IndicesGetDataLifecycle returns the data stream lifecycle of the selected data streams. // -// This API is experimental. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle.html. type IndicesGetDataLifecycle func(name []string, o ...func(*IndicesGetDataLifecycleRequest)) (*Response, error) diff --git a/esapi/api.indices.get_field_mapping.go b/esapi/api.indices.get_field_mapping.go index d67cb2af50..4005f88330 100644 --- a/esapi/api.indices.get_field_mapping.go +++ b/esapi/api.indices.get_field_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.get_index_template.go b/esapi/api.indices.get_index_template.go index 7568269bec..2208b6d34a 100644 --- a/esapi/api.indices.get_index_template.go +++ b/esapi/api.indices.get_index_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.get_mapping.go b/esapi/api.indices.get_mapping.go index 762d143f43..51865fde6a 100644 --- a/esapi/api.indices.get_mapping.go +++ b/esapi/api.indices.get_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.get_settings.go b/esapi/api.indices.get_settings.go index 08c36a63cc..b329d337ac 100644 --- a/esapi/api.indices.get_settings.go +++ b/esapi/api.indices.get_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.get_template.go b/esapi/api.indices.get_template.go index 08772e5bfe..6631116b65 100644 --- a/esapi/api.indices.get_template.go +++ b/esapi/api.indices.get_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.modify_data_stream.go b/esapi/api.indices.modify_data_stream.go index e60f2e2cde..4844f95760 100644 --- a/esapi/api.indices.modify_data_stream.go +++ b/esapi/api.indices.modify_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.open.go b/esapi/api.indices.open.go index 30120936f8..198006488e 100644 --- a/esapi/api.indices.open.go +++ b/esapi/api.indices.open.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.put_alias.go b/esapi/api.indices.put_alias.go index 064779b444..ceb5cb73e0 100644 --- a/esapi/api.indices.put_alias.go +++ b/esapi/api.indices.put_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.put_data_lifecycle.go b/esapi/api.indices.put_data_lifecycle.go index 0417453401..cbf9f8dbed 100644 --- a/esapi/api.indices.put_data_lifecycle.go +++ b/esapi/api.indices.put_data_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -47,8 +47,6 @@ func newIndicesPutDataLifecycleFunc(t Transport) IndicesPutDataLifecycle { // IndicesPutDataLifecycle updates the data stream lifecycle of the selected data streams. // -// This API is experimental. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html. type IndicesPutDataLifecycle func(name []string, o ...func(*IndicesPutDataLifecycleRequest)) (*Response, error) diff --git a/esapi/api.indices.put_index_template.go b/esapi/api.indices.put_index_template.go index ecc4fbf408..870fab6e31 100644 --- a/esapi/api.indices.put_index_template.go +++ b/esapi/api.indices.put_index_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.put_mapping.go b/esapi/api.indices.put_mapping.go index 93c88c1571..1e5be804b1 100644 --- a/esapi/api.indices.put_mapping.go +++ b/esapi/api.indices.put_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.put_settings.go b/esapi/api.indices.put_settings.go index be486699ff..d43e06840c 100644 --- a/esapi/api.indices.put_settings.go +++ b/esapi/api.indices.put_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.put_template.go b/esapi/api.indices.put_template.go index 9a074077a5..ebf8b2f33c 100644 --- a/esapi/api.indices.put_template.go +++ b/esapi/api.indices.put_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.recovery.go b/esapi/api.indices.recovery.go index 02a157974e..cc863ff0a1 100644 --- a/esapi/api.indices.recovery.go +++ b/esapi/api.indices.recovery.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.refresh.go b/esapi/api.indices.refresh.go index 611e283f7c..f7c9edf9c6 100644 --- a/esapi/api.indices.refresh.go +++ b/esapi/api.indices.refresh.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.resolve_cluster.go b/esapi/api.indices.resolve_cluster.go index 582e1275d1..e1e40be3c4 100644 --- a/esapi/api.indices.resolve_cluster.go +++ b/esapi/api.indices.resolve_cluster.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.resolve_index.go b/esapi/api.indices.resolve_index.go index a29123bb4f..0f4cbed9c9 100644 --- a/esapi/api.indices.resolve_index.go +++ b/esapi/api.indices.resolve_index.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -23,6 +23,7 @@ import ( "context" "errors" "net/http" + "strconv" "strings" ) @@ -52,7 +53,9 @@ type IndicesResolveIndex func(name []string, o ...func(*IndicesResolveIndexReque type IndicesResolveIndexRequest struct { Name []string - ExpandWildcards string + AllowNoIndices *bool + ExpandWildcards string + IgnoreUnavailable *bool Pretty bool Human bool @@ -103,10 +106,18 @@ func (r IndicesResolveIndexRequest) Do(providedCtx context.Context, transport Tr 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.Pretty { params["pretty"] = "true" } @@ -185,6 +196,13 @@ func (f IndicesResolveIndex) WithContext(v context.Context) func(*IndicesResolve } } +// 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 IndicesResolveIndex) WithAllowNoIndices(v bool) func(*IndicesResolveIndexRequest) { + return func(r *IndicesResolveIndexRequest) { + r.AllowNoIndices = &v + } +} + // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). func (f IndicesResolveIndex) WithExpandWildcards(v string) func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { @@ -192,6 +210,13 @@ func (f IndicesResolveIndex) WithExpandWildcards(v string) func(*IndicesResolveI } } +// WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). +func (f IndicesResolveIndex) WithIgnoreUnavailable(v bool) func(*IndicesResolveIndexRequest) { + return func(r *IndicesResolveIndexRequest) { + r.IgnoreUnavailable = &v + } +} + // WithPretty makes the response body pretty-printed. func (f IndicesResolveIndex) WithPretty() func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { diff --git a/esapi/api.indices.rollover.go b/esapi/api.indices.rollover.go index c75eebe9f3..8f846b8e1d 100644 --- a/esapi/api.indices.rollover.go +++ b/esapi/api.indices.rollover.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.segments.go b/esapi/api.indices.segments.go index ecfe009bbe..fc102806b4 100644 --- a/esapi/api.indices.segments.go +++ b/esapi/api.indices.segments.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.shard_stores.go b/esapi/api.indices.shard_stores.go index 933a70dbbf..eb5425ed66 100644 --- a/esapi/api.indices.shard_stores.go +++ b/esapi/api.indices.shard_stores.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.shrink.go b/esapi/api.indices.shrink.go index cc9d992482..eac604c7a9 100644 --- a/esapi/api.indices.shrink.go +++ b/esapi/api.indices.shrink.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.simulate_index_template.go b/esapi/api.indices.simulate_index_template.go index b7bf01084a..1fd2c31a57 100644 --- a/esapi/api.indices.simulate_index_template.go +++ b/esapi/api.indices.simulate_index_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.simulate_template.go b/esapi/api.indices.simulate_template.go index fcb6e977de..f6af6ac9a4 100644 --- a/esapi/api.indices.simulate_template.go +++ b/esapi/api.indices.simulate_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.split.go b/esapi/api.indices.split.go index 27a59c0bf6..710049652e 100644 --- a/esapi/api.indices.split.go +++ b/esapi/api.indices.split.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.stats.go b/esapi/api.indices.stats.go index e48590147e..25691a8e21 100644 --- a/esapi/api.indices.stats.go +++ b/esapi/api.indices.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.update_aliases.go b/esapi/api.indices.update_aliases.go index 8a62abdf2c..a673afe5c7 100644 --- a/esapi/api.indices.update_aliases.go +++ b/esapi/api.indices.update_aliases.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.indices.validate_query.go b/esapi/api.indices.validate_query.go index 2410ac43c3..13bf4125c7 100644 --- a/esapi/api.indices.validate_query.go +++ b/esapi/api.indices.validate_query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.inference.delete.go b/esapi/api.inference.delete.go index 73828f2513..eacfc7ccde 100644 --- a/esapi/api.inference.delete.go +++ b/esapi/api.inference.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.inference.get.go b/esapi/api.inference.get.go index ceb1673d7f..8ea826fb75 100644 --- a/esapi/api.inference.get.go +++ b/esapi/api.inference.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.inference.inference.go b/esapi/api.inference.inference.go index 311a47ade7..3b60121b37 100644 --- a/esapi/api.inference.inference.go +++ b/esapi/api.inference.inference.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.inference.put.go b/esapi/api.inference.put.go index 7193a51065..61a71f3d58 100644 --- a/esapi/api.inference.put.go +++ b/esapi/api.inference.put.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.inference.stream_inference.go b/esapi/api.inference.stream_inference.go new file mode 100644 index 0000000000..9183613cc1 --- /dev/null +++ b/esapi/api.inference.stream_inference.go @@ -0,0 +1,259 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.17.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newInferenceStreamInferenceFunc(t Transport) InferenceStreamInference { + return func(inference_id string, o ...func(*InferenceStreamInferenceRequest)) (*Response, error) { + var r = InferenceStreamInferenceRequest{InferenceID: inference_id} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// InferenceStreamInference perform streaming inference +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/post-stream-inference-api.html. +type InferenceStreamInference func(inference_id string, o ...func(*InferenceStreamInferenceRequest)) (*Response, error) + +// InferenceStreamInferenceRequest configures the Inference Stream Inference API request. +type InferenceStreamInferenceRequest struct { + Body io.Reader + + InferenceID 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 InferenceStreamInferenceRequest) 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.stream_inference") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "POST" + + path.Grow(7 + 1 + len("_inference") + 1 + len(r.TaskType) + 1 + len(r.InferenceID) + 1 + len("_stream")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_inference") + if r.TaskType != "" { + 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.InferenceID) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "inference_id", r.InferenceID) + } + path.WriteString("/") + path.WriteString("_stream") + + 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.stream_inference") + if reader := instrument.RecordRequestBody(ctx, "inference.stream_inference", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.stream_inference") + } + 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 InferenceStreamInference) WithContext(v context.Context) func(*InferenceStreamInferenceRequest) { + return func(r *InferenceStreamInferenceRequest) { + r.ctx = v + } +} + +// WithBody - The inference payload. +func (f InferenceStreamInference) WithBody(v io.Reader) func(*InferenceStreamInferenceRequest) { + return func(r *InferenceStreamInferenceRequest) { + r.Body = v + } +} + +// WithTaskType - the task type. +func (f InferenceStreamInference) WithTaskType(v string) func(*InferenceStreamInferenceRequest) { + return func(r *InferenceStreamInferenceRequest) { + r.TaskType = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f InferenceStreamInference) WithPretty() func(*InferenceStreamInferenceRequest) { + return func(r *InferenceStreamInferenceRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f InferenceStreamInference) WithHuman() func(*InferenceStreamInferenceRequest) { + return func(r *InferenceStreamInferenceRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f InferenceStreamInference) WithErrorTrace() func(*InferenceStreamInferenceRequest) { + return func(r *InferenceStreamInferenceRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f InferenceStreamInference) WithFilterPath(v ...string) func(*InferenceStreamInferenceRequest) { + return func(r *InferenceStreamInferenceRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f InferenceStreamInference) WithHeader(h map[string]string) func(*InferenceStreamInferenceRequest) { + return func(r *InferenceStreamInferenceRequest) { + 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 InferenceStreamInference) WithOpaqueID(s string) func(*InferenceStreamInferenceRequest) { + return func(r *InferenceStreamInferenceRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.info.go b/esapi/api.info.go index 5ade00d083..09f4f4918c 100644 --- a/esapi/api.info.go +++ b/esapi/api.info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.ingest.delete_geoip_database.go b/esapi/api.ingest.delete_geoip_database.go index ec3bcdf2bf..f838bcc693 100644 --- a/esapi/api.ingest.delete_geoip_database.go +++ b/esapi/api.ingest.delete_geoip_database.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -45,7 +45,7 @@ func newIngestDeleteGeoipDatabaseFunc(t Transport) IngestDeleteGeoipDatabase { // IngestDeleteGeoipDatabase deletes a geoip database configuration // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-geoip-database-api.html. type IngestDeleteGeoipDatabase func(id []string, o ...func(*IngestDeleteGeoipDatabaseRequest)) (*Response, error) // IngestDeleteGeoipDatabaseRequest configures the Ingest Delete Geoip Database API request. diff --git a/esapi/api.ingest.delete_ip_location_database.go b/esapi/api.ingest.delete_ip_location_database.go new file mode 100644 index 0000000000..45208a6166 --- /dev/null +++ b/esapi/api.ingest.delete_ip_location_database.go @@ -0,0 +1,232 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.17.0: DO NOT EDIT + +package esapi + +import ( + "context" + "errors" + "net/http" + "strings" +) + +func newIngestDeleteIPLocationDatabaseFunc(t Transport) IngestDeleteIPLocationDatabase { + return func(id []string, o ...func(*IngestDeleteIPLocationDatabaseRequest)) (*Response, error) { + var r = IngestDeleteIPLocationDatabaseRequest{DocumentID: id} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IngestDeleteIPLocationDatabase deletes an ip location database configuration +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-ip-location-database-api.html. +type IngestDeleteIPLocationDatabase func(id []string, o ...func(*IngestDeleteIPLocationDatabaseRequest)) (*Response, error) + +// IngestDeleteIPLocationDatabaseRequest configures the Ingest DeleteIP Location Database API request. +type IngestDeleteIPLocationDatabaseRequest struct { + DocumentID []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 IngestDeleteIPLocationDatabaseRequest) 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, "ingest.delete_ip_location_database") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "DELETE" + + if len(r.DocumentID) == 0 { + return nil, errors.New("id is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_ingest") + 1 + len("ip_location") + 1 + len("database") + 1 + len(strings.Join(r.DocumentID, ","))) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_ingest") + path.WriteString("/") + path.WriteString("ip_location") + path.WriteString("/") + path.WriteString("database") + path.WriteString("/") + path.WriteString(strings.Join(r.DocumentID, ",")) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", strings.Join(r.DocumentID, ",")) + } + + params = make(map[string]string) + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "ingest.delete_ip_location_database") + } + res, err := transport.Perform(req) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "ingest.delete_ip_location_database") + } + 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 IngestDeleteIPLocationDatabase) WithContext(v context.Context) func(*IngestDeleteIPLocationDatabaseRequest) { + return func(r *IngestDeleteIPLocationDatabaseRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IngestDeleteIPLocationDatabase) WithPretty() func(*IngestDeleteIPLocationDatabaseRequest) { + return func(r *IngestDeleteIPLocationDatabaseRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IngestDeleteIPLocationDatabase) WithHuman() func(*IngestDeleteIPLocationDatabaseRequest) { + return func(r *IngestDeleteIPLocationDatabaseRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IngestDeleteIPLocationDatabase) WithErrorTrace() func(*IngestDeleteIPLocationDatabaseRequest) { + return func(r *IngestDeleteIPLocationDatabaseRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IngestDeleteIPLocationDatabase) WithFilterPath(v ...string) func(*IngestDeleteIPLocationDatabaseRequest) { + return func(r *IngestDeleteIPLocationDatabaseRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IngestDeleteIPLocationDatabase) WithHeader(h map[string]string) func(*IngestDeleteIPLocationDatabaseRequest) { + return func(r *IngestDeleteIPLocationDatabaseRequest) { + 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 IngestDeleteIPLocationDatabase) WithOpaqueID(s string) func(*IngestDeleteIPLocationDatabaseRequest) { + return func(r *IngestDeleteIPLocationDatabaseRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.ingest.delete_pipeline.go b/esapi/api.ingest.delete_pipeline.go index 77dd8c0489..dbbb52f60a 100644 --- a/esapi/api.ingest.delete_pipeline.go +++ b/esapi/api.ingest.delete_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.ingest.geo_ip_stats.go b/esapi/api.ingest.geo_ip_stats.go index 9165dec507..8a231c868f 100644 --- a/esapi/api.ingest.geo_ip_stats.go +++ b/esapi/api.ingest.geo_ip_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.ingest.get_geoip_database.go b/esapi/api.ingest.get_geoip_database.go index 30a981223a..7235c5e3c1 100644 --- a/esapi/api.ingest.get_geoip_database.go +++ b/esapi/api.ingest.get_geoip_database.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -44,7 +44,7 @@ func newIngestGetGeoipDatabaseFunc(t Transport) IngestGetGeoipDatabase { // IngestGetGeoipDatabase returns geoip database configuration. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-geoip-database-api.html. type IngestGetGeoipDatabase func(o ...func(*IngestGetGeoipDatabaseRequest)) (*Response, error) // IngestGetGeoipDatabaseRequest configures the Ingest Get Geoip Database API request. diff --git a/esapi/api.ingest.get_ip_location_database.go b/esapi/api.ingest.get_ip_location_database.go new file mode 100644 index 0000000000..a885fdf99f --- /dev/null +++ b/esapi/api.ingest.get_ip_location_database.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 specification version 8.17.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newIngestGetIPLocationDatabaseFunc(t Transport) IngestGetIPLocationDatabase { + return func(o ...func(*IngestGetIPLocationDatabaseRequest)) (*Response, error) { + var r = IngestGetIPLocationDatabaseRequest{} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IngestGetIPLocationDatabase returns the specified ip location database configuration +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-ip-location-database-api.html. +type IngestGetIPLocationDatabase func(o ...func(*IngestGetIPLocationDatabaseRequest)) (*Response, error) + +// IngestGetIPLocationDatabaseRequest configures the Ingest GetIP Location Database API request. +type IngestGetIPLocationDatabaseRequest struct { + DocumentID []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 IngestGetIPLocationDatabaseRequest) 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, "ingest.get_ip_location_database") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + path.Grow(7 + 1 + len("_ingest") + 1 + len("ip_location") + 1 + len("database") + 1 + len(strings.Join(r.DocumentID, ","))) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_ingest") + path.WriteString("/") + path.WriteString("ip_location") + path.WriteString("/") + path.WriteString("database") + if len(r.DocumentID) > 0 { + path.WriteString("/") + path.WriteString(strings.Join(r.DocumentID, ",")) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", strings.Join(r.DocumentID, ",")) + } + } + + params = make(map[string]string) + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "ingest.get_ip_location_database") + } + res, err := transport.Perform(req) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "ingest.get_ip_location_database") + } + 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 IngestGetIPLocationDatabase) WithContext(v context.Context) func(*IngestGetIPLocationDatabaseRequest) { + return func(r *IngestGetIPLocationDatabaseRequest) { + r.ctx = v + } +} + +// WithDocumentID - a list of ip location database configurations to get; use `*` to get all ip location database configurations. +func (f IngestGetIPLocationDatabase) WithDocumentID(v ...string) func(*IngestGetIPLocationDatabaseRequest) { + return func(r *IngestGetIPLocationDatabaseRequest) { + r.DocumentID = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IngestGetIPLocationDatabase) WithPretty() func(*IngestGetIPLocationDatabaseRequest) { + return func(r *IngestGetIPLocationDatabaseRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IngestGetIPLocationDatabase) WithHuman() func(*IngestGetIPLocationDatabaseRequest) { + return func(r *IngestGetIPLocationDatabaseRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IngestGetIPLocationDatabase) WithErrorTrace() func(*IngestGetIPLocationDatabaseRequest) { + return func(r *IngestGetIPLocationDatabaseRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IngestGetIPLocationDatabase) WithFilterPath(v ...string) func(*IngestGetIPLocationDatabaseRequest) { + return func(r *IngestGetIPLocationDatabaseRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IngestGetIPLocationDatabase) WithHeader(h map[string]string) func(*IngestGetIPLocationDatabaseRequest) { + return func(r *IngestGetIPLocationDatabaseRequest) { + 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 IngestGetIPLocationDatabase) WithOpaqueID(s string) func(*IngestGetIPLocationDatabaseRequest) { + return func(r *IngestGetIPLocationDatabaseRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.ingest.get_pipeline.go b/esapi/api.ingest.get_pipeline.go index 73e9727661..ca679bc038 100644 --- a/esapi/api.ingest.get_pipeline.go +++ b/esapi/api.ingest.get_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.ingest.processor_grok.go b/esapi/api.ingest.processor_grok.go index 809fef64c5..dd9c238a54 100644 --- a/esapi/api.ingest.processor_grok.go +++ b/esapi/api.ingest.processor_grok.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.ingest.put_geoip_database.go b/esapi/api.ingest.put_geoip_database.go index 4907c71d7d..8a783e1bf3 100644 --- a/esapi/api.ingest.put_geoip_database.go +++ b/esapi/api.ingest.put_geoip_database.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -45,7 +45,7 @@ func newIngestPutGeoipDatabaseFunc(t Transport) IngestPutGeoipDatabase { // IngestPutGeoipDatabase puts the configuration for a geoip database to be downloaded // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-geoip-database-api.html. type IngestPutGeoipDatabase func(id string, body io.Reader, o ...func(*IngestPutGeoipDatabaseRequest)) (*Response, error) // IngestPutGeoipDatabaseRequest configures the Ingest Put Geoip Database API request. diff --git a/esapi/api.ingest.put_ip_location_database.go b/esapi/api.ingest.put_ip_location_database.go new file mode 100644 index 0000000000..efce3f4eca --- /dev/null +++ b/esapi/api.ingest.put_ip_location_database.go @@ -0,0 +1,237 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.17.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newIngestPutIPLocationDatabaseFunc(t Transport) IngestPutIPLocationDatabase { + return func(id string, body io.Reader, o ...func(*IngestPutIPLocationDatabaseRequest)) (*Response, error) { + var r = IngestPutIPLocationDatabaseRequest{DocumentID: id, 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 ------------------------------------------------------- + +// IngestPutIPLocationDatabase puts the configuration for a ip location database to be downloaded +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-ip-location-database-api.html. +type IngestPutIPLocationDatabase func(id string, body io.Reader, o ...func(*IngestPutIPLocationDatabaseRequest)) (*Response, error) + +// IngestPutIPLocationDatabaseRequest configures the Ingest PutIP Location Database API request. +type IngestPutIPLocationDatabaseRequest struct { + DocumentID string + + Body io.Reader + + 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 IngestPutIPLocationDatabaseRequest) 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, "ingest.put_ip_location_database") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + path.Grow(7 + 1 + len("_ingest") + 1 + len("ip_location") + 1 + len("database") + 1 + len(r.DocumentID)) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_ingest") + path.WriteString("/") + path.WriteString("ip_location") + path.WriteString("/") + path.WriteString("database") + path.WriteString("/") + path.WriteString(r.DocumentID) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", r.DocumentID) + } + + 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, "ingest.put_ip_location_database") + if reader := instrument.RecordRequestBody(ctx, "ingest.put_ip_location_database", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "ingest.put_ip_location_database") + } + 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 IngestPutIPLocationDatabase) WithContext(v context.Context) func(*IngestPutIPLocationDatabaseRequest) { + return func(r *IngestPutIPLocationDatabaseRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IngestPutIPLocationDatabase) WithPretty() func(*IngestPutIPLocationDatabaseRequest) { + return func(r *IngestPutIPLocationDatabaseRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IngestPutIPLocationDatabase) WithHuman() func(*IngestPutIPLocationDatabaseRequest) { + return func(r *IngestPutIPLocationDatabaseRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IngestPutIPLocationDatabase) WithErrorTrace() func(*IngestPutIPLocationDatabaseRequest) { + return func(r *IngestPutIPLocationDatabaseRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IngestPutIPLocationDatabase) WithFilterPath(v ...string) func(*IngestPutIPLocationDatabaseRequest) { + return func(r *IngestPutIPLocationDatabaseRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IngestPutIPLocationDatabase) WithHeader(h map[string]string) func(*IngestPutIPLocationDatabaseRequest) { + return func(r *IngestPutIPLocationDatabaseRequest) { + 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 IngestPutIPLocationDatabase) WithOpaqueID(s string) func(*IngestPutIPLocationDatabaseRequest) { + return func(r *IngestPutIPLocationDatabaseRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.ingest.put_pipeline.go b/esapi/api.ingest.put_pipeline.go index 833b2cb50b..e56a5f6fa0 100644 --- a/esapi/api.ingest.put_pipeline.go +++ b/esapi/api.ingest.put_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.ingest.simulate.go b/esapi/api.ingest.simulate.go index 1ca53dc154..d7ab462b8d 100644 --- a/esapi/api.ingest.simulate.go +++ b/esapi/api.ingest.simulate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.knn_search.go b/esapi/api.knn_search.go index 71c2980cb8..e252fd33d4 100644 --- a/esapi/api.knn_search.go +++ b/esapi/api.knn_search.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.mget.go b/esapi/api.mget.go index 6a6990631a..a48366675e 100644 --- a/esapi/api.mget.go +++ b/esapi/api.mget.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.msearch.go b/esapi/api.msearch.go index 60308eb986..0a4a568db4 100644 --- a/esapi/api.msearch.go +++ b/esapi/api.msearch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.msearch_template.go b/esapi/api.msearch_template.go index 5a5cdb765d..b06dd3b4c3 100644 --- a/esapi/api.msearch_template.go +++ b/esapi/api.msearch_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.mtermvectors.go b/esapi/api.mtermvectors.go index 9bb3f2eb45..85dbc544d1 100644 --- a/esapi/api.mtermvectors.go +++ b/esapi/api.mtermvectors.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.nodes.clear_repositories_metering_archive.go b/esapi/api.nodes.clear_repositories_metering_archive.go index f9e4551e7f..bd99dfdb67 100644 --- a/esapi/api.nodes.clear_repositories_metering_archive.go +++ b/esapi/api.nodes.clear_repositories_metering_archive.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.nodes.get_repositories_metering_info.go b/esapi/api.nodes.get_repositories_metering_info.go index 2a6e7dc3d2..4729bcd376 100644 --- a/esapi/api.nodes.get_repositories_metering_info.go +++ b/esapi/api.nodes.get_repositories_metering_info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.nodes.hot_threads.go b/esapi/api.nodes.hot_threads.go index d2092113df..4056736aa0 100644 --- a/esapi/api.nodes.hot_threads.go +++ b/esapi/api.nodes.hot_threads.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.nodes.info.go b/esapi/api.nodes.info.go index 0bf18f5e02..147ccd36ab 100644 --- a/esapi/api.nodes.info.go +++ b/esapi/api.nodes.info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.nodes.reload_secure_settings.go b/esapi/api.nodes.reload_secure_settings.go index 591c966cfc..97cc1f3cb5 100644 --- a/esapi/api.nodes.reload_secure_settings.go +++ b/esapi/api.nodes.reload_secure_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.nodes.stats.go b/esapi/api.nodes.stats.go index a256c094a6..a7cd4fbdf3 100644 --- a/esapi/api.nodes.stats.go +++ b/esapi/api.nodes.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.nodes.usage.go b/esapi/api.nodes.usage.go index 0a589f062d..0a71cbeb68 100644 --- a/esapi/api.nodes.usage.go +++ b/esapi/api.nodes.usage.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.ping.go b/esapi/api.ping.go index 1e4397a5a2..274feca6c1 100644 --- a/esapi/api.ping.go +++ b/esapi/api.ping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.profiling.stacktraces.go b/esapi/api.profiling.stacktraces.go index 9cdafeec3a..f221866b28 100644 --- a/esapi/api.profiling.stacktraces.go +++ b/esapi/api.profiling.stacktraces.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.profiling.status.go b/esapi/api.profiling.status.go index 9441d9b872..8f4c2fb753 100644 --- a/esapi/api.profiling.status.go +++ b/esapi/api.profiling.status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.profiling.topn_functions.go b/esapi/api.profiling.topn_functions.go index 3287a1e994..aa2446712c 100644 --- a/esapi/api.profiling.topn_functions.go +++ b/esapi/api.profiling.topn_functions.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.put_script.go b/esapi/api.put_script.go index bc6ba719af..278a894394 100644 --- a/esapi/api.put_script.go +++ b/esapi/api.put_script.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.query_rules.delete_rule.go b/esapi/api.query_rules.delete_rule.go index ab1dc71fec..02a0f78e0f 100644 --- a/esapi/api.query_rules.delete_rule.go +++ b/esapi/api.query_rules.delete_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.query_rules.delete_ruleset.go b/esapi/api.query_rules.delete_ruleset.go index 45dd5843ee..8e05da04f5 100644 --- a/esapi/api.query_rules.delete_ruleset.go +++ b/esapi/api.query_rules.delete_ruleset.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.query_rules.get_rule.go b/esapi/api.query_rules.get_rule.go index fb5518a615..8fe430d07a 100644 --- a/esapi/api.query_rules.get_rule.go +++ b/esapi/api.query_rules.get_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.query_rules.get_ruleset.go b/esapi/api.query_rules.get_ruleset.go index 8ac5f6b6d2..094c7dfd9b 100644 --- a/esapi/api.query_rules.get_ruleset.go +++ b/esapi/api.query_rules.get_ruleset.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.query_rules.list_rulesets.go b/esapi/api.query_rules.list_rulesets.go index d21e4d6cae..f29e377b85 100644 --- a/esapi/api.query_rules.list_rulesets.go +++ b/esapi/api.query_rules.list_rulesets.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.query_rules.put_rule.go b/esapi/api.query_rules.put_rule.go index 3492271068..1bf00e6ea8 100644 --- a/esapi/api.query_rules.put_rule.go +++ b/esapi/api.query_rules.put_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.query_rules.put_ruleset.go b/esapi/api.query_rules.put_ruleset.go index a171e4cca7..b6ca121d8b 100644 --- a/esapi/api.query_rules.put_ruleset.go +++ b/esapi/api.query_rules.put_ruleset.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.query_rules.test.go b/esapi/api.query_rules.test.go new file mode 100644 index 0000000000..36d6598d65 --- /dev/null +++ b/esapi/api.query_rules.test.go @@ -0,0 +1,237 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.17.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newQueryRulesTestFunc(t Transport) QueryRulesTest { + return func(body io.Reader, ruleset_id string, o ...func(*QueryRulesTestRequest)) (*Response, error) { + var r = QueryRulesTestRequest{Body: body, RulesetID: ruleset_id} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// QueryRulesTest tests a query ruleset to identify the rules that would match input criteria +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/test-query-ruleset.html. +type QueryRulesTest func(body io.Reader, ruleset_id string, o ...func(*QueryRulesTestRequest)) (*Response, error) + +// QueryRulesTestRequest configures the Query Rules Test API request. +type QueryRulesTestRequest struct { + Body io.Reader + + RulesetID 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 QueryRulesTestRequest) 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, "query_rules.test") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "POST" + + path.Grow(7 + 1 + len("_query_rules") + 1 + len(r.RulesetID) + 1 + len("_test")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_query_rules") + path.WriteString("/") + path.WriteString(r.RulesetID) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "ruleset_id", r.RulesetID) + } + path.WriteString("/") + path.WriteString("_test") + + 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, "query_rules.test") + if reader := instrument.RecordRequestBody(ctx, "query_rules.test", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "query_rules.test") + } + 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 QueryRulesTest) WithContext(v context.Context) func(*QueryRulesTestRequest) { + return func(r *QueryRulesTestRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f QueryRulesTest) WithPretty() func(*QueryRulesTestRequest) { + return func(r *QueryRulesTestRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f QueryRulesTest) WithHuman() func(*QueryRulesTestRequest) { + return func(r *QueryRulesTestRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f QueryRulesTest) WithErrorTrace() func(*QueryRulesTestRequest) { + return func(r *QueryRulesTestRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f QueryRulesTest) WithFilterPath(v ...string) func(*QueryRulesTestRequest) { + return func(r *QueryRulesTestRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f QueryRulesTest) WithHeader(h map[string]string) func(*QueryRulesTestRequest) { + return func(r *QueryRulesTestRequest) { + 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 QueryRulesTest) WithOpaqueID(s string) func(*QueryRulesTestRequest) { + return func(r *QueryRulesTestRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.rank_eval.go b/esapi/api.rank_eval.go index 5aef194437..a7ddfda3f5 100644 --- a/esapi/api.rank_eval.go +++ b/esapi/api.rank_eval.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.reindex.go b/esapi/api.reindex.go index 9a8e9d8eb5..14a4ac8136 100644 --- a/esapi/api.reindex.go +++ b/esapi/api.reindex.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.reindex_rethrottle.go b/esapi/api.reindex_rethrottle.go index 7d36716df0..373d0e5ba1 100644 --- a/esapi/api.reindex_rethrottle.go +++ b/esapi/api.reindex_rethrottle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.render_search_template.go b/esapi/api.render_search_template.go index 0d6b0ae027..d124ebc489 100644 --- a/esapi/api.render_search_template.go +++ b/esapi/api.render_search_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.scripts_painless_execute.go b/esapi/api.scripts_painless_execute.go index bef9a22ffb..67aabd4a10 100644 --- a/esapi/api.scripts_painless_execute.go +++ b/esapi/api.scripts_painless_execute.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.scroll.go b/esapi/api.scroll.go index 52cc8aca0d..fe663c9fc8 100644 --- a/esapi/api.scroll.go +++ b/esapi/api.scroll.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search.go b/esapi/api.search.go index 3c93cd5e58..b3f5c18c16 100644 --- a/esapi/api.search.go +++ b/esapi/api.search.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_application.delete.go b/esapi/api.search_application.delete.go index a36a2cd170..c0df2d1ff4 100644 --- a/esapi/api.search_application.delete.go +++ b/esapi/api.search_application.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_application.delete_behavioral_analytics.go b/esapi/api.search_application.delete_behavioral_analytics.go index 61a8c9055b..139e291759 100644 --- a/esapi/api.search_application.delete_behavioral_analytics.go +++ b/esapi/api.search_application.delete_behavioral_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_application.get.go b/esapi/api.search_application.get.go index 478c96e5f0..a91b5f65c2 100644 --- a/esapi/api.search_application.get.go +++ b/esapi/api.search_application.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_application.get_behavioral_analytics.go b/esapi/api.search_application.get_behavioral_analytics.go index da881ea819..b37b9cf0c4 100644 --- a/esapi/api.search_application.get_behavioral_analytics.go +++ b/esapi/api.search_application.get_behavioral_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_application.list.go b/esapi/api.search_application.list.go index 8caa449804..e779697d53 100644 --- a/esapi/api.search_application.list.go +++ b/esapi/api.search_application.list.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_application.post_behavioral_analytics_event.go b/esapi/api.search_application.post_behavioral_analytics_event.go index 1f58229eab..3b13a03e03 100644 --- a/esapi/api.search_application.post_behavioral_analytics_event.go +++ b/esapi/api.search_application.post_behavioral_analytics_event.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_application.put.go b/esapi/api.search_application.put.go index 1f100d03a8..38728d15b1 100644 --- a/esapi/api.search_application.put.go +++ b/esapi/api.search_application.put.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_application.put_behavioral_analytics.go b/esapi/api.search_application.put_behavioral_analytics.go index 9b7ff92754..79af79c04a 100644 --- a/esapi/api.search_application.put_behavioral_analytics.go +++ b/esapi/api.search_application.put_behavioral_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_application.render_query.go b/esapi/api.search_application.render_query.go index 817eca1b16..68e127e8d9 100644 --- a/esapi/api.search_application.render_query.go +++ b/esapi/api.search_application.render_query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_application.search.go b/esapi/api.search_application.search.go index 4b19fa834c..d27f144f18 100644 --- a/esapi/api.search_application.search.go +++ b/esapi/api.search_application.search.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_mvt.go b/esapi/api.search_mvt.go index 055fe7ba9b..d1842ce726 100644 --- a/esapi/api.search_mvt.go +++ b/esapi/api.search_mvt.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_shards.go b/esapi/api.search_shards.go index 8e2dd573ff..7131dd9323 100644 --- a/esapi/api.search_shards.go +++ b/esapi/api.search_shards.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.search_template.go b/esapi/api.search_template.go index b2beeaa0f1..669bcbac50 100644 --- a/esapi/api.search_template.go +++ b/esapi/api.search_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.shutdown.delete_node.go b/esapi/api.shutdown.delete_node.go index 4e7306a09c..15d8e3eaa8 100644 --- a/esapi/api.shutdown.delete_node.go +++ b/esapi/api.shutdown.delete_node.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.shutdown.get_node.go b/esapi/api.shutdown.get_node.go index 10706afac3..fcd36ca318 100644 --- a/esapi/api.shutdown.get_node.go +++ b/esapi/api.shutdown.get_node.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.shutdown.put_node.go b/esapi/api.shutdown.put_node.go index 779427b6d6..cd66b034b1 100644 --- a/esapi/api.shutdown.put_node.go +++ b/esapi/api.shutdown.put_node.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.simulate.ingest.go b/esapi/api.simulate.ingest.go index 47c58fc696..923780ec4c 100644 --- a/esapi/api.simulate.ingest.go +++ b/esapi/api.simulate.ingest.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.cleanup_repository.go b/esapi/api.snapshot.cleanup_repository.go index fe72c15be2..110264831b 100644 --- a/esapi/api.snapshot.cleanup_repository.go +++ b/esapi/api.snapshot.cleanup_repository.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.clone.go b/esapi/api.snapshot.clone.go index 8526d2e663..0e91f639d6 100644 --- a/esapi/api.snapshot.clone.go +++ b/esapi/api.snapshot.clone.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.create.go b/esapi/api.snapshot.create.go index 4f316f5030..26a52fd765 100644 --- a/esapi/api.snapshot.create.go +++ b/esapi/api.snapshot.create.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.create_repository.go b/esapi/api.snapshot.create_repository.go index 7506d05f29..222b096a29 100644 --- a/esapi/api.snapshot.create_repository.go +++ b/esapi/api.snapshot.create_repository.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.delete.go b/esapi/api.snapshot.delete.go index 0beff6ce2e..df69bd493e 100644 --- a/esapi/api.snapshot.delete.go +++ b/esapi/api.snapshot.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.delete_repository.go b/esapi/api.snapshot.delete_repository.go index 46e262e8f6..2015067611 100644 --- a/esapi/api.snapshot.delete_repository.go +++ b/esapi/api.snapshot.delete_repository.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.get.go b/esapi/api.snapshot.get.go index a5a1d42656..b9e200690a 100644 --- a/esapi/api.snapshot.get.go +++ b/esapi/api.snapshot.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.get_repository.go b/esapi/api.snapshot.get_repository.go index f52cf023b9..2797ac7d4a 100644 --- a/esapi/api.snapshot.get_repository.go +++ b/esapi/api.snapshot.get_repository.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.repository_analyze.go b/esapi/api.snapshot.repository_analyze.go index cc958fe3a8..51e3802c73 100644 --- a/esapi/api.snapshot.repository_analyze.go +++ b/esapi/api.snapshot.repository_analyze.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.repository_verify_integrity.go b/esapi/api.snapshot.repository_verify_integrity.go new file mode 100644 index 0000000000..c35c015105 --- /dev/null +++ b/esapi/api.snapshot.repository_verify_integrity.go @@ -0,0 +1,325 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.17.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" +) + +func newSnapshotRepositoryVerifyIntegrityFunc(t Transport) SnapshotRepositoryVerifyIntegrity { + return func(repository string, o ...func(*SnapshotRepositoryVerifyIntegrityRequest)) (*Response, error) { + var r = SnapshotRepositoryVerifyIntegrityRequest{Repository: repository} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SnapshotRepositoryVerifyIntegrity verifies the integrity of the contents of a snapshot repository +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +type SnapshotRepositoryVerifyIntegrity func(repository string, o ...func(*SnapshotRepositoryVerifyIntegrityRequest)) (*Response, error) + +// SnapshotRepositoryVerifyIntegrityRequest configures the Snapshot Repository Verify Integrity API request. +type SnapshotRepositoryVerifyIntegrityRequest struct { + Repository string + + BlobThreadPoolConcurrency *int + IndexSnapshotVerificationConcurrency *int + IndexVerificationConcurrency *int + MaxBytesPerSec string + MaxFailedShardSnapshots *int + MetaThreadPoolConcurrency *int + SnapshotVerificationConcurrency *int + VerifyBlobContents *bool + + 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 SnapshotRepositoryVerifyIntegrityRequest) 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, "snapshot.repository_verify_integrity") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "POST" + + path.Grow(7 + 1 + len("_snapshot") + 1 + len(r.Repository) + 1 + len("_verify_integrity")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_snapshot") + path.WriteString("/") + path.WriteString(r.Repository) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "repository", r.Repository) + } + path.WriteString("/") + path.WriteString("_verify_integrity") + + params = make(map[string]string) + + if r.BlobThreadPoolConcurrency != nil { + params["blob_thread_pool_concurrency"] = strconv.FormatInt(int64(*r.BlobThreadPoolConcurrency), 10) + } + + if r.IndexSnapshotVerificationConcurrency != nil { + params["index_snapshot_verification_concurrency"] = strconv.FormatInt(int64(*r.IndexSnapshotVerificationConcurrency), 10) + } + + if r.IndexVerificationConcurrency != nil { + params["index_verification_concurrency"] = strconv.FormatInt(int64(*r.IndexVerificationConcurrency), 10) + } + + if r.MaxBytesPerSec != "" { + params["max_bytes_per_sec"] = r.MaxBytesPerSec + } + + if r.MaxFailedShardSnapshots != nil { + params["max_failed_shard_snapshots"] = strconv.FormatInt(int64(*r.MaxFailedShardSnapshots), 10) + } + + if r.MetaThreadPoolConcurrency != nil { + params["meta_thread_pool_concurrency"] = strconv.FormatInt(int64(*r.MetaThreadPoolConcurrency), 10) + } + + if r.SnapshotVerificationConcurrency != nil { + params["snapshot_verification_concurrency"] = strconv.FormatInt(int64(*r.SnapshotVerificationConcurrency), 10) + } + + if r.VerifyBlobContents != nil { + params["verify_blob_contents"] = strconv.FormatBool(*r.VerifyBlobContents) + } + + 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, "snapshot.repository_verify_integrity") + } + res, err := transport.Perform(req) + if instrument, ok := r.instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "snapshot.repository_verify_integrity") + } + 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 SnapshotRepositoryVerifyIntegrity) WithContext(v context.Context) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.ctx = v + } +} + +// WithBlobThreadPoolConcurrency - number of threads to use for reading blob contents. +func (f SnapshotRepositoryVerifyIntegrity) WithBlobThreadPoolConcurrency(v int) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.BlobThreadPoolConcurrency = &v + } +} + +// WithIndexSnapshotVerificationConcurrency - number of snapshots to verify concurrently within each index. +func (f SnapshotRepositoryVerifyIntegrity) WithIndexSnapshotVerificationConcurrency(v int) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.IndexSnapshotVerificationConcurrency = &v + } +} + +// WithIndexVerificationConcurrency - number of indices to verify concurrently. +func (f SnapshotRepositoryVerifyIntegrity) WithIndexVerificationConcurrency(v int) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.IndexVerificationConcurrency = &v + } +} + +// WithMaxBytesPerSec - rate limit for individual blob verification. +func (f SnapshotRepositoryVerifyIntegrity) WithMaxBytesPerSec(v string) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.MaxBytesPerSec = v + } +} + +// WithMaxFailedShardSnapshots - maximum permitted number of failed shard snapshots. +func (f SnapshotRepositoryVerifyIntegrity) WithMaxFailedShardSnapshots(v int) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.MaxFailedShardSnapshots = &v + } +} + +// WithMetaThreadPoolConcurrency - number of threads to use for reading metadata. +func (f SnapshotRepositoryVerifyIntegrity) WithMetaThreadPoolConcurrency(v int) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.MetaThreadPoolConcurrency = &v + } +} + +// WithSnapshotVerificationConcurrency - number of snapshots to verify concurrently. +func (f SnapshotRepositoryVerifyIntegrity) WithSnapshotVerificationConcurrency(v int) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.SnapshotVerificationConcurrency = &v + } +} + +// WithVerifyBlobContents - whether to verify the contents of individual blobs. +func (f SnapshotRepositoryVerifyIntegrity) WithVerifyBlobContents(v bool) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.VerifyBlobContents = &v + } +} + +// WithPretty makes the response body pretty-printed. +func (f SnapshotRepositoryVerifyIntegrity) WithPretty() func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f SnapshotRepositoryVerifyIntegrity) WithHuman() func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f SnapshotRepositoryVerifyIntegrity) WithErrorTrace() func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f SnapshotRepositoryVerifyIntegrity) WithFilterPath(v ...string) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f SnapshotRepositoryVerifyIntegrity) WithHeader(h map[string]string) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + 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 SnapshotRepositoryVerifyIntegrity) WithOpaqueID(s string) func(*SnapshotRepositoryVerifyIntegrityRequest) { + return func(r *SnapshotRepositoryVerifyIntegrityRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.snapshot.restore.go b/esapi/api.snapshot.restore.go index ca4234a819..6f4626fe3f 100644 --- a/esapi/api.snapshot.restore.go +++ b/esapi/api.snapshot.restore.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.status.go b/esapi/api.snapshot.status.go index fcee081d9d..f294216a19 100644 --- a/esapi/api.snapshot.status.go +++ b/esapi/api.snapshot.status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.snapshot.verify_repository.go b/esapi/api.snapshot.verify_repository.go index c0919673b0..b45ac72635 100644 --- a/esapi/api.snapshot.verify_repository.go +++ b/esapi/api.snapshot.verify_repository.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.synonyms.delete_synonym.go b/esapi/api.synonyms.delete_synonym.go index 6f2eb72d4d..61d6e87a26 100644 --- a/esapi/api.synonyms.delete_synonym.go +++ b/esapi/api.synonyms.delete_synonym.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.synonyms.delete_synonym_rule.go b/esapi/api.synonyms.delete_synonym_rule.go index 390122712b..e1579f2580 100644 --- a/esapi/api.synonyms.delete_synonym_rule.go +++ b/esapi/api.synonyms.delete_synonym_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.synonyms.get_synonym.go b/esapi/api.synonyms.get_synonym.go index 05f4fec4bc..69c1d6ade6 100644 --- a/esapi/api.synonyms.get_synonym.go +++ b/esapi/api.synonyms.get_synonym.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.synonyms.get_synonym_rule.go b/esapi/api.synonyms.get_synonym_rule.go index c9225d981e..acd0ea38d1 100644 --- a/esapi/api.synonyms.get_synonym_rule.go +++ b/esapi/api.synonyms.get_synonym_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.synonyms.get_synonyms_sets.go b/esapi/api.synonyms.get_synonyms_sets.go index f0b21a02f1..6b2e6d317a 100644 --- a/esapi/api.synonyms.get_synonyms_sets.go +++ b/esapi/api.synonyms.get_synonyms_sets.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.synonyms.put_synonym.go b/esapi/api.synonyms.put_synonym.go index 4ec9236325..ed1b6ed2a0 100644 --- a/esapi/api.synonyms.put_synonym.go +++ b/esapi/api.synonyms.put_synonym.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.synonyms.put_synonym_rule.go b/esapi/api.synonyms.put_synonym_rule.go index 6645dc37a9..7911b1b0b0 100644 --- a/esapi/api.synonyms.put_synonym_rule.go +++ b/esapi/api.synonyms.put_synonym_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.tasks.cancel.go b/esapi/api.tasks.cancel.go index 0af16f51cc..32732e71e9 100644 --- a/esapi/api.tasks.cancel.go +++ b/esapi/api.tasks.cancel.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.tasks.get.go b/esapi/api.tasks.get.go index a32f48ca4f..9016e781f2 100644 --- a/esapi/api.tasks.get.go +++ b/esapi/api.tasks.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.tasks.list.go b/esapi/api.tasks.list.go index 944bdd752d..c4b19b911b 100644 --- a/esapi/api.tasks.list.go +++ b/esapi/api.tasks.list.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.terms_enum.go b/esapi/api.terms_enum.go index f244464c90..b010622062 100644 --- a/esapi/api.terms_enum.go +++ b/esapi/api.terms_enum.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.termvectors.go b/esapi/api.termvectors.go index 1ff91335f9..04d5bd12ad 100644 --- a/esapi/api.termvectors.go +++ b/esapi/api.termvectors.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.update.go b/esapi/api.update.go index 2ace2ab3de..d7f863e7f0 100644 --- a/esapi/api.update.go +++ b/esapi/api.update.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.update_by_query.go b/esapi/api.update_by_query.go index 204e8f988e..92116efc3f 100644 --- a/esapi/api.update_by_query.go +++ b/esapi/api.update_by_query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.update_by_query_rethrottle.go b/esapi/api.update_by_query_rethrottle.go index bd2a4e808c..ed4564f504 100644 --- a/esapi/api.update_by_query_rethrottle.go +++ b/esapi/api.update_by_query_rethrottle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.async_search.delete.go b/esapi/api.xpack.async_search.delete.go index 13b0b4ad04..fdba9614d9 100644 --- a/esapi/api.xpack.async_search.delete.go +++ b/esapi/api.xpack.async_search.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.async_search.get.go b/esapi/api.xpack.async_search.get.go index 20d89af457..bceef2e693 100644 --- a/esapi/api.xpack.async_search.get.go +++ b/esapi/api.xpack.async_search.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.async_search.status.go b/esapi/api.xpack.async_search.status.go index 42c903652f..d6f54cc346 100644 --- a/esapi/api.xpack.async_search.status.go +++ b/esapi/api.xpack.async_search.status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.async_search.submit.go b/esapi/api.xpack.async_search.submit.go index c04014c0f8..e7d1724732 100644 --- a/esapi/api.xpack.async_search.submit.go +++ b/esapi/api.xpack.async_search.submit.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -62,6 +62,7 @@ type AsyncSearchSubmitRequest struct { Analyzer string AnalyzeWildcard *bool BatchedReduceSize *int + CcsMinimizeRoundtrips *bool DefaultOperator string Df string DocvalueFields []string @@ -70,13 +71,13 @@ type AsyncSearchSubmitRequest struct { From *int IgnoreThrottled *bool IgnoreUnavailable *bool - KeepAlive time.Duration KeepOnCompletion *bool Lenient *bool MaxConcurrentShardRequests *int Preference string Query string RequestCache *bool + RestTotalHitsAsInt *bool Routing []string SearchType string SeqNoPrimaryTerm *bool @@ -164,6 +165,10 @@ func (r AsyncSearchSubmitRequest) Do(providedCtx context.Context, transport Tran params["batched_reduce_size"] = strconv.FormatInt(int64(*r.BatchedReduceSize), 10) } + if r.CcsMinimizeRoundtrips != nil { + params["ccs_minimize_roundtrips"] = strconv.FormatBool(*r.CcsMinimizeRoundtrips) + } + if r.DefaultOperator != "" { params["default_operator"] = r.DefaultOperator } @@ -196,10 +201,6 @@ func (r AsyncSearchSubmitRequest) Do(providedCtx context.Context, transport Tran params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) } - if r.KeepAlive != 0 { - params["keep_alive"] = formatDuration(r.KeepAlive) - } - if r.KeepOnCompletion != nil { params["keep_on_completion"] = strconv.FormatBool(*r.KeepOnCompletion) } @@ -224,6 +225,10 @@ func (r AsyncSearchSubmitRequest) Do(providedCtx context.Context, transport Tran params["request_cache"] = strconv.FormatBool(*r.RequestCache) } + if r.RestTotalHitsAsInt != nil { + params["rest_total_hits_as_int"] = strconv.FormatBool(*r.RestTotalHitsAsInt) + } + if len(r.Routing) > 0 { params["routing"] = strings.Join(r.Routing, ",") } @@ -442,6 +447,13 @@ func (f AsyncSearchSubmit) WithBatchedReduceSize(v int) func(*AsyncSearchSubmitR } } +// WithCcsMinimizeRoundtrips - when doing a cross-cluster search, setting it to true may improve overall search latency, particularly when searching clusters with a large number of shards. however, when set to true, the progress of searches on the remote clusters will not be received until the search finishes on all clusters.. +func (f AsyncSearchSubmit) WithCcsMinimizeRoundtrips(v bool) func(*AsyncSearchSubmitRequest) { + return func(r *AsyncSearchSubmitRequest) { + r.CcsMinimizeRoundtrips = &v + } +} + // WithDefaultOperator - the default operator for query string query (and or or). func (f AsyncSearchSubmit) WithDefaultOperator(v string) func(*AsyncSearchSubmitRequest) { return func(r *AsyncSearchSubmitRequest) { @@ -498,13 +510,6 @@ func (f AsyncSearchSubmit) WithIgnoreUnavailable(v bool) func(*AsyncSearchSubmit } } -// WithKeepAlive - update the time interval in which the results (partial or final) for this search will be available. -func (f AsyncSearchSubmit) WithKeepAlive(v time.Duration) func(*AsyncSearchSubmitRequest) { - return func(r *AsyncSearchSubmitRequest) { - r.KeepAlive = v - } -} - // WithKeepOnCompletion - control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false). func (f AsyncSearchSubmit) WithKeepOnCompletion(v bool) func(*AsyncSearchSubmitRequest) { return func(r *AsyncSearchSubmitRequest) { @@ -547,6 +552,13 @@ func (f AsyncSearchSubmit) WithRequestCache(v bool) func(*AsyncSearchSubmitReque } } +// WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response. +func (f AsyncSearchSubmit) WithRestTotalHitsAsInt(v bool) func(*AsyncSearchSubmitRequest) { + return func(r *AsyncSearchSubmitRequest) { + r.RestTotalHitsAsInt = &v + } +} + // WithRouting - a list of specific routing values. func (f AsyncSearchSubmit) WithRouting(v ...string) func(*AsyncSearchSubmitRequest) { return func(r *AsyncSearchSubmitRequest) { diff --git a/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go b/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go index a1045820ce..062cf89a06 100644 --- a/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go +++ b/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go b/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go index 0ed535ad36..d0c7a6d9b7 100644 --- a/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go +++ b/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.autoscaling.get_autoscaling_policy.go b/esapi/api.xpack.autoscaling.get_autoscaling_policy.go index 050f7ec064..65f71bc80b 100644 --- a/esapi/api.xpack.autoscaling.get_autoscaling_policy.go +++ b/esapi/api.xpack.autoscaling.get_autoscaling_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.autoscaling.put_autoscaling_policy.go b/esapi/api.xpack.autoscaling.put_autoscaling_policy.go index e16d51dcab..6f98227830 100644 --- a/esapi/api.xpack.autoscaling.put_autoscaling_policy.go +++ b/esapi/api.xpack.autoscaling.put_autoscaling_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.cat.ml_data_frame_analytics.go b/esapi/api.xpack.cat.ml_data_frame_analytics.go index 4de4da7d2c..2fb9800671 100644 --- a/esapi/api.xpack.cat.ml_data_frame_analytics.go +++ b/esapi/api.xpack.cat.ml_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.cat.ml_datafeeds.go b/esapi/api.xpack.cat.ml_datafeeds.go index 42fa88dee0..8fd04bd8f7 100644 --- a/esapi/api.xpack.cat.ml_datafeeds.go +++ b/esapi/api.xpack.cat.ml_datafeeds.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.cat.ml_jobs.go b/esapi/api.xpack.cat.ml_jobs.go index 4806a3b0f4..98c5e2fc82 100644 --- a/esapi/api.xpack.cat.ml_jobs.go +++ b/esapi/api.xpack.cat.ml_jobs.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.cat.ml_trained_models.go b/esapi/api.xpack.cat.ml_trained_models.go index b540c68315..e80e16a678 100644 --- a/esapi/api.xpack.cat.ml_trained_models.go +++ b/esapi/api.xpack.cat.ml_trained_models.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.cat.transforms.go b/esapi/api.xpack.cat.transforms.go index cf0ce6d972..d17698bd39 100644 --- a/esapi/api.xpack.cat.transforms.go +++ b/esapi/api.xpack.cat.transforms.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.delete_auto_follow_pattern.go b/esapi/api.xpack.ccr.delete_auto_follow_pattern.go index aeebabaea0..7322e887a6 100644 --- a/esapi/api.xpack.ccr.delete_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.delete_auto_follow_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.follow.go b/esapi/api.xpack.ccr.follow.go index 5ea0cae439..b4d7aafe55 100644 --- a/esapi/api.xpack.ccr.follow.go +++ b/esapi/api.xpack.ccr.follow.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.follow_info.go b/esapi/api.xpack.ccr.follow_info.go index 6e281fea18..6a87ca2f5a 100644 --- a/esapi/api.xpack.ccr.follow_info.go +++ b/esapi/api.xpack.ccr.follow_info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.follow_stats.go b/esapi/api.xpack.ccr.follow_stats.go index 17d20f6a9e..a89c16dd50 100644 --- a/esapi/api.xpack.ccr.follow_stats.go +++ b/esapi/api.xpack.ccr.follow_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.forget_follower.go b/esapi/api.xpack.ccr.forget_follower.go index 13ae28fb8e..b7e9833709 100644 --- a/esapi/api.xpack.ccr.forget_follower.go +++ b/esapi/api.xpack.ccr.forget_follower.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.get_auto_follow_pattern.go b/esapi/api.xpack.ccr.get_auto_follow_pattern.go index 9d0e575a5e..dac0aca6aa 100644 --- a/esapi/api.xpack.ccr.get_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.get_auto_follow_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.pause_auto_follow_pattern.go b/esapi/api.xpack.ccr.pause_auto_follow_pattern.go index 2874991d9c..e236036777 100644 --- a/esapi/api.xpack.ccr.pause_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.pause_auto_follow_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.pause_follow.go b/esapi/api.xpack.ccr.pause_follow.go index bf2018ea40..c8cd5905d2 100644 --- a/esapi/api.xpack.ccr.pause_follow.go +++ b/esapi/api.xpack.ccr.pause_follow.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.put_auto_follow_pattern.go b/esapi/api.xpack.ccr.put_auto_follow_pattern.go index aaaf1eb0ae..b77358dacb 100644 --- a/esapi/api.xpack.ccr.put_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.put_auto_follow_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.resume_auto_follow_pattern.go b/esapi/api.xpack.ccr.resume_auto_follow_pattern.go index b00bd3da24..fef748d847 100644 --- a/esapi/api.xpack.ccr.resume_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.resume_auto_follow_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.resume_follow.go b/esapi/api.xpack.ccr.resume_follow.go index 5daa658bee..a2aad699f8 100644 --- a/esapi/api.xpack.ccr.resume_follow.go +++ b/esapi/api.xpack.ccr.resume_follow.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.stats.go b/esapi/api.xpack.ccr.stats.go index f64c68f070..133df4157f 100644 --- a/esapi/api.xpack.ccr.stats.go +++ b/esapi/api.xpack.ccr.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ccr.unfollow.go b/esapi/api.xpack.ccr.unfollow.go index 10b44195bd..abe85fd772 100644 --- a/esapi/api.xpack.ccr.unfollow.go +++ b/esapi/api.xpack.ccr.unfollow.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.close_point_in_time.go b/esapi/api.xpack.close_point_in_time.go index 7946091da1..58a6e9f1ff 100644 --- a/esapi/api.xpack.close_point_in_time.go +++ b/esapi/api.xpack.close_point_in_time.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.enrich.delete_policy.go b/esapi/api.xpack.enrich.delete_policy.go index fd28aa72e0..be4f3e7622 100644 --- a/esapi/api.xpack.enrich.delete_policy.go +++ b/esapi/api.xpack.enrich.delete_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.enrich.execute_policy.go b/esapi/api.xpack.enrich.execute_policy.go index 946e53fb7c..b78ea55bfd 100644 --- a/esapi/api.xpack.enrich.execute_policy.go +++ b/esapi/api.xpack.enrich.execute_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.enrich.get_policy.go b/esapi/api.xpack.enrich.get_policy.go index f19dba4982..6eba404341 100644 --- a/esapi/api.xpack.enrich.get_policy.go +++ b/esapi/api.xpack.enrich.get_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.enrich.put_policy.go b/esapi/api.xpack.enrich.put_policy.go index 4003185845..72efee4e86 100644 --- a/esapi/api.xpack.enrich.put_policy.go +++ b/esapi/api.xpack.enrich.put_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.enrich.stats.go b/esapi/api.xpack.enrich.stats.go index fa1476a17c..cb89908032 100644 --- a/esapi/api.xpack.enrich.stats.go +++ b/esapi/api.xpack.enrich.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.eql.delete.go b/esapi/api.xpack.eql.delete.go index 1d56a0fe98..dee5c974bb 100644 --- a/esapi/api.xpack.eql.delete.go +++ b/esapi/api.xpack.eql.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.eql.get.go b/esapi/api.xpack.eql.get.go index 983bbe6162..24fd8c6ef2 100644 --- a/esapi/api.xpack.eql.get.go +++ b/esapi/api.xpack.eql.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.eql.get_status.go b/esapi/api.xpack.eql.get_status.go index 6263993aa7..8259c7182e 100644 --- a/esapi/api.xpack.eql.get_status.go +++ b/esapi/api.xpack.eql.get_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.eql.search.go b/esapi/api.xpack.eql.search.go index 4637a11cbd..9c16b94b48 100644 --- a/esapi/api.xpack.eql.search.go +++ b/esapi/api.xpack.eql.search.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.esql.async_query.go b/esapi/api.xpack.esql.async_query.go index 3a61e36a36..ef6216f553 100644 --- a/esapi/api.xpack.esql.async_query.go +++ b/esapi/api.xpack.esql.async_query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.esql.async_query_get.go b/esapi/api.xpack.esql.async_query_get.go index b2f644c9bc..7c09a1f15f 100644 --- a/esapi/api.xpack.esql.async_query_get.go +++ b/esapi/api.xpack.esql.async_query_get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.esql.query.go b/esapi/api.xpack.esql.query.go index cc4b59bfe4..1c54de4221 100644 --- a/esapi/api.xpack.esql.query.go +++ b/esapi/api.xpack.esql.query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.graph.explore.go b/esapi/api.xpack.graph.explore.go index 6300452260..17625c627f 100644 --- a/esapi/api.xpack.graph.explore.go +++ b/esapi/api.xpack.graph.explore.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ilm.delete_lifecycle.go b/esapi/api.xpack.ilm.delete_lifecycle.go index 5c99d4fe6b..b6621460c5 100644 --- a/esapi/api.xpack.ilm.delete_lifecycle.go +++ b/esapi/api.xpack.ilm.delete_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ilm.explain_lifecycle.go b/esapi/api.xpack.ilm.explain_lifecycle.go index 372f9d9dd8..a519b91a03 100644 --- a/esapi/api.xpack.ilm.explain_lifecycle.go +++ b/esapi/api.xpack.ilm.explain_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ilm.get_lifecycle.go b/esapi/api.xpack.ilm.get_lifecycle.go index df4bafa5c1..3d0dff7808 100644 --- a/esapi/api.xpack.ilm.get_lifecycle.go +++ b/esapi/api.xpack.ilm.get_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ilm.get_status.go b/esapi/api.xpack.ilm.get_status.go index 507b66f38a..22a1a568a5 100644 --- a/esapi/api.xpack.ilm.get_status.go +++ b/esapi/api.xpack.ilm.get_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ilm.migrate_to_data_tiers.go b/esapi/api.xpack.ilm.migrate_to_data_tiers.go index 7d4fae2f46..633dfb5a7c 100644 --- a/esapi/api.xpack.ilm.migrate_to_data_tiers.go +++ b/esapi/api.xpack.ilm.migrate_to_data_tiers.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ilm.move_to_step.go b/esapi/api.xpack.ilm.move_to_step.go index b00a1c3a30..1d0c1444d4 100644 --- a/esapi/api.xpack.ilm.move_to_step.go +++ b/esapi/api.xpack.ilm.move_to_step.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ilm.put_lifecycle.go b/esapi/api.xpack.ilm.put_lifecycle.go index 299f80a481..ad2fc7bd00 100644 --- a/esapi/api.xpack.ilm.put_lifecycle.go +++ b/esapi/api.xpack.ilm.put_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ilm.remove_policy.go b/esapi/api.xpack.ilm.remove_policy.go index a5ec25158a..86a329f9ad 100644 --- a/esapi/api.xpack.ilm.remove_policy.go +++ b/esapi/api.xpack.ilm.remove_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ilm.retry.go b/esapi/api.xpack.ilm.retry.go index 94f0cee4f6..22846bb6d4 100644 --- a/esapi/api.xpack.ilm.retry.go +++ b/esapi/api.xpack.ilm.retry.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ilm.start.go b/esapi/api.xpack.ilm.start.go index 429336f3f8..1c74f53bb1 100644 --- a/esapi/api.xpack.ilm.start.go +++ b/esapi/api.xpack.ilm.start.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ilm.stop.go b/esapi/api.xpack.ilm.stop.go index 1d1a772187..de67af0bdc 100644 --- a/esapi/api.xpack.ilm.stop.go +++ b/esapi/api.xpack.ilm.stop.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.indices.create_data_stream.go b/esapi/api.xpack.indices.create_data_stream.go index be1d521e64..6e272e0aa3 100644 --- a/esapi/api.xpack.indices.create_data_stream.go +++ b/esapi/api.xpack.indices.create_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.indices.data_streams_stats.go b/esapi/api.xpack.indices.data_streams_stats.go index 0576f1e67f..2f4847aa82 100644 --- a/esapi/api.xpack.indices.data_streams_stats.go +++ b/esapi/api.xpack.indices.data_streams_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.indices.delete_data_stream.go b/esapi/api.xpack.indices.delete_data_stream.go index 4efa32233b..0f4231c477 100644 --- a/esapi/api.xpack.indices.delete_data_stream.go +++ b/esapi/api.xpack.indices.delete_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.indices.get_data_stream.go b/esapi/api.xpack.indices.get_data_stream.go index 6151526ff3..fe4485445f 100644 --- a/esapi/api.xpack.indices.get_data_stream.go +++ b/esapi/api.xpack.indices.get_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -56,6 +56,7 @@ type IndicesGetDataStreamRequest struct { ExpandWildcards string IncludeDefaults *bool MasterTimeout time.Duration + Verbose *bool Pretty bool Human bool @@ -114,6 +115,10 @@ func (r IndicesGetDataStreamRequest) Do(providedCtx context.Context, transport T params["master_timeout"] = formatDuration(r.MasterTimeout) } + if r.Verbose != nil { + params["verbose"] = strconv.FormatBool(*r.Verbose) + } + if r.Pretty { params["pretty"] = "true" } @@ -220,6 +225,13 @@ func (f IndicesGetDataStream) WithMasterTimeout(v time.Duration) func(*IndicesGe } } +// WithVerbose - whether the maximum timestamp for each data stream should be calculated and returned (default: false). +func (f IndicesGetDataStream) WithVerbose(v bool) func(*IndicesGetDataStreamRequest) { + return func(r *IndicesGetDataStreamRequest) { + r.Verbose = &v + } +} + // WithPretty makes the response body pretty-printed. func (f IndicesGetDataStream) WithPretty() func(*IndicesGetDataStreamRequest) { return func(r *IndicesGetDataStreamRequest) { diff --git a/esapi/api.xpack.indices.migrate_to_data_stream.go b/esapi/api.xpack.indices.migrate_to_data_stream.go index bcfc3d818c..2545234aa7 100644 --- a/esapi/api.xpack.indices.migrate_to_data_stream.go +++ b/esapi/api.xpack.indices.migrate_to_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.indices.promote_data_stream.go b/esapi/api.xpack.indices.promote_data_stream.go index 253c709d10..042565dbdc 100644 --- a/esapi/api.xpack.indices.promote_data_stream.go +++ b/esapi/api.xpack.indices.promote_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.indices.reload_search_analyzers.go b/esapi/api.xpack.indices.reload_search_analyzers.go index 1833d962a6..a4933c2092 100644 --- a/esapi/api.xpack.indices.reload_search_analyzers.go +++ b/esapi/api.xpack.indices.reload_search_analyzers.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.indices.unfreeze.go b/esapi/api.xpack.indices.unfreeze.go index d0614d11f9..fce2d3402d 100644 --- a/esapi/api.xpack.indices.unfreeze.go +++ b/esapi/api.xpack.indices.unfreeze.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.license.delete.go b/esapi/api.xpack.license.delete.go index 993bcc9cde..9fdc007bc4 100644 --- a/esapi/api.xpack.license.delete.go +++ b/esapi/api.xpack.license.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.license.get.go b/esapi/api.xpack.license.get.go index 073573e57a..f1bafdcab1 100644 --- a/esapi/api.xpack.license.get.go +++ b/esapi/api.xpack.license.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.license.get_basic_status.go b/esapi/api.xpack.license.get_basic_status.go index f5768acd6c..b973ce4ba8 100644 --- a/esapi/api.xpack.license.get_basic_status.go +++ b/esapi/api.xpack.license.get_basic_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.license.get_trial_status.go b/esapi/api.xpack.license.get_trial_status.go index 50aecfcbe1..04dacf2937 100644 --- a/esapi/api.xpack.license.get_trial_status.go +++ b/esapi/api.xpack.license.get_trial_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.license.post.go b/esapi/api.xpack.license.post.go index da5ca77004..b4652cede0 100644 --- a/esapi/api.xpack.license.post.go +++ b/esapi/api.xpack.license.post.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.license.post_start_basic.go b/esapi/api.xpack.license.post_start_basic.go index 691ce447c7..e143325840 100644 --- a/esapi/api.xpack.license.post_start_basic.go +++ b/esapi/api.xpack.license.post_start_basic.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.license.post_start_trial.go b/esapi/api.xpack.license.post_start_trial.go index c71b21ddfb..48105afc24 100644 --- a/esapi/api.xpack.license.post_start_trial.go +++ b/esapi/api.xpack.license.post_start_trial.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.logstash.delete_pipeline.go b/esapi/api.xpack.logstash.delete_pipeline.go index 343a02f717..809c63d681 100644 --- a/esapi/api.xpack.logstash.delete_pipeline.go +++ b/esapi/api.xpack.logstash.delete_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.logstash.get_pipeline.go b/esapi/api.xpack.logstash.get_pipeline.go index 7bdc831ca6..64d34b807b 100644 --- a/esapi/api.xpack.logstash.get_pipeline.go +++ b/esapi/api.xpack.logstash.get_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.logstash.put_pipeline.go b/esapi/api.xpack.logstash.put_pipeline.go index 0daabf6a49..d363b59132 100644 --- a/esapi/api.xpack.logstash.put_pipeline.go +++ b/esapi/api.xpack.logstash.put_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.migration.deprecations.go b/esapi/api.xpack.migration.deprecations.go index cf67b78591..c7c86d7d96 100644 --- a/esapi/api.xpack.migration.deprecations.go +++ b/esapi/api.xpack.migration.deprecations.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.migration.get_feature_upgrade_status.go b/esapi/api.xpack.migration.get_feature_upgrade_status.go index 77ed8afad4..eb905e0f40 100644 --- a/esapi/api.xpack.migration.get_feature_upgrade_status.go +++ b/esapi/api.xpack.migration.get_feature_upgrade_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.migration.post_feature_upgrade.go b/esapi/api.xpack.migration.post_feature_upgrade.go index cda22ef994..ef0809ff9c 100644 --- a/esapi/api.xpack.migration.post_feature_upgrade.go +++ b/esapi/api.xpack.migration.post_feature_upgrade.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.clear_trained_model_deployment_cache.go b/esapi/api.xpack.ml.clear_trained_model_deployment_cache.go index 63d100b96d..f01472c457 100644 --- a/esapi/api.xpack.ml.clear_trained_model_deployment_cache.go +++ b/esapi/api.xpack.ml.clear_trained_model_deployment_cache.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.close_job.go b/esapi/api.xpack.ml.close_job.go index 3e9cf686d4..3bcb417b80 100644 --- a/esapi/api.xpack.ml.close_job.go +++ b/esapi/api.xpack.ml.close_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_calendar.go b/esapi/api.xpack.ml.delete_calendar.go index 194693a113..a6dd182cd6 100644 --- a/esapi/api.xpack.ml.delete_calendar.go +++ b/esapi/api.xpack.ml.delete_calendar.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_calendar_event.go b/esapi/api.xpack.ml.delete_calendar_event.go index d0dec58aa7..3e5f9a1093 100644 --- a/esapi/api.xpack.ml.delete_calendar_event.go +++ b/esapi/api.xpack.ml.delete_calendar_event.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_calendar_job.go b/esapi/api.xpack.ml.delete_calendar_job.go index 5f3cecaaf1..6a7f534091 100644 --- a/esapi/api.xpack.ml.delete_calendar_job.go +++ b/esapi/api.xpack.ml.delete_calendar_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_data_frame_analytics.go b/esapi/api.xpack.ml.delete_data_frame_analytics.go index 91b14b8bd4..f6ede66057 100644 --- a/esapi/api.xpack.ml.delete_data_frame_analytics.go +++ b/esapi/api.xpack.ml.delete_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_datafeed.go b/esapi/api.xpack.ml.delete_datafeed.go index 5b6a52a489..2e3ccdd8ef 100644 --- a/esapi/api.xpack.ml.delete_datafeed.go +++ b/esapi/api.xpack.ml.delete_datafeed.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_expired_data.go b/esapi/api.xpack.ml.delete_expired_data.go index f63ccc8041..8d5fdfd9c7 100644 --- a/esapi/api.xpack.ml.delete_expired_data.go +++ b/esapi/api.xpack.ml.delete_expired_data.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_filter.go b/esapi/api.xpack.ml.delete_filter.go index 4f9f55db54..0b41e37dd6 100644 --- a/esapi/api.xpack.ml.delete_filter.go +++ b/esapi/api.xpack.ml.delete_filter.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_forecast.go b/esapi/api.xpack.ml.delete_forecast.go index f7e48836f6..06ca37a85e 100644 --- a/esapi/api.xpack.ml.delete_forecast.go +++ b/esapi/api.xpack.ml.delete_forecast.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_job.go b/esapi/api.xpack.ml.delete_job.go index 0f3653430c..ff712d2131 100644 --- a/esapi/api.xpack.ml.delete_job.go +++ b/esapi/api.xpack.ml.delete_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_model_snapshot.go b/esapi/api.xpack.ml.delete_model_snapshot.go index 4fd11e5c3f..f306fc6832 100644 --- a/esapi/api.xpack.ml.delete_model_snapshot.go +++ b/esapi/api.xpack.ml.delete_model_snapshot.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_trained_model.go b/esapi/api.xpack.ml.delete_trained_model.go index 660ddf1b44..9ac3a76980 100644 --- a/esapi/api.xpack.ml.delete_trained_model.go +++ b/esapi/api.xpack.ml.delete_trained_model.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.delete_trained_model_alias.go b/esapi/api.xpack.ml.delete_trained_model_alias.go index 855f44bb9e..1e02dc18ea 100644 --- a/esapi/api.xpack.ml.delete_trained_model_alias.go +++ b/esapi/api.xpack.ml.delete_trained_model_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.estimate_model_memory.go b/esapi/api.xpack.ml.estimate_model_memory.go index 90abe9b67e..4e37c2c0de 100644 --- a/esapi/api.xpack.ml.estimate_model_memory.go +++ b/esapi/api.xpack.ml.estimate_model_memory.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.evaluate_data_frame.go b/esapi/api.xpack.ml.evaluate_data_frame.go index 4f68841e75..a47846462b 100644 --- a/esapi/api.xpack.ml.evaluate_data_frame.go +++ b/esapi/api.xpack.ml.evaluate_data_frame.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.explain_data_frame_analytics.go b/esapi/api.xpack.ml.explain_data_frame_analytics.go index 0e8d5d7306..9f2d36fcb1 100644 --- a/esapi/api.xpack.ml.explain_data_frame_analytics.go +++ b/esapi/api.xpack.ml.explain_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.flush_job.go b/esapi/api.xpack.ml.flush_job.go index 5f2394c643..99db324769 100644 --- a/esapi/api.xpack.ml.flush_job.go +++ b/esapi/api.xpack.ml.flush_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.forecast.go b/esapi/api.xpack.ml.forecast.go index c290711c38..94418e0b5c 100644 --- a/esapi/api.xpack.ml.forecast.go +++ b/esapi/api.xpack.ml.forecast.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_buckets.go b/esapi/api.xpack.ml.get_buckets.go index aae1350c18..b380587033 100644 --- a/esapi/api.xpack.ml.get_buckets.go +++ b/esapi/api.xpack.ml.get_buckets.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_calendar_events.go b/esapi/api.xpack.ml.get_calendar_events.go index 319b35e6dd..7a261971cd 100644 --- a/esapi/api.xpack.ml.get_calendar_events.go +++ b/esapi/api.xpack.ml.get_calendar_events.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_calendars.go b/esapi/api.xpack.ml.get_calendars.go index 4ffe1501b2..35177e7f88 100644 --- a/esapi/api.xpack.ml.get_calendars.go +++ b/esapi/api.xpack.ml.get_calendars.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_categories.go b/esapi/api.xpack.ml.get_categories.go index c30c544438..b6a6b6b17d 100644 --- a/esapi/api.xpack.ml.get_categories.go +++ b/esapi/api.xpack.ml.get_categories.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_data_frame_analytics.go b/esapi/api.xpack.ml.get_data_frame_analytics.go index c25a904213..4f38f1c621 100644 --- a/esapi/api.xpack.ml.get_data_frame_analytics.go +++ b/esapi/api.xpack.ml.get_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_data_frame_analytics_stats.go b/esapi/api.xpack.ml.get_data_frame_analytics_stats.go index fdcb8d41c5..2aa56d876d 100644 --- a/esapi/api.xpack.ml.get_data_frame_analytics_stats.go +++ b/esapi/api.xpack.ml.get_data_frame_analytics_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_datafeed_stats.go b/esapi/api.xpack.ml.get_datafeed_stats.go index 3fc774f3e1..1651cfc72e 100644 --- a/esapi/api.xpack.ml.get_datafeed_stats.go +++ b/esapi/api.xpack.ml.get_datafeed_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_datafeeds.go b/esapi/api.xpack.ml.get_datafeeds.go index f9fc08027e..e4841be431 100644 --- a/esapi/api.xpack.ml.get_datafeeds.go +++ b/esapi/api.xpack.ml.get_datafeeds.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_filters.go b/esapi/api.xpack.ml.get_filters.go index daf0410e88..8472b8ab44 100644 --- a/esapi/api.xpack.ml.get_filters.go +++ b/esapi/api.xpack.ml.get_filters.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_influencers.go b/esapi/api.xpack.ml.get_influencers.go index 01024e2d89..075a009679 100644 --- a/esapi/api.xpack.ml.get_influencers.go +++ b/esapi/api.xpack.ml.get_influencers.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_job_stats.go b/esapi/api.xpack.ml.get_job_stats.go index 0e24ef70b3..8af21abe18 100644 --- a/esapi/api.xpack.ml.get_job_stats.go +++ b/esapi/api.xpack.ml.get_job_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_jobs.go b/esapi/api.xpack.ml.get_jobs.go index 76df09282e..5db1f25f62 100644 --- a/esapi/api.xpack.ml.get_jobs.go +++ b/esapi/api.xpack.ml.get_jobs.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_memory_stats.go b/esapi/api.xpack.ml.get_memory_stats.go index 5b9c3b5ef8..928eefad87 100644 --- a/esapi/api.xpack.ml.get_memory_stats.go +++ b/esapi/api.xpack.ml.get_memory_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_model_snapshot_upgrade_stats.go b/esapi/api.xpack.ml.get_model_snapshot_upgrade_stats.go index bb30dd2f3e..494495d302 100644 --- a/esapi/api.xpack.ml.get_model_snapshot_upgrade_stats.go +++ b/esapi/api.xpack.ml.get_model_snapshot_upgrade_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_model_snapshots.go b/esapi/api.xpack.ml.get_model_snapshots.go index f3b607fec2..cfa58c5414 100644 --- a/esapi/api.xpack.ml.get_model_snapshots.go +++ b/esapi/api.xpack.ml.get_model_snapshots.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_overall_buckets.go b/esapi/api.xpack.ml.get_overall_buckets.go index 5e98222931..25be02b8ec 100644 --- a/esapi/api.xpack.ml.get_overall_buckets.go +++ b/esapi/api.xpack.ml.get_overall_buckets.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_records.go b/esapi/api.xpack.ml.get_records.go index 5d7e04fe81..5eebaa3987 100644 --- a/esapi/api.xpack.ml.get_records.go +++ b/esapi/api.xpack.ml.get_records.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_trained_models.go b/esapi/api.xpack.ml.get_trained_models.go index 9889f6f1f6..5ef23d8da7 100644 --- a/esapi/api.xpack.ml.get_trained_models.go +++ b/esapi/api.xpack.ml.get_trained_models.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.get_trained_models_stats.go b/esapi/api.xpack.ml.get_trained_models_stats.go index 0d51c06d5c..1808159e38 100644 --- a/esapi/api.xpack.ml.get_trained_models_stats.go +++ b/esapi/api.xpack.ml.get_trained_models_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.infer_trained_model.go b/esapi/api.xpack.ml.infer_trained_model.go index e7e4619b9e..3eb63f8fd1 100644 --- a/esapi/api.xpack.ml.infer_trained_model.go +++ b/esapi/api.xpack.ml.infer_trained_model.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.info.go b/esapi/api.xpack.ml.info.go index a3c238084e..d6fee16302 100644 --- a/esapi/api.xpack.ml.info.go +++ b/esapi/api.xpack.ml.info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.open_job.go b/esapi/api.xpack.ml.open_job.go index 1f03cce36c..577f6a3f47 100644 --- a/esapi/api.xpack.ml.open_job.go +++ b/esapi/api.xpack.ml.open_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.post_calendar_events.go b/esapi/api.xpack.ml.post_calendar_events.go index d0cc1a479f..8672dab6e1 100644 --- a/esapi/api.xpack.ml.post_calendar_events.go +++ b/esapi/api.xpack.ml.post_calendar_events.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.post_data.go b/esapi/api.xpack.ml.post_data.go index cf3767351d..a58a7545a7 100644 --- a/esapi/api.xpack.ml.post_data.go +++ b/esapi/api.xpack.ml.post_data.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.preview_data_frame_analytics.go b/esapi/api.xpack.ml.preview_data_frame_analytics.go index 7de623cf56..bc533e9d6e 100644 --- a/esapi/api.xpack.ml.preview_data_frame_analytics.go +++ b/esapi/api.xpack.ml.preview_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.preview_datafeed.go b/esapi/api.xpack.ml.preview_datafeed.go index ec9dac2462..fd8fda0b5b 100644 --- a/esapi/api.xpack.ml.preview_datafeed.go +++ b/esapi/api.xpack.ml.preview_datafeed.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.put_calendar.go b/esapi/api.xpack.ml.put_calendar.go index c7efd600b2..cf04e29870 100644 --- a/esapi/api.xpack.ml.put_calendar.go +++ b/esapi/api.xpack.ml.put_calendar.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.put_calendar_job.go b/esapi/api.xpack.ml.put_calendar_job.go index d955776cbd..35cb7032f7 100644 --- a/esapi/api.xpack.ml.put_calendar_job.go +++ b/esapi/api.xpack.ml.put_calendar_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.put_data_frame_analytics.go b/esapi/api.xpack.ml.put_data_frame_analytics.go index dd6086abf2..8f184f02f2 100644 --- a/esapi/api.xpack.ml.put_data_frame_analytics.go +++ b/esapi/api.xpack.ml.put_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.put_datafeed.go b/esapi/api.xpack.ml.put_datafeed.go index 46f550d63e..50be2da87c 100644 --- a/esapi/api.xpack.ml.put_datafeed.go +++ b/esapi/api.xpack.ml.put_datafeed.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.put_filter.go b/esapi/api.xpack.ml.put_filter.go index 83479aa417..77bc2d45a2 100644 --- a/esapi/api.xpack.ml.put_filter.go +++ b/esapi/api.xpack.ml.put_filter.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.put_job.go b/esapi/api.xpack.ml.put_job.go index 47e6316c8e..5f4d24ec39 100644 --- a/esapi/api.xpack.ml.put_job.go +++ b/esapi/api.xpack.ml.put_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.put_trained_model.go b/esapi/api.xpack.ml.put_trained_model.go index bcfcd79136..7b817aa928 100644 --- a/esapi/api.xpack.ml.put_trained_model.go +++ b/esapi/api.xpack.ml.put_trained_model.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.put_trained_model_alias.go b/esapi/api.xpack.ml.put_trained_model_alias.go index b008226531..af521d803f 100644 --- a/esapi/api.xpack.ml.put_trained_model_alias.go +++ b/esapi/api.xpack.ml.put_trained_model_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.put_trained_model_definition_part.go b/esapi/api.xpack.ml.put_trained_model_definition_part.go index 8e806cf9d0..d7e8b90a5d 100644 --- a/esapi/api.xpack.ml.put_trained_model_definition_part.go +++ b/esapi/api.xpack.ml.put_trained_model_definition_part.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.put_trained_model_vocabulary.go b/esapi/api.xpack.ml.put_trained_model_vocabulary.go index 48f08dc0bf..f327570d47 100644 --- a/esapi/api.xpack.ml.put_trained_model_vocabulary.go +++ b/esapi/api.xpack.ml.put_trained_model_vocabulary.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.reset_job.go b/esapi/api.xpack.ml.reset_job.go index 1999f9bf6c..6bed9469ba 100644 --- a/esapi/api.xpack.ml.reset_job.go +++ b/esapi/api.xpack.ml.reset_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.revert_model_snapshot.go b/esapi/api.xpack.ml.revert_model_snapshot.go index bc6b3fa63d..a6b0935488 100644 --- a/esapi/api.xpack.ml.revert_model_snapshot.go +++ b/esapi/api.xpack.ml.revert_model_snapshot.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.set_upgrade_mode.go b/esapi/api.xpack.ml.set_upgrade_mode.go index 0f45117209..ccf9d560db 100644 --- a/esapi/api.xpack.ml.set_upgrade_mode.go +++ b/esapi/api.xpack.ml.set_upgrade_mode.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.start_data_frame_analytics.go b/esapi/api.xpack.ml.start_data_frame_analytics.go index dbc57ef4d2..120164e131 100644 --- a/esapi/api.xpack.ml.start_data_frame_analytics.go +++ b/esapi/api.xpack.ml.start_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.start_datafeed.go b/esapi/api.xpack.ml.start_datafeed.go index 8f02eadd4c..7e9b962eb3 100644 --- a/esapi/api.xpack.ml.start_datafeed.go +++ b/esapi/api.xpack.ml.start_datafeed.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.start_trained_model_deployment.go b/esapi/api.xpack.ml.start_trained_model_deployment.go index fc008407e3..eafdc800b4 100644 --- a/esapi/api.xpack.ml.start_trained_model_deployment.go +++ b/esapi/api.xpack.ml.start_trained_model_deployment.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.stop_data_frame_analytics.go b/esapi/api.xpack.ml.stop_data_frame_analytics.go index a7aa00bc2f..0c5d595f8a 100644 --- a/esapi/api.xpack.ml.stop_data_frame_analytics.go +++ b/esapi/api.xpack.ml.stop_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.stop_datafeed.go b/esapi/api.xpack.ml.stop_datafeed.go index 0a51e2b5f0..49f70aa21b 100644 --- a/esapi/api.xpack.ml.stop_datafeed.go +++ b/esapi/api.xpack.ml.stop_datafeed.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.stop_trained_model_deployment.go b/esapi/api.xpack.ml.stop_trained_model_deployment.go index 4a25f46955..7f27b365e4 100644 --- a/esapi/api.xpack.ml.stop_trained_model_deployment.go +++ b/esapi/api.xpack.ml.stop_trained_model_deployment.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.update_data_frame_analytics.go b/esapi/api.xpack.ml.update_data_frame_analytics.go index 9a38e1a897..6f2cbf86f4 100644 --- a/esapi/api.xpack.ml.update_data_frame_analytics.go +++ b/esapi/api.xpack.ml.update_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.update_datafeed.go b/esapi/api.xpack.ml.update_datafeed.go index 486c7dc1b7..abe4d2d9ae 100644 --- a/esapi/api.xpack.ml.update_datafeed.go +++ b/esapi/api.xpack.ml.update_datafeed.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.update_filter.go b/esapi/api.xpack.ml.update_filter.go index 90e3930452..db3748a0c0 100644 --- a/esapi/api.xpack.ml.update_filter.go +++ b/esapi/api.xpack.ml.update_filter.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.update_job.go b/esapi/api.xpack.ml.update_job.go index 540f2145e3..5cfcb43fc5 100644 --- a/esapi/api.xpack.ml.update_job.go +++ b/esapi/api.xpack.ml.update_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.update_model_snapshot.go b/esapi/api.xpack.ml.update_model_snapshot.go index ec5078297c..d81f155e74 100644 --- a/esapi/api.xpack.ml.update_model_snapshot.go +++ b/esapi/api.xpack.ml.update_model_snapshot.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.update_trained_model_deployment.go b/esapi/api.xpack.ml.update_trained_model_deployment.go index fb5345319f..f427b668a5 100644 --- a/esapi/api.xpack.ml.update_trained_model_deployment.go +++ b/esapi/api.xpack.ml.update_trained_model_deployment.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.upgrade_job_snapshot.go b/esapi/api.xpack.ml.upgrade_job_snapshot.go index 33b6a18933..2faba0e35d 100644 --- a/esapi/api.xpack.ml.upgrade_job_snapshot.go +++ b/esapi/api.xpack.ml.upgrade_job_snapshot.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.validate.go b/esapi/api.xpack.ml.validate.go index 851acb6790..a3923cf218 100644 --- a/esapi/api.xpack.ml.validate.go +++ b/esapi/api.xpack.ml.validate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ml.validate_detector.go b/esapi/api.xpack.ml.validate_detector.go index a74f8ffd1d..bf5fa6ef1f 100644 --- a/esapi/api.xpack.ml.validate_detector.go +++ b/esapi/api.xpack.ml.validate_detector.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.monitoring.bulk.go b/esapi/api.xpack.monitoring.bulk.go index f80c59d3c7..f6739ba3aa 100644 --- a/esapi/api.xpack.monitoring.bulk.go +++ b/esapi/api.xpack.monitoring.bulk.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.open_point_in_time.go b/esapi/api.xpack.open_point_in_time.go index 210b811228..daeeba69cb 100644 --- a/esapi/api.xpack.open_point_in_time.go +++ b/esapi/api.xpack.open_point_in_time.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -56,11 +56,12 @@ type OpenPointInTimeRequest struct { Body io.Reader - ExpandWildcards string - IgnoreUnavailable *bool - KeepAlive string - Preference string - Routing string + AllowPartialSearchResults *bool + ExpandWildcards string + IgnoreUnavailable *bool + KeepAlive string + Preference string + Routing string Pretty bool Human bool @@ -109,6 +110,10 @@ func (r OpenPointInTimeRequest) Do(providedCtx context.Context, transport Transp params = make(map[string]string) + if r.AllowPartialSearchResults != nil { + params["allow_partial_search_results"] = strconv.FormatBool(*r.AllowPartialSearchResults) + } + if r.ExpandWildcards != "" { params["expand_wildcards"] = r.ExpandWildcards } @@ -221,6 +226,13 @@ func (f OpenPointInTime) WithBody(v io.Reader) func(*OpenPointInTimeRequest) { } } +// WithAllowPartialSearchResults - specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception. (default: false). +func (f OpenPointInTime) WithAllowPartialSearchResults(v bool) func(*OpenPointInTimeRequest) { + return func(r *OpenPointInTimeRequest) { + r.AllowPartialSearchResults = &v + } +} + // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. func (f OpenPointInTime) WithExpandWildcards(v string) func(*OpenPointInTimeRequest) { return func(r *OpenPointInTimeRequest) { diff --git a/esapi/api.xpack.profiling.flamegraph.go b/esapi/api.xpack.profiling.flamegraph.go index 7335792c01..43fdf1f47b 100644 --- a/esapi/api.xpack.profiling.flamegraph.go +++ b/esapi/api.xpack.profiling.flamegraph.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.rollup.delete_job.go b/esapi/api.xpack.rollup.delete_job.go index 2fa13e96e7..ca4ac6fef8 100644 --- a/esapi/api.xpack.rollup.delete_job.go +++ b/esapi/api.xpack.rollup.delete_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.rollup.get_jobs.go b/esapi/api.xpack.rollup.get_jobs.go index 42d0827dd4..f6973545cb 100644 --- a/esapi/api.xpack.rollup.get_jobs.go +++ b/esapi/api.xpack.rollup.get_jobs.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.rollup.get_rollup_caps.go b/esapi/api.xpack.rollup.get_rollup_caps.go index eeb2beba5f..b740eea9f2 100644 --- a/esapi/api.xpack.rollup.get_rollup_caps.go +++ b/esapi/api.xpack.rollup.get_rollup_caps.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.rollup.get_rollup_index_caps.go b/esapi/api.xpack.rollup.get_rollup_index_caps.go index dc97b76eb1..c2c2cfaffe 100644 --- a/esapi/api.xpack.rollup.get_rollup_index_caps.go +++ b/esapi/api.xpack.rollup.get_rollup_index_caps.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.rollup.put_job.go b/esapi/api.xpack.rollup.put_job.go index 9ad730413d..dfdc95e4e3 100644 --- a/esapi/api.xpack.rollup.put_job.go +++ b/esapi/api.xpack.rollup.put_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.rollup.rollup_search.go b/esapi/api.xpack.rollup.rollup_search.go index 9d37d79b24..a8e0a1078c 100644 --- a/esapi/api.xpack.rollup.rollup_search.go +++ b/esapi/api.xpack.rollup.rollup_search.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.rollup.start_job.go b/esapi/api.xpack.rollup.start_job.go index bd28c9be20..ab5832f196 100644 --- a/esapi/api.xpack.rollup.start_job.go +++ b/esapi/api.xpack.rollup.start_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.rollup.stop_job.go b/esapi/api.xpack.rollup.stop_job.go index 540c069c4d..dc9c4e313a 100644 --- a/esapi/api.xpack.rollup.stop_job.go +++ b/esapi/api.xpack.rollup.stop_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.searchable_snapshots.cache_stats.go b/esapi/api.xpack.searchable_snapshots.cache_stats.go index b881ddce9a..8928ad614c 100644 --- a/esapi/api.xpack.searchable_snapshots.cache_stats.go +++ b/esapi/api.xpack.searchable_snapshots.cache_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.searchable_snapshots.clear_cache.go b/esapi/api.xpack.searchable_snapshots.clear_cache.go index cd0a69f875..f5f1d1d589 100644 --- a/esapi/api.xpack.searchable_snapshots.clear_cache.go +++ b/esapi/api.xpack.searchable_snapshots.clear_cache.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.searchable_snapshots.mount.go b/esapi/api.xpack.searchable_snapshots.mount.go index 91aa50429a..f2e84c0cfb 100644 --- a/esapi/api.xpack.searchable_snapshots.mount.go +++ b/esapi/api.xpack.searchable_snapshots.mount.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.searchable_snapshots.stats.go b/esapi/api.xpack.searchable_snapshots.stats.go index a2762f1e39..df6e817af5 100644 --- a/esapi/api.xpack.searchable_snapshots.stats.go +++ b/esapi/api.xpack.searchable_snapshots.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.activate_user_profile.go b/esapi/api.xpack.security.activate_user_profile.go index 5be9dc3254..e56479ed1d 100644 --- a/esapi/api.xpack.security.activate_user_profile.go +++ b/esapi/api.xpack.security.activate_user_profile.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.authenticate.go b/esapi/api.xpack.security.authenticate.go index 1cf6539414..be89fb5d43 100644 --- a/esapi/api.xpack.security.authenticate.go +++ b/esapi/api.xpack.security.authenticate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.bulk_delete_role.go b/esapi/api.xpack.security.bulk_delete_role.go index 3790b9b590..e705fab736 100644 --- a/esapi/api.xpack.security.bulk_delete_role.go +++ b/esapi/api.xpack.security.bulk_delete_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.bulk_put_role.go b/esapi/api.xpack.security.bulk_put_role.go index 5c5e4a5202..5eb84595f1 100644 --- a/esapi/api.xpack.security.bulk_put_role.go +++ b/esapi/api.xpack.security.bulk_put_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.bulk_update_api_keys.go b/esapi/api.xpack.security.bulk_update_api_keys.go index 248e7f128f..7e83c06b8a 100644 --- a/esapi/api.xpack.security.bulk_update_api_keys.go +++ b/esapi/api.xpack.security.bulk_update_api_keys.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.change_password.go b/esapi/api.xpack.security.change_password.go index f2cab71623..282160922d 100644 --- a/esapi/api.xpack.security.change_password.go +++ b/esapi/api.xpack.security.change_password.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.clear_api_key_cache.go b/esapi/api.xpack.security.clear_api_key_cache.go index 3fee069eda..dc5693925d 100644 --- a/esapi/api.xpack.security.clear_api_key_cache.go +++ b/esapi/api.xpack.security.clear_api_key_cache.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.clear_cached_privileges.go b/esapi/api.xpack.security.clear_cached_privileges.go index 5ed1a4778f..a57c3b535d 100644 --- a/esapi/api.xpack.security.clear_cached_privileges.go +++ b/esapi/api.xpack.security.clear_cached_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.clear_cached_realms.go b/esapi/api.xpack.security.clear_cached_realms.go index 506d038de6..ac8beb8a90 100644 --- a/esapi/api.xpack.security.clear_cached_realms.go +++ b/esapi/api.xpack.security.clear_cached_realms.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.clear_cached_roles.go b/esapi/api.xpack.security.clear_cached_roles.go index 9f1041738d..2de6b45ccb 100644 --- a/esapi/api.xpack.security.clear_cached_roles.go +++ b/esapi/api.xpack.security.clear_cached_roles.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.clear_cached_service_tokens.go b/esapi/api.xpack.security.clear_cached_service_tokens.go index 3933616bbd..9ce5e3325a 100644 --- a/esapi/api.xpack.security.clear_cached_service_tokens.go +++ b/esapi/api.xpack.security.clear_cached_service_tokens.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.create_api_key.go b/esapi/api.xpack.security.create_api_key.go index 76f57e254b..18452db903 100644 --- a/esapi/api.xpack.security.create_api_key.go +++ b/esapi/api.xpack.security.create_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.create_cross_cluster_api_key.go b/esapi/api.xpack.security.create_cross_cluster_api_key.go index aca03ed95e..799b9b7446 100644 --- a/esapi/api.xpack.security.create_cross_cluster_api_key.go +++ b/esapi/api.xpack.security.create_cross_cluster_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.create_service_token.go b/esapi/api.xpack.security.create_service_token.go index 5ef29cf4f3..91e229c11a 100644 --- a/esapi/api.xpack.security.create_service_token.go +++ b/esapi/api.xpack.security.create_service_token.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.delete_privileges.go b/esapi/api.xpack.security.delete_privileges.go index fd6f199c5c..65494e34e3 100644 --- a/esapi/api.xpack.security.delete_privileges.go +++ b/esapi/api.xpack.security.delete_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.delete_role.go b/esapi/api.xpack.security.delete_role.go index e01f8930d6..0a1b672179 100644 --- a/esapi/api.xpack.security.delete_role.go +++ b/esapi/api.xpack.security.delete_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.delete_role_mapping.go b/esapi/api.xpack.security.delete_role_mapping.go index 978423920f..666d8fa850 100644 --- a/esapi/api.xpack.security.delete_role_mapping.go +++ b/esapi/api.xpack.security.delete_role_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.delete_service_token.go b/esapi/api.xpack.security.delete_service_token.go index 55cf6e8ccb..c7eb85fe03 100644 --- a/esapi/api.xpack.security.delete_service_token.go +++ b/esapi/api.xpack.security.delete_service_token.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.delete_user.go b/esapi/api.xpack.security.delete_user.go index 81a9bf39c0..261a3d5b14 100644 --- a/esapi/api.xpack.security.delete_user.go +++ b/esapi/api.xpack.security.delete_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.disable_user.go b/esapi/api.xpack.security.disable_user.go index a119a31d33..051d78fe9e 100644 --- a/esapi/api.xpack.security.disable_user.go +++ b/esapi/api.xpack.security.disable_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.disable_user_profile.go b/esapi/api.xpack.security.disable_user_profile.go index 04575c5df6..90bd7bed66 100644 --- a/esapi/api.xpack.security.disable_user_profile.go +++ b/esapi/api.xpack.security.disable_user_profile.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.enable_user.go b/esapi/api.xpack.security.enable_user.go index ae798b8871..40484f93d9 100644 --- a/esapi/api.xpack.security.enable_user.go +++ b/esapi/api.xpack.security.enable_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.enable_user_profile.go b/esapi/api.xpack.security.enable_user_profile.go index 3f10e39a5e..6168d12519 100644 --- a/esapi/api.xpack.security.enable_user_profile.go +++ b/esapi/api.xpack.security.enable_user_profile.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.enroll_kibana.go b/esapi/api.xpack.security.enroll_kibana.go index b65c1f7477..c70257f57a 100644 --- a/esapi/api.xpack.security.enroll_kibana.go +++ b/esapi/api.xpack.security.enroll_kibana.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.enroll_node.go b/esapi/api.xpack.security.enroll_node.go index 50e3962d03..7a97127474 100644 --- a/esapi/api.xpack.security.enroll_node.go +++ b/esapi/api.xpack.security.enroll_node.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_api_key.go b/esapi/api.xpack.security.get_api_key.go index c1fa14e21a..a7f8f40c66 100644 --- a/esapi/api.xpack.security.get_api_key.go +++ b/esapi/api.xpack.security.get_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_builtin_privileges.go b/esapi/api.xpack.security.get_builtin_privileges.go index abdb3b39bb..8b2b7c1287 100644 --- a/esapi/api.xpack.security.get_builtin_privileges.go +++ b/esapi/api.xpack.security.get_builtin_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_privileges.go b/esapi/api.xpack.security.get_privileges.go index fa21bccf53..ab95e1871e 100644 --- a/esapi/api.xpack.security.get_privileges.go +++ b/esapi/api.xpack.security.get_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_role.go b/esapi/api.xpack.security.get_role.go index 4b4d0fe91d..7fd4f5c056 100644 --- a/esapi/api.xpack.security.get_role.go +++ b/esapi/api.xpack.security.get_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_role_mapping.go b/esapi/api.xpack.security.get_role_mapping.go index b89c0e6dfc..063f01ebc0 100644 --- a/esapi/api.xpack.security.get_role_mapping.go +++ b/esapi/api.xpack.security.get_role_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_service_accounts.go b/esapi/api.xpack.security.get_service_accounts.go index e125bf767d..bf95ee2960 100644 --- a/esapi/api.xpack.security.get_service_accounts.go +++ b/esapi/api.xpack.security.get_service_accounts.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_service_credentials.go b/esapi/api.xpack.security.get_service_credentials.go index 11e54f96cd..244902360b 100644 --- a/esapi/api.xpack.security.get_service_credentials.go +++ b/esapi/api.xpack.security.get_service_credentials.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_settings.go b/esapi/api.xpack.security.get_settings.go index 16cdde250e..e73c34a7b8 100644 --- a/esapi/api.xpack.security.get_settings.go +++ b/esapi/api.xpack.security.get_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_token.go b/esapi/api.xpack.security.get_token.go index a7581472ad..7cd69922b7 100644 --- a/esapi/api.xpack.security.get_token.go +++ b/esapi/api.xpack.security.get_token.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_user.go b/esapi/api.xpack.security.get_user.go index 71b11ee7f7..b6397181ba 100644 --- a/esapi/api.xpack.security.get_user.go +++ b/esapi/api.xpack.security.get_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_user_privileges.go b/esapi/api.xpack.security.get_user_privileges.go index f96994ab9a..00be6faa10 100644 --- a/esapi/api.xpack.security.get_user_privileges.go +++ b/esapi/api.xpack.security.get_user_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.get_user_profile.go b/esapi/api.xpack.security.get_user_profile.go index cfd7be6ec3..dc61334b21 100644 --- a/esapi/api.xpack.security.get_user_profile.go +++ b/esapi/api.xpack.security.get_user_profile.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.grant_api_key.go b/esapi/api.xpack.security.grant_api_key.go index 7f64353aff..04bfb66546 100644 --- a/esapi/api.xpack.security.grant_api_key.go +++ b/esapi/api.xpack.security.grant_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.has_privileges.go b/esapi/api.xpack.security.has_privileges.go index f460ab1c91..e505bdf5fe 100644 --- a/esapi/api.xpack.security.has_privileges.go +++ b/esapi/api.xpack.security.has_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.has_privileges_user_profile.go b/esapi/api.xpack.security.has_privileges_user_profile.go index bc073c75e7..51516d4c2d 100644 --- a/esapi/api.xpack.security.has_privileges_user_profile.go +++ b/esapi/api.xpack.security.has_privileges_user_profile.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.invalidate_api_key.go b/esapi/api.xpack.security.invalidate_api_key.go index 7d30c1aac1..4fc0764ae5 100644 --- a/esapi/api.xpack.security.invalidate_api_key.go +++ b/esapi/api.xpack.security.invalidate_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.invalidate_token.go b/esapi/api.xpack.security.invalidate_token.go index 166ffb84d4..8a389a194f 100644 --- a/esapi/api.xpack.security.invalidate_token.go +++ b/esapi/api.xpack.security.invalidate_token.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.oidc_authenticate.go b/esapi/api.xpack.security.oidc_authenticate.go index 3c60956280..1713d5c173 100644 --- a/esapi/api.xpack.security.oidc_authenticate.go +++ b/esapi/api.xpack.security.oidc_authenticate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.oidc_logout.go b/esapi/api.xpack.security.oidc_logout.go index 9e9ea8e5f9..7deb259e71 100644 --- a/esapi/api.xpack.security.oidc_logout.go +++ b/esapi/api.xpack.security.oidc_logout.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.oidc_prepare_authentication.go b/esapi/api.xpack.security.oidc_prepare_authentication.go index 2fc9c971b1..28394fbe20 100644 --- a/esapi/api.xpack.security.oidc_prepare_authentication.go +++ b/esapi/api.xpack.security.oidc_prepare_authentication.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.put_privileges.go b/esapi/api.xpack.security.put_privileges.go index 85be74ceb9..1d385adafb 100644 --- a/esapi/api.xpack.security.put_privileges.go +++ b/esapi/api.xpack.security.put_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.put_role.go b/esapi/api.xpack.security.put_role.go index 0b1da344de..8c359c45d1 100644 --- a/esapi/api.xpack.security.put_role.go +++ b/esapi/api.xpack.security.put_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.put_role_mapping.go b/esapi/api.xpack.security.put_role_mapping.go index 798367f4ba..79f6e38e21 100644 --- a/esapi/api.xpack.security.put_role_mapping.go +++ b/esapi/api.xpack.security.put_role_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.put_user.go b/esapi/api.xpack.security.put_user.go index bd2f770c1d..ba702d8f76 100644 --- a/esapi/api.xpack.security.put_user.go +++ b/esapi/api.xpack.security.put_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.query_api_keys.go b/esapi/api.xpack.security.query_api_keys.go index 0608a3459d..955fa7afbb 100644 --- a/esapi/api.xpack.security.query_api_keys.go +++ b/esapi/api.xpack.security.query_api_keys.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.query_role.go b/esapi/api.xpack.security.query_role.go index dbeb9d5f50..831ff4b224 100644 --- a/esapi/api.xpack.security.query_role.go +++ b/esapi/api.xpack.security.query_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.query_user.go b/esapi/api.xpack.security.query_user.go index 4f91b12eeb..5549a9d472 100644 --- a/esapi/api.xpack.security.query_user.go +++ b/esapi/api.xpack.security.query_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.saml_authenticate.go b/esapi/api.xpack.security.saml_authenticate.go index 39323896e9..cceac4d831 100644 --- a/esapi/api.xpack.security.saml_authenticate.go +++ b/esapi/api.xpack.security.saml_authenticate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.saml_complete_logout.go b/esapi/api.xpack.security.saml_complete_logout.go index 41e2771016..1eab44c633 100644 --- a/esapi/api.xpack.security.saml_complete_logout.go +++ b/esapi/api.xpack.security.saml_complete_logout.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.saml_invalidate.go b/esapi/api.xpack.security.saml_invalidate.go index d6ec95b008..de34891074 100644 --- a/esapi/api.xpack.security.saml_invalidate.go +++ b/esapi/api.xpack.security.saml_invalidate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.saml_logout.go b/esapi/api.xpack.security.saml_logout.go index 4df212a621..a6faf773ae 100644 --- a/esapi/api.xpack.security.saml_logout.go +++ b/esapi/api.xpack.security.saml_logout.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.saml_prepare_authentication.go b/esapi/api.xpack.security.saml_prepare_authentication.go index c3eaad279c..c86970236f 100644 --- a/esapi/api.xpack.security.saml_prepare_authentication.go +++ b/esapi/api.xpack.security.saml_prepare_authentication.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.saml_service_provider_metadata.go b/esapi/api.xpack.security.saml_service_provider_metadata.go index 1027e6c23f..84057f1234 100644 --- a/esapi/api.xpack.security.saml_service_provider_metadata.go +++ b/esapi/api.xpack.security.saml_service_provider_metadata.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.suggest_user_profiles.go b/esapi/api.xpack.security.suggest_user_profiles.go index ab8b23821a..747959c8be 100644 --- a/esapi/api.xpack.security.suggest_user_profiles.go +++ b/esapi/api.xpack.security.suggest_user_profiles.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.update_api_key.go b/esapi/api.xpack.security.update_api_key.go index fec4bd5730..e915bf1826 100644 --- a/esapi/api.xpack.security.update_api_key.go +++ b/esapi/api.xpack.security.update_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.update_cross_cluster_api_key.go b/esapi/api.xpack.security.update_cross_cluster_api_key.go index 6e0e73967f..75dc8b912e 100644 --- a/esapi/api.xpack.security.update_cross_cluster_api_key.go +++ b/esapi/api.xpack.security.update_cross_cluster_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.update_settings.go b/esapi/api.xpack.security.update_settings.go index 041803e1bd..3b86976763 100644 --- a/esapi/api.xpack.security.update_settings.go +++ b/esapi/api.xpack.security.update_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.security.update_user_profile_data.go b/esapi/api.xpack.security.update_user_profile_data.go index 2fba8f349e..56cf3619df 100644 --- a/esapi/api.xpack.security.update_user_profile_data.go +++ b/esapi/api.xpack.security.update_user_profile_data.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.slm.delete_lifecycle.go b/esapi/api.xpack.slm.delete_lifecycle.go index 7e05d77c86..49c1837621 100644 --- a/esapi/api.xpack.slm.delete_lifecycle.go +++ b/esapi/api.xpack.slm.delete_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.slm.execute_lifecycle.go b/esapi/api.xpack.slm.execute_lifecycle.go index d18186a1f5..b934b48cbd 100644 --- a/esapi/api.xpack.slm.execute_lifecycle.go +++ b/esapi/api.xpack.slm.execute_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.slm.execute_retention.go b/esapi/api.xpack.slm.execute_retention.go index 3007d49f8a..48f844e278 100644 --- a/esapi/api.xpack.slm.execute_retention.go +++ b/esapi/api.xpack.slm.execute_retention.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.slm.get_lifecycle.go b/esapi/api.xpack.slm.get_lifecycle.go index 842e455fcc..0534a77333 100644 --- a/esapi/api.xpack.slm.get_lifecycle.go +++ b/esapi/api.xpack.slm.get_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.slm.get_stats.go b/esapi/api.xpack.slm.get_stats.go index 962e26afd3..33c6c0553f 100644 --- a/esapi/api.xpack.slm.get_stats.go +++ b/esapi/api.xpack.slm.get_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.slm.get_status.go b/esapi/api.xpack.slm.get_status.go index 7920546515..6f28435cb6 100644 --- a/esapi/api.xpack.slm.get_status.go +++ b/esapi/api.xpack.slm.get_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.slm.put_lifecycle.go b/esapi/api.xpack.slm.put_lifecycle.go index 0ed61d6aee..a357d594ec 100644 --- a/esapi/api.xpack.slm.put_lifecycle.go +++ b/esapi/api.xpack.slm.put_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.slm.start.go b/esapi/api.xpack.slm.start.go index 09152462eb..162ad8a019 100644 --- a/esapi/api.xpack.slm.start.go +++ b/esapi/api.xpack.slm.start.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.slm.stop.go b/esapi/api.xpack.slm.stop.go index 3081996977..a578c9fcd9 100644 --- a/esapi/api.xpack.slm.stop.go +++ b/esapi/api.xpack.slm.stop.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.sql.clear_cursor.go b/esapi/api.xpack.sql.clear_cursor.go index b9cde5ee1e..d63f2a073d 100644 --- a/esapi/api.xpack.sql.clear_cursor.go +++ b/esapi/api.xpack.sql.clear_cursor.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.sql.delete_async.go b/esapi/api.xpack.sql.delete_async.go index d8ddf80acb..e725b197e2 100644 --- a/esapi/api.xpack.sql.delete_async.go +++ b/esapi/api.xpack.sql.delete_async.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.sql.get_async.go b/esapi/api.xpack.sql.get_async.go index c6629044d8..fddef1b367 100644 --- a/esapi/api.xpack.sql.get_async.go +++ b/esapi/api.xpack.sql.get_async.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.sql.get_async_status.go b/esapi/api.xpack.sql.get_async_status.go index afb0d33885..5b8c8f75c8 100644 --- a/esapi/api.xpack.sql.get_async_status.go +++ b/esapi/api.xpack.sql.get_async_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.sql.query.go b/esapi/api.xpack.sql.query.go index 3c95c0360c..6021f70920 100644 --- a/esapi/api.xpack.sql.query.go +++ b/esapi/api.xpack.sql.query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.sql.translate.go b/esapi/api.xpack.sql.translate.go index 9370a8704e..cf89d0c785 100644 --- a/esapi/api.xpack.sql.translate.go +++ b/esapi/api.xpack.sql.translate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.ssl.certificates.go b/esapi/api.xpack.ssl.certificates.go index 30abe1ded3..a1d4c13f7b 100644 --- a/esapi/api.xpack.ssl.certificates.go +++ b/esapi/api.xpack.ssl.certificates.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.text_structure.find_field_structure.go b/esapi/api.xpack.text_structure.find_field_structure.go index 27c571f3fc..eb2649cf4d 100644 --- a/esapi/api.xpack.text_structure.find_field_structure.go +++ b/esapi/api.xpack.text_structure.find_field_structure.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi @@ -29,7 +29,7 @@ import ( func newTextStructureFindFieldStructureFunc(t Transport) TextStructureFindFieldStructure { return func(index string, field string, o ...func(*TextStructureFindFieldStructureRequest)) (*Response, error) { - var r = TextStructureFindFieldStructureRequest{Index: index, Field: field} + var r = TextStructureFindFieldStructureRequest{Field: field, Index: index} for _, f := range o { f(&r) } diff --git a/esapi/api.xpack.text_structure.find_message_structure.go b/esapi/api.xpack.text_structure.find_message_structure.go index 2226a60e3d..3700d01773 100644 --- a/esapi/api.xpack.text_structure.find_message_structure.go +++ b/esapi/api.xpack.text_structure.find_message_structure.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.text_structure.find_structure.go b/esapi/api.xpack.text_structure.find_structure.go index 12610d9fd1..8f69e372dd 100644 --- a/esapi/api.xpack.text_structure.find_structure.go +++ b/esapi/api.xpack.text_structure.find_structure.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.text_structure.test_grok_pattern.go b/esapi/api.xpack.text_structure.test_grok_pattern.go index 0110dfa0eb..18a0c7793f 100644 --- a/esapi/api.xpack.text_structure.test_grok_pattern.go +++ b/esapi/api.xpack.text_structure.test_grok_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.delete_transform.go b/esapi/api.xpack.transform.delete_transform.go index 57b66632b6..f45f829429 100644 --- a/esapi/api.xpack.transform.delete_transform.go +++ b/esapi/api.xpack.transform.delete_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.get_node_stats.go b/esapi/api.xpack.transform.get_node_stats.go index 3e646cfbd3..c676eb2614 100644 --- a/esapi/api.xpack.transform.get_node_stats.go +++ b/esapi/api.xpack.transform.get_node_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.get_transform.go b/esapi/api.xpack.transform.get_transform.go index e37c22f26c..8c1c5e2a72 100644 --- a/esapi/api.xpack.transform.get_transform.go +++ b/esapi/api.xpack.transform.get_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.get_transform_stats.go b/esapi/api.xpack.transform.get_transform_stats.go index 378ec6c159..68d44e3b17 100644 --- a/esapi/api.xpack.transform.get_transform_stats.go +++ b/esapi/api.xpack.transform.get_transform_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.preview_transform.go b/esapi/api.xpack.transform.preview_transform.go index d53d6ad745..536f3e5d32 100644 --- a/esapi/api.xpack.transform.preview_transform.go +++ b/esapi/api.xpack.transform.preview_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.put_transform.go b/esapi/api.xpack.transform.put_transform.go index e66b3994fc..bfc2a5a84c 100644 --- a/esapi/api.xpack.transform.put_transform.go +++ b/esapi/api.xpack.transform.put_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.reset_transform.go b/esapi/api.xpack.transform.reset_transform.go index 61db94fe58..edad9b0b97 100644 --- a/esapi/api.xpack.transform.reset_transform.go +++ b/esapi/api.xpack.transform.reset_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.schedule_now_transform.go b/esapi/api.xpack.transform.schedule_now_transform.go index a6a39e47d3..b7eb9be31d 100644 --- a/esapi/api.xpack.transform.schedule_now_transform.go +++ b/esapi/api.xpack.transform.schedule_now_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.start_transform.go b/esapi/api.xpack.transform.start_transform.go index 441ced3b94..cd897fc363 100644 --- a/esapi/api.xpack.transform.start_transform.go +++ b/esapi/api.xpack.transform.start_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.stop_transform.go b/esapi/api.xpack.transform.stop_transform.go index 02816a03be..2980feeef3 100644 --- a/esapi/api.xpack.transform.stop_transform.go +++ b/esapi/api.xpack.transform.stop_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.update_transform.go b/esapi/api.xpack.transform.update_transform.go index 56916b5b46..aa423679cf 100644 --- a/esapi/api.xpack.transform.update_transform.go +++ b/esapi/api.xpack.transform.update_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.transform.upgrade_transforms.go b/esapi/api.xpack.transform.upgrade_transforms.go index 4a409c7f25..6665f306d8 100644 --- a/esapi/api.xpack.transform.upgrade_transforms.go +++ b/esapi/api.xpack.transform.upgrade_transforms.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.ack_watch.go b/esapi/api.xpack.watcher.ack_watch.go index 5368d8816a..e7adef5a74 100644 --- a/esapi/api.xpack.watcher.ack_watch.go +++ b/esapi/api.xpack.watcher.ack_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.activate_watch.go b/esapi/api.xpack.watcher.activate_watch.go index 7895dab8c0..6cc5149ad6 100644 --- a/esapi/api.xpack.watcher.activate_watch.go +++ b/esapi/api.xpack.watcher.activate_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.deactivate_watch.go b/esapi/api.xpack.watcher.deactivate_watch.go index a2ce74fc75..6ded266819 100644 --- a/esapi/api.xpack.watcher.deactivate_watch.go +++ b/esapi/api.xpack.watcher.deactivate_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.delete_watch.go b/esapi/api.xpack.watcher.delete_watch.go index 6f51851f7c..80598ad950 100644 --- a/esapi/api.xpack.watcher.delete_watch.go +++ b/esapi/api.xpack.watcher.delete_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.execute_watch.go b/esapi/api.xpack.watcher.execute_watch.go index 13487baab2..2e65e96c46 100644 --- a/esapi/api.xpack.watcher.execute_watch.go +++ b/esapi/api.xpack.watcher.execute_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.get_settings.go b/esapi/api.xpack.watcher.get_settings.go index 5504455e1b..2aa58164f3 100644 --- a/esapi/api.xpack.watcher.get_settings.go +++ b/esapi/api.xpack.watcher.get_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.get_watch.go b/esapi/api.xpack.watcher.get_watch.go index 0352f2c0e6..d72eae3b83 100644 --- a/esapi/api.xpack.watcher.get_watch.go +++ b/esapi/api.xpack.watcher.get_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.put_watch.go b/esapi/api.xpack.watcher.put_watch.go index d4cacf7395..a44bb92c3c 100644 --- a/esapi/api.xpack.watcher.put_watch.go +++ b/esapi/api.xpack.watcher.put_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.query_watches.go b/esapi/api.xpack.watcher.query_watches.go index 5808d4e743..0122a30b63 100644 --- a/esapi/api.xpack.watcher.query_watches.go +++ b/esapi/api.xpack.watcher.query_watches.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.start.go b/esapi/api.xpack.watcher.start.go index 277a484c9a..efcc36d045 100644 --- a/esapi/api.xpack.watcher.start.go +++ b/esapi/api.xpack.watcher.start.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.stats.go b/esapi/api.xpack.watcher.stats.go index 6850110ea1..5dc8bbfe86 100644 --- a/esapi/api.xpack.watcher.stats.go +++ b/esapi/api.xpack.watcher.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.stop.go b/esapi/api.xpack.watcher.stop.go index d6ca0dc919..74adc5d421 100644 --- a/esapi/api.xpack.watcher.stop.go +++ b/esapi/api.xpack.watcher.stop.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.watcher.update_settings.go b/esapi/api.xpack.watcher.update_settings.go index c5ec219b2b..0041180ba4 100644 --- a/esapi/api.xpack.watcher.update_settings.go +++ b/esapi/api.xpack.watcher.update_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.xpack.info.go b/esapi/api.xpack.xpack.info.go index f44342be90..1cd9646045 100644 --- a/esapi/api.xpack.xpack.info.go +++ b/esapi/api.xpack.xpack.info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/api.xpack.xpack.usage.go b/esapi/api.xpack.xpack.usage.go index f6943cd208..a4a080ffe2 100644 --- a/esapi/api.xpack.xpack.usage.go +++ b/esapi/api.xpack.xpack.usage.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.16.0: DO NOT EDIT +// Code generated from specification version 8.17.0: DO NOT EDIT package esapi diff --git a/esapi/test/go.mod b/esapi/test/go.mod index 1239edc610..a12b3bc039 100644 --- a/esapi/test/go.mod +++ b/esapi/test/go.mod @@ -1,8 +1,8 @@ module github.com/elastic/go-elasticsearch/v8/esapi/test -go 1.21 +go 1.22 -toolchain go1.22.5 +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../../ diff --git a/go.mod b/go.mod index aa45dfaa45..879c2d007a 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,8 @@ module github.com/elastic/go-elasticsearch/v8 -go 1.21 -toolchain go1.21.0 +go 1.22 + +toolchain go1.22.0 require ( github.com/elastic/elastic-transport-go/v8 v8.6.0 diff --git a/internal/build/cmd/generate/commands/gentests/skips.go b/internal/build/cmd/generate/commands/gentests/skips.go index 6766e349e7..756b5b7aa3 100644 --- a/internal/build/cmd/generate/commands/gentests/skips.go +++ b/internal/build/cmd/generate/commands/gentests/skips.go @@ -65,8 +65,15 @@ var skipFiles = []string{ "dlm/10_usage.yml", // incompatible float expansion "api_key/60_admin_user.yml", ".*esql\\/.*.yml", + "ingest_geoip/.*.yml", "deprecation/10_basic.yml", // incompatible test generation "search/520_fetch_fields.yml", // disabled for inconsistency + "ingest_geoip/20_geoip_processor.yml", + "cluster.stats/.*.yml", // incompatible cluster test + "get/100_synthetic_source.yml", // unsupported file upload + "indices.create/20_synthetic_source.yml", + "indices.create/21_synthetic_source_stored.yml", + "range/20_synthetic_source.yml", } // TODO: Comments into descriptions for `Skip()` @@ -224,6 +231,9 @@ tsdb/40_search.yml: tsdb/70_dimension_types.yml: - flattened field missing routing path field +tsdb/20_mapping.yml: + - disabled source is not supported + # Deliberate wrong type doesn't match Go types cluster.desired_nodes/10_basic.yml: - Test version must be a number @@ -358,6 +368,7 @@ ml/text_expansion_search_rank_features.yml: # TEMPORARY: Missing 'body: { indices: "test_index" }' payload, TODO: PR snapshot/10_basic.yml: - Create a source only snapshot and then restore it + - Failed to snapshot indices with synthetic source # illegal_argument_exception: Provided password hash uses [NOOP] but the configured hashing algorithm is [BCRYPT] users/10_basic.yml: @@ -464,6 +475,8 @@ nodes.stats/11_indices_metrics.yml: - Metric - blank for indices shards - Metric - _all for indices shards - indices shards total count test + - Lucene segment level fields stats + data_stream/10_data_stream_resolvability.yml: - Verify data stream resolvability in ILM remove policy API @@ -522,18 +535,13 @@ ml/learning_to_rank_rescorer.yml: aggregations/max_metric.yml: - Merging results with unmapped fields -# unsupported file upload -get/100_synthetic_source.yml: - - indexed dense vectors - - non-indexed dense vectors - - fields with ignore_malformed - - flattened field with ignore_above - indices.stats/70_write_load.yml: - Write load average is tracked at shard level search/400_synthetic_source.yml: - stored keyword without sibling fields + - doc values keyword with ignore_above + - stored keyword with ignore_above health/10_usage.yml: - Usage stats on the health API @@ -568,4 +576,28 @@ search/520_fetch_fields.yml: spatial/140_synthetic_source.yml: - point + +index/92_metrics_auto_subobjects.yml: + - Metrics object indexing with synthetic source + +index/91_metrics_no_subobjects.yml: + - Metrics object indexing with synthetic source + +logsdb/20_source_mapping.yml: + - synthetic _source is default + - disabled _source is not supported + +search/600_flattened_ignore_above.yml: + - flattened ignore_above single-value field + +search/540_ignore_above_synthetic_source.yml: + - ignore_above mapping level setting on arrays + - ignore_above mapping overrides setting on arrays + +search.suggest/20_phrase.yml: + - breaks ties by sorting terms + +update/100_synthetic_source.yml: + - keyword + - stored text ` diff --git a/internal/build/go.mod b/internal/build/go.mod index 067e5ec37b..26ef97c6fa 100644 --- a/internal/build/go.mod +++ b/internal/build/go.mod @@ -1,7 +1,8 @@ module github.com/elastic/go-elasticsearch/v8/internal/build -go 1.21 -toolchain go1.21.0 +go 1.22 + +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ../../ diff --git a/internal/testing/go.mod b/internal/testing/go.mod index 27b491d696..40d7014d76 100644 --- a/internal/testing/go.mod +++ b/internal/testing/go.mod @@ -1,28 +1,30 @@ module testing -go 1.21 -toolchain go1.21.0 +go 1.22 +toolchain go1.22.0 replace github.com/elastic/go-elasticsearch/v8 => ./../.. require ( github.com/elastic/elastic-transport-go/v8 v8.6.0 github.com/elastic/go-elasticsearch/v8 v8.14.0 - github.com/testcontainers/testcontainers-go v0.31.0 - github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.31.0 + github.com/testcontainers/testcontainers-go v0.34.0 + github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.34.0 ) require ( dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/Microsoft/hcsshim v0.11.5 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/containerd/containerd v1.7.15 // indirect + github.com/containerd/containerd v1.7.18 // indirect github.com/containerd/log v0.1.0 // indirect - github.com/cpuguy83/dockercfg v0.3.1 // indirect - github.com/distribution/reference v0.5.0 // indirect - github.com/docker/docker v25.0.5+incompatible // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v27.1.1+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -32,9 +34,10 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/klauspost/compress v1.16.0 // indirect + github.com/klauspost/compress v1.17.4 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/sys/user v0.1.0 // indirect @@ -43,10 +46,12 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/shirou/gopsutil/v3 v3.23.12 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // indirect + github.com/stretchr/testify v1.9.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect @@ -54,11 +59,12 @@ require ( go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect go.opentelemetry.io/otel/trace v1.28.0 // indirect - golang.org/x/crypto v0.23.0 // indirect + golang.org/x/crypto v0.24.0 // indirect golang.org/x/mod v0.16.0 // indirect - golang.org/x/sys v0.20.0 // indirect + golang.org/x/sys v0.21.0 // indirect golang.org/x/tools v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d // indirect - google.golang.org/grpc v1.58.3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/grpc v1.64.1 // indirect google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/testing/go.sum b/internal/testing/go.sum index 1fce32d1f0..8b10e01b8a 100644 --- a/internal/testing/go.sum +++ b/internal/testing/go.sum @@ -6,16 +6,25 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOEl github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= +github.com/Microsoft/hcsshim v0.11.5/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/containerd/containerd v1.7.15 h1:afEHXdil9iAm03BmhjzKyXnnEBtjaLJefdU7DV0IFes= github.com/containerd/containerd v1.7.15/go.mod h1:ISzRRTMF8EXNpJlTzyr2XMhN+j9K302C21/+cr3kUnY= +github.com/containerd/containerd v1.7.18 h1:jqjZTQNfXGoEaZdW1WwPU0RqSn1Bm2Ay/KJPUuO8nao= +github.com/containerd/containerd v1.7.18/go.mod h1:IYEk9/IO6wAPUz2bCMVUbsfXjzw5UNP5fLz4PsUygQ4= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -23,8 +32,12 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= +github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -56,10 +69,14 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= @@ -99,8 +116,12 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.31.0 h1:W0VwIhcEVhRflwL9as3dhY6jXjVCA27AkmbnZ+UTh3U= github.com/testcontainers/testcontainers-go v0.31.0/go.mod h1:D2lAoA0zUFiSY+eAflqK5mcUx/A5hrrORaEQrd0SefI= +github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= +github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.31.0 h1:KBbU/rVL3RhrFYcrVGY+NDw3x3Ho2YlJUnjbIOsL6jk= github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.31.0/go.mod h1:7YQbgJUoNDztnXWAdCRtI+gUqBM+URd83JzwYlzwGhQ= +github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.34.0 h1:BBwJUs9xBpt1uOfO+yAr2pYW75MsyzuO/o70HTPnhe4= +github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.34.0/go.mod h1:OqhRGYR+5VG0Dw506F6Ho9I4YG1kB+o9uPTKC0uPUA8= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -130,6 +151,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= @@ -157,6 +180,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -180,8 +205,10 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1: google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d h1:pgIUhmqwKOUlnKna4r6amKdUngdL8DrkpFeV8+VBElY= google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/version/version.go b/internal/version/version.go index 1adc3470fd..8a0a96b8e2 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -18,4 +18,4 @@ package version // Client returns the client version as a string. -const Client = "8.16.0-SNAPSHOT" +const Client = "8.17.0-SNAPSHOT" diff --git a/typedapi/api._.go b/typedapi/api._.go index b143d085de..aca5ecc695 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package typedapi @@ -251,10 +251,13 @@ import ( inference_get "github.com/elastic/go-elasticsearch/v8/typedapi/inference/get" inference_inference "github.com/elastic/go-elasticsearch/v8/typedapi/inference/inference" inference_put "github.com/elastic/go-elasticsearch/v8/typedapi/inference/put" + ingest_delete_geoip_database "github.com/elastic/go-elasticsearch/v8/typedapi/ingest/deletegeoipdatabase" ingest_delete_pipeline "github.com/elastic/go-elasticsearch/v8/typedapi/ingest/deletepipeline" ingest_geo_ip_stats "github.com/elastic/go-elasticsearch/v8/typedapi/ingest/geoipstats" + ingest_get_geoip_database "github.com/elastic/go-elasticsearch/v8/typedapi/ingest/getgeoipdatabase" ingest_get_pipeline "github.com/elastic/go-elasticsearch/v8/typedapi/ingest/getpipeline" ingest_processor_grok "github.com/elastic/go-elasticsearch/v8/typedapi/ingest/processorgrok" + ingest_put_geoip_database "github.com/elastic/go-elasticsearch/v8/typedapi/ingest/putgeoipdatabase" ingest_put_pipeline "github.com/elastic/go-elasticsearch/v8/typedapi/ingest/putpipeline" ingest_simulate "github.com/elastic/go-elasticsearch/v8/typedapi/ingest/simulate" license_delete "github.com/elastic/go-elasticsearch/v8/typedapi/license/delete" @@ -362,6 +365,7 @@ import ( query_rules_list_rulesets "github.com/elastic/go-elasticsearch/v8/typedapi/queryrules/listrulesets" query_rules_put_rule "github.com/elastic/go-elasticsearch/v8/typedapi/queryrules/putrule" query_rules_put_ruleset "github.com/elastic/go-elasticsearch/v8/typedapi/queryrules/putruleset" + query_rules_test "github.com/elastic/go-elasticsearch/v8/typedapi/queryrules/test" rollup_delete_job "github.com/elastic/go-elasticsearch/v8/typedapi/rollup/deletejob" rollup_get_jobs "github.com/elastic/go-elasticsearch/v8/typedapi/rollup/getjobs" rollup_get_rollup_caps "github.com/elastic/go-elasticsearch/v8/typedapi/rollup/getrollupcaps" @@ -442,6 +446,7 @@ import ( security_saml_service_provider_metadata "github.com/elastic/go-elasticsearch/v8/typedapi/security/samlserviceprovidermetadata" security_suggest_user_profiles "github.com/elastic/go-elasticsearch/v8/typedapi/security/suggestuserprofiles" security_update_api_key "github.com/elastic/go-elasticsearch/v8/typedapi/security/updateapikey" + security_update_cross_cluster_api_key "github.com/elastic/go-elasticsearch/v8/typedapi/security/updatecrossclusterapikey" security_update_settings "github.com/elastic/go-elasticsearch/v8/typedapi/security/updatesettings" security_update_user_profile_data "github.com/elastic/go-elasticsearch/v8/typedapi/security/updateuserprofiledata" shutdown_delete_node "github.com/elastic/go-elasticsearch/v8/typedapi/shutdown/deletenode" @@ -464,6 +469,7 @@ import ( snapshot_delete_repository "github.com/elastic/go-elasticsearch/v8/typedapi/snapshot/deleterepository" snapshot_get "github.com/elastic/go-elasticsearch/v8/typedapi/snapshot/get" snapshot_get_repository "github.com/elastic/go-elasticsearch/v8/typedapi/snapshot/getrepository" + snapshot_repository_verify_integrity "github.com/elastic/go-elasticsearch/v8/typedapi/snapshot/repositoryverifyintegrity" snapshot_restore "github.com/elastic/go-elasticsearch/v8/typedapi/snapshot/restore" snapshot_status "github.com/elastic/go-elasticsearch/v8/typedapi/snapshot/status" snapshot_verify_repository "github.com/elastic/go-elasticsearch/v8/typedapi/snapshot/verifyrepository" @@ -518,8 +524,9 @@ import ( ) type AsyncSearch struct { - // Deletes an async search by identifier. - // If the search is still running, the search request will be cancelled. + // 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 @@ -527,29 +534,33 @@ type AsyncSearch struct { // privilege. // https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html Delete async_search_delete.NewDelete - // Retrieves the results of a previously submitted async search request given - // its identifier. + // Get async search results. + // + // Retrieve the results of a previously submitted asynchronous search request. // If the Elasticsearch security features are enabled, access to the results of // a specific async search is restricted to the user or API key that submitted // it. // https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html Get async_search_get.NewGet - // Get async search status - // Retrieves the status of a previously submitted async search request given its + // 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, use of this API is // restricted to the `monitoring_user` role. // https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html Status async_search_status.NewStatus - // Runs a search request asynchronously. + // 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, hence - // partial results become available following the sort criteria that was - // requested. - // Warning: Async search does not support scroll nor search requests that only - // include the suggest section. - // By default, Elasticsearch doesn’t allow you to store an async search response - // larger than 10Mb and an attempt to do this results in an error. + // based on minimum and maximum value that they hold for that field. Partial + // results become available following the sort criteria that was requested. + // + // Warning: Asynchronous search does not support scroll or search requests that + // include only the suggest section. + // + // By default, Elasticsearch does not allow you to store an async search + // response larger than 10Mb and an attempt to do this results in an error. // The maximum allowed size for a stored async search response can be set by // changing the `search.max_async_search_response_size` cluster level setting. // https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html @@ -557,21 +568,50 @@ type AsyncSearch struct { } type Autoscaling struct { - // Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. - // Direct use is not supported. + // Delete an autoscaling policy. + // + // NOTE: This feature is designed for indirect use by Elasticsearch Service, + // Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + // supported. // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html DeleteAutoscalingPolicy autoscaling_delete_autoscaling_policy.NewDeleteAutoscalingPolicy - // Gets the current autoscaling capacity based on the configured autoscaling - // policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not + // Get the autoscaling capacity. + // + // NOTE: This feature is designed for indirect use by Elasticsearch Service, + // Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not // supported. + // + // This API gets the current autoscaling capacity based on the configured + // autoscaling policy. + // It will return information to size the cluster appropriately to the current + // workload. + // + // The `required_capacity` is calculated as the maximum of the + // `required_capacity` result of all individual deciders that are enabled for + // the policy. + // + // The operator should verify that the `current_nodes` match the operator’s + // knowledge of the cluster to avoid making autoscaling decisions based on stale + // or incomplete information. + // + // The response contains decider-specific information you can use to diagnose + // how and why autoscaling determined a certain capacity was required. + // This information is provided for diagnosis only. + // Do not use this information to make autoscaling decisions. // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html GetAutoscalingCapacity autoscaling_get_autoscaling_capacity.NewGetAutoscalingCapacity - // Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and - // ECK. Direct use is not supported. + // Get an autoscaling policy. + // + // NOTE: This feature is designed for indirect use by Elasticsearch Service, + // Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + // supported. // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html GetAutoscalingPolicy autoscaling_get_autoscaling_policy.NewGetAutoscalingPolicy - // Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and - // ECK. Direct use is not supported. + // Create or update an autoscaling policy. + // + // NOTE: This feature is designed for indirect use by Elasticsearch Service, + // Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + // supported. // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html PutAutoscalingPolicy autoscaling_put_autoscaling_policy.NewPutAutoscalingPolicy } @@ -819,57 +859,144 @@ type Cat struct { } type Ccr struct { - // Deletes auto-follow patterns. + // Delete auto-follow patterns. + // Delete a collection of cross-cluster replication auto-follow patterns. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html DeleteAutoFollowPattern ccr_delete_auto_follow_pattern.NewDeleteAutoFollowPattern - // Creates a new follower index configured to follow the referenced leader - // index. + // Create a follower. + // Create a cross-cluster replication follower index that follows a specific + // leader index. + // When the API returns, the follower index exists and cross-cluster replication + // starts replicating operations from the leader index to the follower index. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html Follow ccr_follow.NewFollow - // Retrieves information about all follower indices, including parameters and - // status for each follower 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/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html FollowInfo ccr_follow_info.NewFollowInfo - // Retrieves follower stats. return shard-level stats about the following tasks - // associated with each shard for the specified indices. + // Get follower stats. + // Get cross-cluster replication follower stats. + // The API returns shard-level stats about the "following tasks" associated with + // each shard for the specified indices. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html FollowStats ccr_follow_stats.NewFollowStats - // Removes the follower retention leases from the leader. + // Forget a follower. + // Remove the cross-cluster replication follower retention leases from the + // leader. + // + // A following index takes out retention leases on its leader index. + // These leases are used to increase the likelihood that the shards of the + // leader index retain the history of operations that the shards of the + // following index need to run replication. + // When a follower index is converted to a regular index by the unfollow API + // (either by directly calling the API or by index lifecycle management tasks), + // these leases are removed. + // However, removal of the leases can fail, for example when the remote cluster + // containing the leader index is unavailable. + // While the leases will eventually expire on their own, their extended + // existence can cause the leader index to hold more history than necessary and + // prevent index lifecycle management from performing some operations on the + // leader index. + // This API exists to enable manually removing the leases when the unfollow API + // is unable to do so. + // + // NOTE: This API does not stop replication by a following index. If you use + // this API with a follower index that is still actively following, the + // following index will add back retention leases on the leader. + // The only purpose of this API is to handle the case of failure to remove the + // following retention leases after the unfollow API is invoked. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html ForgetFollower ccr_forget_follower.NewForgetFollower - // Gets configured auto-follow patterns. Returns the specified auto-follow - // pattern collection. + // Get auto-follow patterns. + // Get cross-cluster replication auto-follow patterns. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html GetAutoFollowPattern ccr_get_auto_follow_pattern.NewGetAutoFollowPattern - // Pauses an auto-follow pattern + // Pause an auto-follow pattern. + // Pause a cross-cluster replication auto-follow pattern. + // When the API returns, the auto-follow pattern is inactive. + // New indices that are created on the remote cluster and match the auto-follow + // patterns are ignored. + // + // You can resume auto-following with the resume auto-follow pattern API. + // When it resumes, the auto-follow pattern is active again and automatically + // configures follower indices for newly created indices on the remote cluster + // that match its patterns. + // Remote indices that were created while the pattern was paused will also be + // followed, unless they have been deleted or closed in the interim. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html PauseAutoFollowPattern ccr_pause_auto_follow_pattern.NewPauseAutoFollowPattern - // Pauses a follower index. The follower index will not fetch any additional - // operations from the leader index. + // Pause a follower. + // Pause a cross-cluster replication follower index. + // The follower index will not fetch any additional operations from the leader + // index. + // You can resume following with the resume follower API. + // You can pause and resume a follower index to change the configuration of the + // following task. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html PauseFollow ccr_pause_follow.NewPauseFollow - // Creates a new named collection of auto-follow patterns against a specified - // remote cluster. Newly created indices on the remote cluster matching any of - // the specified patterns will be automatically configured as follower indices. + // Create or update auto-follow patterns. + // Create a collection of cross-cluster replication auto-follow patterns for a + // remote cluster. + // Newly created indices on the remote cluster that match any of the patterns + // are automatically configured as follower indices. + // Indices on the remote cluster that were created before the auto-follow + // pattern was created will not be auto-followed even if they match the pattern. + // + // This API can also be used to update auto-follow patterns. + // NOTE: Follower indices that were configured automatically before updating an + // auto-follow pattern will remain unchanged even if they do not match against + // the new patterns. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html PutAutoFollowPattern ccr_put_auto_follow_pattern.NewPutAutoFollowPattern - // Resumes an auto-follow pattern that has been paused + // Resume an auto-follow pattern. + // Resume a cross-cluster replication auto-follow pattern that was paused. + // The auto-follow pattern will resume configuring following indices for newly + // created indices that match its patterns on the remote cluster. + // Remote indices created while the pattern was paused will also be followed + // unless they have been deleted or closed in the interim. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html ResumeAutoFollowPattern ccr_resume_auto_follow_pattern.NewResumeAutoFollowPattern - // Resumes a follower index that has been paused + // Resume a follower. + // Resume a cross-cluster replication follower index that was paused. + // The follower index could have been paused with the pause follower API. + // Alternatively it could be paused due to replication that cannot be retried + // due to failures during following tasks. + // When this API returns, the follower index will resume fetching operations + // from the leader index. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html ResumeFollow ccr_resume_follow.NewResumeFollow - // Gets all stats related to cross-cluster replication. + // Get cross-cluster replication stats. + // This API returns stats about auto-following and the same shard-level stats as + // the get follower stats API. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html Stats ccr_stats.NewStats - // Stops the following task associated with a follower index and removes index - // metadata and settings associated with cross-cluster replication. + // 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. + // + // NOTE: Currently cross-cluster replication does not support converting an + // existing regular index to a follower index. Converting a follower index to a + // regular index is an irreversible operation. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html Unfollow ccr_unfollow.NewUnfollow } type Cluster struct { - // Provides explanations for shard allocations in the cluster. + // Explain the shard allocations. + // Get explanations for shard allocations in the cluster. + // For unassigned shards, it provides an explanation for why the shard is + // unassigned. + // For assigned shards, it provides an explanation for why the shard is + // remaining on its current node and has not moved or rebalanced to another + // node. + // This API can be very useful when attempting to diagnose why a shard is + // unassigned or why a shard continues to remain on its current node when you + // might expect otherwise. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html AllocationExplain cluster_allocation_explain.NewAllocationExplain // Delete component templates. @@ -878,7 +1005,8 @@ type Cluster struct { // specify index mappings, settings, and aliases. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html DeleteComponentTemplate cluster_delete_component_template.NewDeleteComponentTemplate - // Clears cluster voting config exclusions. + // Clear cluster voting config exclusions. + // Remove master-eligible nodes from the voting configuration exclusion list. // https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html DeleteVotingConfigExclusions cluster_delete_voting_config_exclusions.NewDeleteVotingConfigExclusions // Check component templates. @@ -889,30 +1017,37 @@ type Cluster struct { // Retrieves information about component templates. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html GetComponentTemplate cluster_get_component_template.NewGetComponentTemplate - // Returns cluster-wide settings. + // Get cluster-wide settings. // By default, it returns only settings that have been explicitly defined. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-get-settings.html GetSettings cluster_get_settings.NewGetSettings - // The cluster health API returns a simple status on the health of the cluster. + // 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, and - // green means that all shards are allocated. The index level status is - // controlled by the worst shard status. The cluster status is controlled by the - // worst index status. + // streams and indices. + // For data streams, the API retrieves the health status of the stream’s backing + // indices. + // + // The cluster health status is: green, yellow or red. + // On the shard level, a red status indicates that the specific shard is not + // allocated in the cluster. Yellow means that the primary shard is allocated + // but replicas are not. Green means that all shards are allocated. + // The index level status is controlled by the worst shard status. + // + // One of the main benefits of the API is the ability to wait until the cluster + // reaches a certain high watermark health level. + // The cluster status is controlled by the worst index status. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html Health cluster_health.NewHealth // Get cluster info. // Returns basic information about the cluster. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-info.html Info cluster_info.NewInfo - // Returns cluster-level changes (such as create index, update mapping, allocate - // or fail shard) that have not yet been executed. + // 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 + // 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 @@ -920,7 +1055,45 @@ type Cluster struct { // task api and pending cluster tasks API. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-pending.html PendingTasks cluster_pending_tasks.NewPendingTasks - // Updates the cluster voting config exclusions by node ids or node names. + // 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/guide/en/elasticsearch/reference/current/voting-config-exclusions.html PostVotingConfigExclusions cluster_post_voting_config_exclusions.NewPostVotingConfigExclusions // Create or update a component template. @@ -949,22 +1122,113 @@ type Cluster struct { // opening curly bracket. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html PutComponentTemplate cluster_put_component_template.NewPutComponentTemplate - // Updates the cluster settings. + // Update the cluster settings. + // Configure and update dynamic settings on a running cluster. + // You can also configure dynamic settings locally on an unstarted or shut down + // node in `elasticsearch.yml`. + // + // Updates made with this API can be persistent, which apply across cluster + // restarts, or transient, which reset after a cluster restart. + // You can also reset transient or persistent settings by assigning them a null + // value. + // + // If you configure the same setting using multiple methods, Elasticsearch + // applies the settings in following order of precedence: 1) Transient setting; + // 2) Persistent setting; 3) `elasticsearch.yml` setting; 4) Default setting + // value. + // For example, you can apply a transient setting to override a persistent + // setting or `elasticsearch.yml` setting. + // However, a change to an `elasticsearch.yml` setting will not override a + // defined transient or persistent setting. + // + // TIP: In Elastic Cloud, use the user settings feature to configure all cluster + // settings. This method automatically rejects unsafe settings that could break + // your cluster. + // If you run Elasticsearch on your own hardware, use this API to configure + // dynamic cluster settings. + // Only use `elasticsearch.yml` for static cluster settings and node settings. + // The API doesn’t require a restart and ensures a setting’s value is the same + // on all nodes. + // + // WARNING: Transient cluster settings are no longer recommended. Use persistent + // cluster settings instead. + // If a cluster becomes unstable, transient settings can clear unexpectedly, + // resulting in a potentially undesired cluster configuration. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html PutSettings cluster_put_settings.NewPutSettings - // The cluster remote info API allows you to retrieve all of the configured - // remote cluster information. It returns connection and endpoint information - // keyed by the configured remote cluster alias. + // Get remote cluster information. + // Get all of the configured remote cluster information. + // This API returns connection and endpoint information keyed by the configured + // remote cluster alias. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-remote-info.html RemoteInfo cluster_remote_info.NewRemoteInfo - // Allows to manually change the allocation of individual shards in the cluster. + // Reroute the cluster. + // Manually change the allocation of individual shards in the cluster. + // For example, a shard can be moved from one node to another explicitly, an + // allocation can be canceled, and an unassigned shard can be explicitly + // allocated to a specific node. + // + // It is important to note that after processing any reroute commands + // Elasticsearch will perform rebalancing as normal (respecting the values of + // settings such as `cluster.routing.rebalance.enable`) in order to remain in a + // balanced state. + // For example, if the requested allocation includes moving a shard from node1 + // to node2 then this may cause a shard to be moved from node2 back to node1 to + // even things out. + // + // The cluster can be set to disable allocations using the + // `cluster.routing.allocation.enable` setting. + // If allocations are disabled then the only allocations that will be performed + // are explicit ones given using the reroute command, and consequent allocations + // due to rebalancing. + // + // The cluster will attempt to allocate a shard a maximum of + // `index.allocation.max_retries` times in a row (defaults to `5`), before + // giving up and leaving the shard unallocated. + // This scenario can be caused by structural problems such as having an analyzer + // which refers to a stopwords file which doesn’t exist on all nodes. + // + // Once the problem has been corrected, allocation can be manually retried by + // calling the reroute API with the `?retry_failed` URI query parameter, which + // will attempt a single retry round for these shards. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html Reroute cluster_reroute.NewReroute - // Returns a comprehensive information about the state of the cluster. + // Get the cluster state. + // Get comprehensive information about the state of the cluster. + // + // The cluster state is an internal data structure which keeps track of a + // variety of information needed by every node, including the identity and + // attributes of the other nodes in the cluster; cluster-wide settings; index + // metadata, including the mapping and settings for each index; the location and + // status of every shard copy in the cluster. + // + // The elected master node ensures that every node in the cluster has a copy of + // the same cluster state. + // This API lets you retrieve a representation of this internal state for + // debugging or diagnostic purposes. + // You may need to consult the Elasticsearch source code to determine the + // precise meaning of the response. + // + // By default the API will route requests to the elected master node since this + // node is the authoritative source of cluster states. + // You can also retrieve the cluster state held on the node handling the API + // request by adding the `?local=true` query parameter. + // + // Elasticsearch may need to expend significant effort to compute a response to + // this API in larger clusters, and the response may comprise a very large + // quantity of data. + // If you use this API repeatedly, your cluster may become unstable. + // + // WARNING: The response is a representation of an internal data structure. + // Its format is not subject to the same compatibility guarantees as other more + // stable APIs and may change from version to version. + // Do not query this API using external monitoring tools. + // Instead, obtain the information you require using other more stable cluster + // APIs. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html State cluster_state.NewState - // Returns cluster statistics. - // It returns basic index metrics (shard numbers, store size, memory usage) and + // Get cluster statistics. + // Get basic index metrics (shard numbers, store size, memory usage) and // information about the current nodes that form the cluster (number, roles, os, // jvm versions, memory usage, cpu and installed plugins). // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html @@ -972,83 +1236,152 @@ type Cluster struct { } type Connector struct { - // Updates the last_seen field in the connector, and sets it to current - // timestamp + // Check in a connector. + // + // Update the `last_seen` field in the connector and set it to the current + // timestamp. // https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-api.html CheckIn connector_check_in.NewCheckIn - // Deletes a connector. + // Delete a connector. + // + // Removes a connector and associated sync jobs. + // This is a destructive action that is not recoverable. + // NOTE: This action doesn’t delete any API keys, ingest pipelines, or data + // indices associated with the connector. + // These need to be removed manually. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-api.html Delete connector_delete.NewDelete - // Retrieves a connector. + // Get a connector. + // + // Get the details about a connector. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-api.html Get connector_get.NewGet - // Updates last sync stats in the connector document + // Update the connector last sync stats. + // + // Update the fields related to the last sync of a connector. + // This action is used for analytics and monitoring. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-last-sync-api.html LastSync connector_last_sync.NewLastSync - // Returns existing connectors. + // Get all connectors. + // + // Get information about all connectors. // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-api.html List connector_list.NewList - // Creates a connector. + // Create a connector. + // + // Connectors are Elasticsearch integrations that bring content from third-party + // data sources, which can be deployed on Elastic Cloud or hosted on your own + // infrastructure. + // Elastic managed connectors (Native connectors) are a managed service on + // Elastic Cloud. + // Self-managed connectors (Connector clients) are self-managed on your + // infrastructure. // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html Post connector_post.NewPost - // Creates or updates a connector. + // Create or update a connector. // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html Put connector_put.NewPut // Creates a secret for a Connector. // SecretPost connector_secret_post.NewSecretPost - // Cancels a connector sync job. + // Cancel a connector sync job. + // + // Cancel a connector sync job, which sets the status to cancelling and updates + // `cancellation_requested_at` to the current time. + // The connector service is then responsible for setting the status of connector + // sync jobs to cancelled. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cancel-connector-sync-job-api.html SyncJobCancel connector_sync_job_cancel.NewSyncJobCancel - // Deletes a connector sync job. + // Delete a connector sync job. + // + // Remove a connector sync job and its associated data. + // This is a destructive action that is not recoverable. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-sync-job-api.html SyncJobDelete connector_sync_job_delete.NewSyncJobDelete - // Retrieves a connector sync job. + // Get a connector sync job. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-sync-job-api.html SyncJobGet connector_sync_job_get.NewSyncJobGet - // Lists connector sync jobs. + // Get all connector sync jobs. + // + // Get information about all stored connector sync jobs listed by their creation + // date in ascending order. // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-sync-jobs-api.html SyncJobList connector_sync_job_list.NewSyncJobList - // Creates a connector sync job. + // Create a connector sync job. + // + // Create a connector sync job document in the internal index and initialize its + // counters and timestamps with default values. // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-sync-job-api.html SyncJobPost connector_sync_job_post.NewSyncJobPost + // Activate the connector draft filter. + // // Activates the valid draft filtering for a connector. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html UpdateActiveFiltering connector_update_active_filtering.NewUpdateActiveFiltering - // Updates the API key id in the connector document + // Update the connector API key ID. + // + // Update the `api_key_id` and `api_key_secret_id` fields of a connector. + // You can specify the ID of the API key used for authorization and the ID of + // the connector secret where the API key is stored. + // The connector secret ID is required only for Elastic managed (native) + // connectors. + // Self-managed connectors (connector clients) do not use this field. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-api-key-id-api.html UpdateApiKeyId connector_update_api_key_id.NewUpdateApiKeyId - // Updates the configuration field in the connector document + // Update the connector configuration. + // + // Update the configuration field in the connector document. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-configuration-api.html UpdateConfiguration connector_update_configuration.NewUpdateConfiguration - // Updates the filtering field in the connector document + // Update the connector error field. + // + // Set the error field for the connector. + // If the error provided in the request body is non-null, the connector’s status + // is updated to error. + // Otherwise, if the error is reset to null, the connector status is updated to + // connected. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-error-api.html UpdateError connector_update_error.NewUpdateError - // Updates the filtering field in the connector document + // Update the connector filtering. + // + // Update the draft filtering configuration of a connector and marks the draft + // validation state as edited. + // The filtering draft is activated once validated by the running Elastic + // connector service. + // The filtering property is used to configure sync rules (both basic and + // advanced) for a connector. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html UpdateFiltering connector_update_filtering.NewUpdateFiltering - // Updates the draft filtering validation info for a connector. + // Update the connector draft filtering validation. + // + // Update the draft filtering validation info for a connector. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-validation-api.html UpdateFilteringValidation connector_update_filtering_validation.NewUpdateFilteringValidation - // Updates the index_name in the connector document + // Update the connector index name. + // + // Update the `index_name` field of a connector, specifying the index where the + // data ingested by the connector is stored. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-index-name-api.html UpdateIndexName connector_update_index_name.NewUpdateIndexName - // Updates the name and description fields in the connector document + // Update the connector name and description. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-name-description-api.html UpdateName connector_update_name.NewUpdateName - // Updates the is_native flag in the connector document + // Update the connector is_native flag. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-native-api.html UpdateNative connector_update_native.NewUpdateNative - // Updates the pipeline field in the connector document + // Update the connector pipeline. + // + // When you create a new connector, the configuration of an ingest pipeline is + // populated with default settings. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-pipeline-api.html UpdatePipeline connector_update_pipeline.NewUpdatePipeline - // Updates the scheduling field in the connector document + // Update the connector scheduling. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-scheduling-api.html UpdateScheduling connector_update_scheduling.NewUpdateScheduling - // Updates the service type of the connector + // Update the connector service type. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-service-type-api.html UpdateServiceType connector_update_service_type.NewUpdateServiceType - // Updates the status of the connector + // Update the connector status. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-status-api.html UpdateStatus connector_update_status.NewUpdateStatus } @@ -1059,13 +1392,24 @@ type Core struct { // This reduces overhead and can greatly increase indexing speed. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html Bulk core_bulk.NewBulk - // Clears the search context and results for a scrolling search. + // Clear a scrolling search. + // + // Clear the search context and results for a scrolling search. // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html ClearScroll core_clear_scroll.NewClearScroll - // Closes a point-in-time. + // Close a point in time. + // + // A point in time must be opened explicitly before being used in search + // requests. + // The `keep_alive` parameter tells Elasticsearch how long it should persist. + // A point in time is automatically closed when the `keep_alive` period has + // elapsed. + // However, keeping points in time has a cost; close them as soon as they are no + // longer required for search requests. // https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html ClosePointInTime core_close_point_in_time.NewClosePointInTime - // Returns number of documents matching a query. + // Count search results. + // Get the number of documents matching a query. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html Count core_count.NewCount // Index a document. @@ -1083,8 +1427,13 @@ type Core struct { // Deletes documents that match the specified query. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html DeleteByQuery core_delete_by_query.NewDeleteByQuery - // Changes the number of requests per second for a particular Delete By Query + // Throttle a delete by query operation. + // + // Change the number of requests per second for a particular delete by query // operation. + // Rethrottling that speeds up the query takes effect immediately but + // rethrotting that slows down the query takes effect after completing the + // current batch to prevent scroll timeouts. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html DeleteByQueryRethrottle core_delete_by_query_rethrottle.NewDeleteByQueryRethrottle // Delete a script or search template. @@ -1104,12 +1453,15 @@ type Core struct { // a query. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html Explain core_explain.NewExplain - // The field capabilities API returns the information about the capabilities of - // fields among multiple indices. - // The field capabilities API returns runtime fields like any other field. For - // example, a runtime field with a type - // of keyword is returned as any other field that belongs to the `keyword` - // family. + // Get the field capabilities. + // + // Get information about the capabilities of fields among multiple indices. + // + // For data streams, the API returns field capabilities among the stream’s + // backing indices. + // It returns runtime fields like any other field. + // For example, a runtime field with a type of keyword is returned the same as + // any other field that belongs to the `keyword` family. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html FieldCaps core_field_caps.NewFieldCaps // Get a document by its ID. @@ -1120,17 +1472,50 @@ type Core struct { // Retrieves a stored script or search template. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html GetScript core_get_script.NewGetScript - // Returns all script contexts. + // Get script contexts. + // + // Get a list of supported script contexts and their methods. // https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-contexts.html GetScriptContext core_get_script_context.NewGetScriptContext - // Returns available script types, languages and contexts + // Get script languages. + // + // Get a list of available script types, languages, and contexts. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html GetScriptLanguages core_get_script_languages.NewGetScriptLanguages // Get a document's source. // Returns the source of a document. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html GetSource core_get_source.NewGetSource - // Returns the health of the cluster. + // Get the cluster health. + // Get a report with the health status of an Elasticsearch cluster. + // The report contains a list of indicators that compose Elasticsearch + // functionality. + // + // Each indicator has a health status of: green, unknown, yellow or red. + // The indicator will provide an explanation and metadata describing the reason + // for its current health status. + // + // The cluster’s status is controlled by the worst indicator status. + // + // In the event that an indicator’s status is non-green, a list of impacts may + // be present in the indicator result which detail the functionalities that are + // negatively affected by the health issue. + // Each impact carries with it a severity level, an area of the system that is + // affected, and a simple description of the impact on the system. + // + // Some health indicators can determine the root cause of a health problem and + // prescribe a set of steps that can be performed in order to improve the health + // of the system. + // The root cause and remediation steps are encapsulated in a diagnosis. + // A diagnosis contains a cause detailing a root cause analysis, an action + // containing a brief description of the steps to take to fix the problem, the + // list of affected resources (if applicable), and a detailed step-by-step + // troubleshooting guide to fix the diagnosed problem. + // + // NOTE: The health indicators perform root cause analysis of non-green health + // statuses. This can be computationally expensive when called frequently. + // When setting up automated polling of the API for health status, set verbose + // to false to disable the more expensive analysis logic. // https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html HealthReport core_health_report.NewHealthReport // Index a document. @@ -1144,23 +1529,72 @@ type Core struct { // Returns basic information about the cluster. // https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html Info core_info.NewInfo - // Performs a kNN search. + // Run a knn search. + // + // NOTE: The kNN search API has been replaced by the `knn` option in the search + // API. + // + // Perform a k-nearest neighbor (kNN) search on a dense_vector field and return + // the matching documents. + // Given a query vector, the API finds the k closest vectors and returns those + // documents as search hits. + // + // Elasticsearch uses the HNSW algorithm to support efficient kNN search. + // Like most kNN algorithms, HNSW is an approximate method that sacrifices + // result accuracy for improved search speed. + // This means the results returned are not always the true k closest neighbors. + // + // The kNN search API supports restricting the search using a filter. + // The search will return the top k documents that also match the filter query. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html KnnSearch core_knn_search.NewKnnSearch - // Allows to get multiple documents in one request. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html Mget core_mget.NewMget - // Allows to execute several search operations in one request. + // Run multiple searches. + // + // The format of the request is similar to the bulk API format and makes use of + // the newline delimited JSON (NDJSON) format. + // The structure is as follows: + // + // ``` + // header\n + // body\n + // header\n + // body\n + // ``` + // + // This structure is specifically optimized to reduce parsing if a specific + // search ends up redirected to another node. + // + // IMPORTANT: The final line of data must end with a newline character `\n`. + // Each newline character may be preceded by a carriage return `\r`. + // When sending requests to this endpoint the `Content-Type` header should be + // set to `application/x-ndjson`. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html Msearch core_msearch.NewMsearch - // Runs multiple templated searches with a single request. + // Run multiple templated searches. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html MsearchTemplate core_msearch_template.NewMsearchTemplate - // Returns multiple termvectors in one request. + // Get multiple term vectors. + // + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html Mtermvectors core_mtermvectors.NewMtermvectors - // A search request by default executes against the most recent visible data of - // the target indices, + // 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 @@ -1170,18 +1604,24 @@ type Core struct { // `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. + // The `keep_alive` parameter tells Elasticsearch how long it should persist. // https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html OpenPointInTime core_open_point_in_time.NewOpenPointInTime // Ping the cluster. - // Returns whether the cluster is running. + // Get information about whether the cluster is running. // https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html Ping core_ping.NewPing // Create or update a script or search template. // Creates or updates a stored script or search template. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html PutScript core_put_script.NewPutScript - // Enables you to evaluate the quality of ranked search results over a set of - // typical search queries. + // Evaluate ranked search results. + // + // Evaluate the quality of ranked search results over a set of typical search + // queries. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html RankEval core_rank_eval.NewRankEval // Reindex documents. @@ -1190,43 +1630,93 @@ type Core struct { // source. For example, you cannot reindex a data stream into itself. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html Reindex core_reindex.NewReindex - // Copies documents from a source to a destination. + // Throttle a reindex operation. + // + // Change the number of requests per second for a particular reindex operation. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html ReindexRethrottle core_reindex_rethrottle.NewReindexRethrottle - // Renders a search template as a search request body. + // Render a search template. + // + // Render a search template as a search request body. // https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html RenderSearchTemplate core_render_search_template.NewRenderSearchTemplate // Run a script. // Runs a script and returns a result. // https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html ScriptsPainlessExecute core_scripts_painless_execute.NewScriptsPainlessExecute - // Allows to retrieve a large numbers of results from a single search request. + // Run a scrolling search. + // + // IMPORTANT: The scroll API is no longer recommend for deep pagination. If you + // need to preserve the index state while paging through more than 10,000 hits, + // use the `search_after` parameter with a point in time (PIT). + // + // The scroll API gets large sets of results from a single scrolling search + // request. + // To get the necessary scroll ID, submit a search API request that includes an + // argument for the `scroll` query parameter. + // The `scroll` parameter indicates how long Elasticsearch should retain the + // search context for the request. + // The search response returns a scroll ID in the `_scroll_id` response body + // parameter. + // You can then use the scroll ID with the scroll API to retrieve the next batch + // of results for the request. + // If the Elasticsearch security features are enabled, the access to the results + // of a specific scroll ID is restricted to the user or API key that submitted + // the search. + // + // You can also use the scroll API to specify a new scroll parameter that + // extends or shortens the retention period for the search context. + // + // IMPORTANT: Results from a scrolling search reflect the state of the index at + // the time of the initial search request. Subsequent indexing or document + // changes only affect later search and scroll requests. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-scroll Scroll core_scroll.NewScroll - // Returns search hits that match the query defined in the request. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html Search core_search.NewSearch // Search a vector tile. - // Searches a vector tile for geospatial values. + // + // Search a vector tile for geospatial values. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-vector-tile-api.html SearchMvt core_search_mvt.NewSearchMvt - // Returns information about the indices and shards that a search request would - // be executed against. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html SearchShards core_search_shards.NewSearchShards - // Runs a search with a search template. + // Run a search with a search template. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html SearchTemplate core_search_template.NewSearchTemplate - // The terms enum API can be used to discover terms in the index that begin - // with the provided string. It is designed for low-latency look-ups used in + // Get terms in an index. + // + // Discover terms that match a partial string in an index. + // This "terms enum" API is designed for low-latency look-ups used in // auto-complete scenarios. + // + // If the `complete` property in the response is false, the returned terms set + // may be incomplete and should be treated as approximate. + // This can occur due to a few reasons, such as a request timeout or a node + // error. + // + // NOTE: The terms enum API may return terms from deleted documents. Deleted + // documents are initially only marked as deleted. It is not until their + // segments are merged that documents are actually deleted. Until that happens, + // the terms enum API will return terms from these documents. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html TermsEnum core_terms_enum.NewTermsEnum // Get term vector information. - // Returns information and statistics about terms in the fields of a particular + // + // Get information and statistics about terms in the fields of a particular // document. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html Termvectors core_termvectors.NewTermvectors @@ -1241,20 +1731,45 @@ type Core struct { // mapping changes. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html UpdateByQuery core_update_by_query.NewUpdateByQuery - // Changes the number of requests per second for a particular Update By Query + // Throttle an update by query operation. + // + // Change the number of requests per second for a particular update by query // operation. + // Rethrottling that speeds up the query takes effect immediately but + // rethrotting that slows down the query takes effect after completing the + // current batch to prevent scroll timeouts. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html UpdateByQueryRethrottle core_update_by_query_rethrottle.NewUpdateByQueryRethrottle } type DanglingIndices struct { - // Deletes the specified dangling index + // Delete a dangling index. + // + // If Elasticsearch encounters index data that is absent from the current + // cluster state, those indices are considered to be dangling. + // For example, this can happen if you delete more than + // `cluster.indices.tombstones.size` indices while an Elasticsearch node is + // offline. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html DeleteDanglingIndex dangling_indices_delete_dangling_index.NewDeleteDanglingIndex - // Imports the specified dangling index + // Import a dangling index. + // + // If Elasticsearch encounters index data that is absent from the current + // cluster state, those indices are considered to be dangling. + // For example, this can happen if you delete more than + // `cluster.indices.tombstones.size` indices while an Elasticsearch node is + // offline. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html ImportDanglingIndex dangling_indices_import_dangling_index.NewImportDanglingIndex - // Returns all dangling indices. + // Get the dangling indices. + // + // If Elasticsearch encounters index data that is absent from the current + // cluster state, those indices are considered to be dangling. + // For example, this can happen if you delete more than + // `cluster.indices.tombstones.size` indices while an Elasticsearch node is + // offline. + // + // Use this API to list dangling indices, which you can then import or delete. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html ListDanglingIndices dangling_indices_list_dangling_indices.NewListDanglingIndices } @@ -1264,7 +1779,8 @@ type Enrich struct { // Deletes an existing enrich policy and its enrich index. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html DeletePolicy enrich_delete_policy.NewDeletePolicy - // Creates the enrich index for an existing enrich policy. + // Run an enrich policy. + // Create the enrich index for an existing enrich policy. // https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html ExecutePolicy enrich_execute_policy.NewExecutePolicy // Get an enrich policy. @@ -1283,19 +1799,24 @@ type Enrich struct { } type Eql struct { - // Deletes an async EQL search or a stored synchronous EQL search. + // 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/guide/en/elasticsearch/reference/current/eql-search-api.html Delete eql_delete.NewDelete - // Returns the current status and available results for an async EQL search or a + // Get async EQL search results. + // Get the current status and available results for an async EQL search or a // stored synchronous EQL search. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-search-api.html Get eql_get.NewGet - // Returns the current status for an async EQL search or a stored synchronous - // EQL search without returning results. + // Get the async EQL status. + // Get the current status for an async EQL search or a stored synchronous EQL + // search without returning results. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-status-api.html GetStatus eql_get_status.NewGetStatus - // Returns results matching a query expressed in Event Query Language (EQL) + // Get EQL search results. + // Returns search results for an Event Query Language (EQL) query. + // EQL assumes each document in a data stream or index corresponds to an event. // https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html Search eql_search.NewSearch } @@ -1304,17 +1825,58 @@ type Esql struct { // Executes an ESQL request asynchronously // https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-api.html AsyncQuery esql_async_query.NewAsyncQuery - // Executes an ES|QL request + // Run an ES|QL query. + // Get search results for an ES|QL (Elasticsearch query language) query. // https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-rest.html Query esql_query.NewQuery } type Features struct { - // Gets a list of features which can be included in snapshots using the - // feature_states field when creating a snapshot + // Get the features. + // Get a list of features that can be included in snapshots using the + // `feature_states` field when creating a snapshot. + // You can use this API to determine which feature states to include when taking + // a snapshot. + // By default, all feature states are included in a snapshot if that snapshot + // includes the global state, or none if it does not. + // + // A feature state includes one or more system indices necessary for a given + // feature to function. + // In order to ensure data integrity, all system indices that comprise a feature + // state are snapshotted and restored together. + // + // The features listed by this API are a combination of built-in features and + // features defined by plugins. + // In order for a feature state to be listed in this API and recognized as a + // valid feature state by the create snapshot API, the plugin that defines that + // feature must be installed on the master node. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-features-api.html GetFeatures features_get_features.NewGetFeatures - // Resets the internal state of features, usually by deleting system indices + // Reset the features. + // Clear all of the state information stored in system indices by Elasticsearch + // features, including the security and machine learning indices. + // + // WARNING: Intended for development and testing use only. Do not reset features + // on a production cluster. + // + // Return a cluster to the same state as a new installation by resetting the + // feature state for all Elasticsearch features. + // This deletes all state information stored in system indices. + // + // The response code is HTTP 200 if the state is successfully reset for all + // features. + // It is HTTP 500 if the reset operation failed for any feature. + // + // Note that select features might provide a way to reset particular system + // indices. + // Using this API resets all features, both those that are built-in and + // implemented as plugins. + // + // To list the features that will be affected, use the get features API. + // + // IMPORTANT: The features installed on the node you submit this request to are + // the features that will be reset. Run on the master node if you have any + // doubts about which plugins are installed on individual nodes. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html ResetFeatures features_reset_features.NewResetFeatures } @@ -1345,56 +1907,130 @@ type Fleet struct { } type Graph struct { - // Extracts and summarizes information about the documents and terms in an + // Explore graph analytics. + // Extract and summarize information about the documents and terms in an // Elasticsearch data stream or index. + // The easiest way to understand the behavior of this API is to use the Graph UI + // to explore connections. + // An initial request to the `_explore` API contains a seed query that + // identifies the documents of interest and specifies the fields that define the + // vertices and connections you want to include in the graph. + // Subsequent requests enable you to spider out from one more vertices of + // interest. + // You can exclude vertices that have already been returned. // https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html Explore graph_explore.NewExplore } type Ilm struct { - // Deletes the specified lifecycle policy definition. 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. + // Delete a lifecycle policy. + // You cannot delete policies that are currently in use. If the policy is being + // used to manage any indices, the request fails and returns an error. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html DeleteLifecycle ilm_delete_lifecycle.NewDeleteLifecycle - // Retrieves information about the index’s current lifecycle state, such as the - // currently executing phase, action, and step. Shows when the index entered - // each one, the definition of the running phase, and information about any - // failures. + // Explain the lifecycle state. + // Get the current lifecycle status for one or more indices. + // For data streams, the API retrieves the current lifecycle status for the + // stream's backing indices. + // + // The response indicates when the index entered each lifecycle state, provides + // the definition of the running phase, and information about any failures. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html ExplainLifecycle ilm_explain_lifecycle.NewExplainLifecycle - // Retrieves a lifecycle policy. + // Get lifecycle policies. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html GetLifecycle ilm_get_lifecycle.NewGetLifecycle - // Retrieves the current index lifecycle management (ILM) status. + // Get the ILM status. + // Get the current index lifecycle management status. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html GetStatus ilm_get_status.NewGetStatus - // Switches the indices, ILM policies, and legacy, composable and component - // templates from using custom node attributes and - // attribute-based allocation filters to using data tiers, and optionally - // deletes one legacy index template.+ + // Migrate to data tiers routing. + // Switch the indices, ILM policies, and legacy, composable, and component + // templates from using custom node attributes and attribute-based allocation + // filters to using data tiers. + // Optionally, delete one legacy index template. // Using node roles enables ILM to automatically move the indices between data // tiers. + // + // Migrating away from custom node attributes routing can be manually performed. + // This API provides an automated way of performing three out of the four manual + // steps listed in the migration guide: + // + // 1. Stop setting the custom hot attribute on new indices. + // 1. Remove custom allocation settings from existing ILM policies. + // 1. Replace custom allocation settings from existing indices with the + // corresponding tier preference. + // + // ILM must be stopped before performing the migration. + // Use the stop ILM and get ILM status APIs to wait until the reported operation + // mode is `STOPPED`. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html MigrateToDataTiers ilm_migrate_to_data_tiers.NewMigrateToDataTiers - // Manually moves an index into the specified step and executes that step. + // Move to a lifecycle step. + // Manually move an index into a specific step in the lifecycle policy and run + // that step. + // + // WARNING: This operation can result in the loss of data. Manually moving an + // index into a specific step runs that step even if it has already been + // performed. This is a potentially destructive action and this should be + // considered an expert level API. + // + // You must specify both the current step and the step to be executed in the + // body of the request. + // The request will fail if the current step does not match the step currently + // running for the index + // This is to prevent the index from being moved from an unexpected step into + // the next step. + // + // When specifying the target (`next_step`) to which the index will be moved, + // either the name or both the action and name fields are optional. + // If only the phase is specified, the index will move to the first step of the + // first action in the target phase. + // If the phase and action are specified, the index will move to the first step + // of the specified action in the specified phase. + // Only actions specified in the ILM policy are considered valid. + // An index cannot move to a step that is not part of its policy. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html MoveToStep ilm_move_to_step.NewMoveToStep - // Creates a lifecycle policy. If the specified policy exists, the policy is - // replaced and the policy version is incremented. + // Create or update a lifecycle policy. + // If the specified policy exists, it is replaced and the policy version is + // incremented. + // + // NOTE: Only the latest version of the policy is stored, you cannot revert to + // previous versions. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html PutLifecycle ilm_put_lifecycle.NewPutLifecycle - // Removes the assigned lifecycle policy and stops managing the specified index + // Remove policies from an index. + // Remove the assigned lifecycle policies from an index or a data stream's + // backing indices. + // It also stops managing the indices. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html RemovePolicy ilm_remove_policy.NewRemovePolicy - // Retries executing the policy for an index that is in the ERROR step. + // Retry a policy. + // Retry running the lifecycle policy for an index that is in the ERROR step. + // The API sets the policy back to the step where the error occurred and runs + // the step. + // Use the explain lifecycle state API to determine whether an index is in the + // ERROR step. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html Retry ilm_retry.NewRetry - // Start the index lifecycle management (ILM) plugin. + // Start the ILM plugin. + // Start the index lifecycle management plugin if it is currently stopped. + // ILM is started automatically when the cluster is formed. + // Restarting ILM is necessary only when it has been stopped using the stop ILM + // API. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html Start ilm_start.NewStart - // Halts all lifecycle management operations and stops the index lifecycle - // management (ILM) plugin + // Stop the ILM plugin. + // Halt all lifecycle management operations and stop the index lifecycle + // management plugin. + // This is useful when you are performing maintenance on the cluster and need to + // prevent ILM from performing any actions on your indices. + // + // The API returns as soon as the stop request has been acknowledged, but the + // plugin might continue to run until in-progress operations complete and the + // plugin can be safely stopped. + // Use the get ILM status API to check whether ILM is running. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html Stop ilm_stop.NewStop } @@ -1405,17 +2041,85 @@ type Indices struct { // types. // https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-blocks.html AddBlock indices_add_block.NewAddBlock - // Performs analysis on a text string and returns the resulting tokens. + // Get tokens from text analysis. + // The analyze API performs + // [analysis](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html) + // on a text string and returns the resulting tokens. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html Analyze indices_analyze.NewAnalyze - // Clears the caches of one or more indices. - // For data streams, the API clears the caches of the stream’s backing indices. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html ClearCache indices_clear_cache.NewClearCache - // Clones an existing index. + // 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 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clone-index.html Clone indices_clone.NewClone - // Closes an index. + // Close an index. + // A closed index is blocked for read or write operations and does not allow all + // operations that opened indices allow. + // It is not possible to index documents or to search for documents in a closed + // index. + // Closed indices do not have to maintain internal data structures for indexing + // or searching documents, which results in a smaller overhead on the cluster. + // + // When opening or closing an index, the master node is responsible for + // restarting the index shards to reflect the new state of the index. + // The shards will then go through the normal recovery process. + // The data of opened and closed indices is automatically replicated by the + // cluster to ensure that enough shard copies are safely kept around at all + // times. + // + // You can open and close multiple indices. + // An error is thrown if the request explicitly refers to a missing index. + // This behaviour can be turned off using the `ignore_unavailable=true` + // parameter. + // + // By default, you must explicitly name the indices you are opening or closing. + // To open or close indices with `_all`, `*`, or other wildcard expressions, + // change the` action.destructive_requires_name` setting to `false`. This + // setting can also be changed with the cluster update settings API. + // + // Closed indices consume a significant amount of disk-space which can cause + // problems in managed environments. + // Closing indices can be turned off with the cluster settings API by setting + // `cluster.indices.close.enable` to `false`. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-close.html Close indices_close.NewClose // Create an index. @@ -1459,12 +2163,26 @@ type Indices struct { // Deletes a legacy index template. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template-v1.html DeleteTemplate indices_delete_template.NewDeleteTemplate - // Analyzes the disk usage of each field of an index or data stream. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-disk-usage.html DiskUsage indices_disk_usage.NewDiskUsage - // Aggregates a time series (TSDS) index and stores pre-computed statistical + // Downsample an index. + // Aggregate a time series (TSDS) index and store pre-computed statistical // summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric // field grouped by a configured time interval. + // For example, a TSDS index that contains metrics sampled every 10 seconds can + // be downsampled to an hourly index. + // All documents within an hour interval are summarized and stored as a single + // document in the downsample index. + // + // NOTE: Only indices in a time series data stream are supported. + // Neither field nor document level security can be defined on the source index. + // The source index must be read only (`index.blocks.write: true`). // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-downsample-data-stream.html Downsample indices_downsample.NewDownsample // Check indices. @@ -1475,7 +2193,8 @@ type Indices struct { // Checks if one or more data stream or index aliases exist. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html ExistsAlias indices_exists_alias.NewExistsAlias - // Returns information about whether a particular index template exists. + // Check index templates. + // Check whether index templates exist. // https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html ExistsIndexTemplate indices_exists_index_template.NewExistsIndexTemplate // Check existence of index templates. @@ -1483,19 +2202,69 @@ type Indices struct { // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-template-exists-v1.html ExistsTemplate indices_exists_template.NewExistsTemplate // Get the status for a data stream lifecycle. - // Retrieves 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. + // Get information about an index or data stream's current data stream lifecycle + // status, such as time since index creation, time since rollover, the lifecycle + // configuration managing the index, or any errors encountered during lifecycle + // execution. // https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html ExplainDataLifecycle indices_explain_data_lifecycle.NewExplainDataLifecycle - // Returns field usage information for each shard and field of an 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/field-usage-stats.html FieldUsageStats indices_field_usage_stats.NewFieldUsageStats - // Flushes one or more data streams or indices. + // Flush data streams or indices. + // Flushing a data stream or index is the process of making sure that any data + // that is currently only stored in the transaction log is also permanently + // stored in the Lucene index. + // When restarting, Elasticsearch replays any unflushed operations from the + // transaction log into the Lucene index to bring it back into the state that it + // was in before the restart. + // Elasticsearch automatically triggers flushes as needed, using heuristics that + // trade off the size of the unflushed transaction log against the cost of + // performing each flush. + // + // After each operation has been flushed it is permanently stored in the Lucene + // index. + // This may mean that there is no need to maintain an additional copy of it in + // the transaction log. + // The transaction log is made up of multiple files, called generations, and + // Elasticsearch will delete any generation files when they are no longer + // needed, freeing up disk space. + // + // It is also possible to trigger a flush on one or more indices using the flush + // API, although it is rare for users to need to call this API directly. + // If you call the flush API after indexing some documents then a successful + // response indicates that Elasticsearch has flushed all the documents that were + // indexed before the flush API was called. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html Flush indices_flush.NewFlush - // Performs the force merge operation on one or more indices. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html Forcemerge indices_forcemerge.NewForcemerge // Get index information. @@ -1566,8 +2335,25 @@ type Indices struct { // For data streams, the API opens any closed backing indices. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html Open indices_open.NewOpen - // Promotes a data stream from a replicated data stream managed by CCR to a - // regular data stream + // 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/guide/en/elasticsearch/reference/current/data-streams.html PromoteDataStream indices_promote_data_stream.NewPromoteDataStream // Create or update an alias. @@ -1598,12 +2384,56 @@ type Indices struct { // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html PutTemplate indices_put_template.NewPutTemplate - // Returns information about ongoing and completed shard recoveries for one or - // more indices. - // For data streams, the API returns information for the stream’s backing + // 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. + // + // Shard recovery is the process of initializing a shard copy, such as restoring + // a primary shard from a snapshot or creating a replica shard from a primary + // shard. + // When a shard recovery completes, the recovered shard is available for search + // and indexing. + // + // Recovery automatically occurs during the following processes: + // + // * When creating an index for the first time. + // * When a node rejoins the cluster and starts up any missing primary shard + // copies using the data that it holds in its data path. + // * Creation of new replica shard copies from the primary. + // * Relocation of a shard copy to a different node in the same cluster. + // * A snapshot restore operation. + // * A clone, shrink, or split operation. + // + // You can determine the cause of a shard recovery using the recovery or cat + // recovery APIs. + // + // The index recovery API reports information about completed recoveries only + // for shard copies that currently exist in the cluster. + // It only reports the last recovery for each shard copy and does not report + // historical information about earlier recoveries, nor does it report + // information about the recoveries of shard copies that no longer exist. + // This means that if a shard copy completes a recovery and then Elasticsearch + // relocates it onto a different node then the information about the original + // recovery will not be shown in the recovery API. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html Recovery indices_recovery.NewRecovery // Refresh an index. @@ -1613,17 +2443,61 @@ type Indices struct { // indices. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html Refresh indices_refresh.NewRefresh - // Reloads an index's search analyzers and their resources. + // Reload search analyzers. + // Reload an index's search analyzers and their resources. + // For data streams, the API reloads search analyzers and resources for the + // stream's backing indices. + // + // IMPORTANT: After reloading the search analyzers you should clear the request + // cache to make sure it doesn't contain responses derived from the previous + // versions of the analyzer. + // + // You can use the reload search analyzers API to pick up changes to synonym + // files used in the `synonym_graph` or `synonym` token filter of a search + // analyzer. + // To be eligible, the token filter must have an `updateable` flag of `true` and + // only be used in search analyzers. + // + // NOTE: This API does not perform a reload for each shard of an index. + // Instead, it performs a reload for each node containing index shards. + // As a result, the total shard count returned by the API can differ from the + // number of index shards. + // Because reloading affects every node with an index shard, it is important to + // update the synonym file on every data node in the cluster--including nodes + // that don't contain a shard replica--before using this API. + // This ensures the synonym file is updated everywhere in the cluster in case + // shards are relocated in the future. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-reload-analyzers.html ReloadSearchAnalyzers indices_reload_search_analyzers.NewReloadSearchAnalyzers - // Resolves the specified index expressions to return information about each - // cluster, including - // the local cluster, if included. + // Resolve the cluster. + // Resolve the specified index expressions to return information about each + // cluster, including the local cluster, if included. // Multiple patterns and remote clusters are supported. + // + // 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 in the index expression scope. + // * 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-cluster-api.html ResolveCluster indices_resolve_cluster.NewResolveCluster - // Resolves the specified name(s) and/or index patterns for indices, aliases, - // and data streams. + // Resolve indices. + // Resolve the names and/or index patterns for indices, aliases, and data + // streams. // Multiple patterns and remote clusters are supported. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-index-api.html ResolveIndex indices_resolve_index.NewResolveIndex @@ -1631,17 +2505,83 @@ type Indices struct { // Creates a new index for a data stream or index alias. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html Rollover indices_rollover.NewRollover - // Returns low-level information about the Lucene segments in index shards. - // For data streams, the API returns information about the stream’s backing + // Get index segments. + // Get low-level information about the Lucene segments in index shards. + // For data streams, the API returns information about the stream's backing // indices. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html Segments indices_segments.NewSegments - // Retrieves store information about replica shards in one or more indices. - // For data streams, the API retrieves store information for the stream’s + // Get index shard stores. + // Get store information about replica shards in one or more indices. + // For data streams, the API retrieves store information for the stream's // backing indices. + // + // The index shard stores API returns the following information: + // + // * The node on which each replica shard exists. + // * The allocation ID for each replica shard. + // * A unique ID for each replica shard. + // * Any errors encountered while opening the shard index or from an earlier + // failure. + // + // By default, the API returns store information only for primary shards that + // are unassigned or have one or more unassigned replica shards. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html ShardStores indices_shard_stores.NewShardStores - // Shrinks an existing index into a new index with fewer primary shards. + // Shrink an index. + // Shrink an index into a new index with fewer primary shards. + // + // Before you can shrink an index: + // + // * The index must be read-only. + // * A copy of every shard in the index must reside on the same node. + // * The index must have a green health status. + // + // To make shard allocation easier, we recommend you also remove the index's + // replica shards. + // You can later re-add replica shards as part of the shrink operation. + // + // The requested number of primary shards in the target index must be a factor + // of the number of shards in the source index. + // For example an index with 8 primary shards can be shrunk into 4, 2 or 1 + // primary shards or an index with 15 primary shards can be shrunk into 5, 3 or + // 1. + // If the number of shards in the index is a prime number it can only be shrunk + // into a single primary shard + // Before shrinking, a (primary or replica) copy of every shard in the index + // must be present on the same node. + // + // The current write index on a data stream cannot be shrunk. In order to shrink + // the current write index, the data stream must first be rolled over so that a + // new write index is created and then the previous write index can be shrunk. + // + // A shrink operation: + // + // * Creates a new target index with the same definition as the source index, + // but with a smaller number of primary shards. + // * Hard-links segments from the source index into the target index. If the + // file system does not support hard-linking, then all segments are copied into + // the new index, which is a much more time consuming process. Also if using + // multiple data paths, shards on different data paths require a full copy of + // segment files if they are not on the same disk since hardlinks do not work + // across disks. + // * Recovers the target index as though it were a closed index which had just + // been re-opened. Recovers shards to the + // `.routing.allocation.initial_recovery._id` index setting. + // + // IMPORTANT: Indices can only be shrunk if they satisfy the following + // requirements: + // + // * The target index must not exist. + // * The source index must have more primary shards than the target index. + // * The number of primary shards in the target index must be a factor of the + // number of primary shards in the source index. The source index must have more + // primary shards than the target index. + // * The index must not contain more than 2,147,483,519 documents in total + // across all shards that will be shrunk into a single shard on the target index + // as this is the maximum number of docs that can fit into a single shard. + // * The node handling the shrink process must have sufficient free disk space + // to accommodate a second copy of the existing index. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html Shrink indices_shrink.NewShrink // Simulate an index. @@ -1654,15 +2594,64 @@ type Indices struct { // template. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-simulate-template.html SimulateTemplate indices_simulate_template.NewSimulateTemplate - // Splits an existing index into a new index with more primary shards. + // 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. + // + // The number of times the index can be split (and the number of shards that + // each original shard can be split into) is determined by the + // `index.number_of_routing_shards` setting. + // The number of routing shards specifies the hashing space that is used + // internally to distribute documents across shards with consistent hashing. + // For instance, a 5 shard index with `number_of_routing_shards` set to 30 (5 x + // 2 x 3) could be split by a factor of 2 or 3. + // + // A split operation: + // + // * Creates a new target index with the same definition as the source index, + // but with a larger number of primary shards. + // * Hard-links segments from the source index into the target index. If the + // file system doesn't support hard-linking, all segments are copied into the + // new index, which is a much more time consuming process. + // * Hashes all documents again, after low level files are created, to delete + // documents that belong to a different shard. + // * Recovers the target index as though it were a closed index which had just + // been re-opened. + // + // IMPORTANT: Indices can only be split if they satisfy the following + // requirements: + // + // * The target index must not exist. + // * The source index must have fewer primary shards than the target index. + // * The number of primary shards in the target index must be a multiple of the + // number of primary shards in the source index. + // * The node handling the split process must have sufficient free disk space to + // accommodate a second copy of the existing index. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-split-index.html Split indices_split.NewSplit - // Returns statistics for one or more indices. - // For data streams, the API retrieves statistics for the stream’s backing + // Get index statistics. + // For data streams, the API retrieves statistics for the stream's backing // indices. + // + // By default, the returned statistics are index-level with `primaries` and + // `total` aggregations. + // `primaries` are the values for only the primary shards. + // `total` are the accumulated values for both primary and replica shards. + // + // To get shard-level statistics, set the `level` parameter to `shards`. + // + // NOTE: When moving to another node, the shard-level statistics for a shard are + // cleared. + // Although the shard is no longer part of the node, that node retains any + // node-level statistics to which the shard contributed. // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html Stats indices_stats.NewStats - // Unfreezes an index. + // Unfreeze an index. + // When a frozen index is unfrozen, the index goes through the normal recovery + // process and becomes writeable again. // https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html Unfreeze indices_unfreeze.NewUnfreeze // Create or update an alias. @@ -1691,63 +2680,117 @@ type Inference struct { } type Ingest struct { - // Deletes one or more existing ingest pipeline. + // Delete GeoIP database configurations. + // Delete one or more IP geolocation database configurations. + // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-geoip-database-api.html + DeleteGeoipDatabase ingest_delete_geoip_database.NewDeleteGeoipDatabase + // Delete pipelines. + // Delete one or more ingest pipelines. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-pipeline-api.html DeletePipeline ingest_delete_pipeline.NewDeletePipeline - // Gets download statistics for GeoIP2 databases used with the geoip processor. + // Get GeoIP statistics. + // Get download statistics for GeoIP2 databases that are used with the GeoIP + // processor. // https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-processor.html GeoIpStats ingest_geo_ip_stats.NewGeoIpStats - // Returns information about one or more ingest pipelines. + // Get GeoIP database configurations. + // Get information about one or more IP geolocation database configurations. + // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-geoip-database-api.html + GetGeoipDatabase ingest_get_geoip_database.NewGetGeoipDatabase + // Get pipelines. + // Get information about one or more ingest pipelines. // This API returns a local reference of the pipeline. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-pipeline-api.html GetPipeline ingest_get_pipeline.NewGetPipeline - // Extracts structured fields out of a single text field within a document. - // You choose which field to extract matched fields from, as well as the grok - // pattern you expect will match. + // Run a grok processor. + // Extract structured fields out of a single text field within a document. + // You must choose which field to extract matched fields from, as well as the + // grok pattern you expect will match. // A grok pattern is like a regular expression that supports aliased expressions // that can be reused. // https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html ProcessorGrok ingest_processor_grok.NewProcessorGrok - // Creates or updates an ingest pipeline. + // Create or update GeoIP database configurations. + // Create or update IP geolocation database configurations. + // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-geoip-database-api.html + PutGeoipDatabase ingest_put_geoip_database.NewPutGeoipDatabase + // Create or update a pipeline. // Changes made using this API take effect immediately. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html PutPipeline ingest_put_pipeline.NewPutPipeline - // Executes an ingest pipeline against a set of provided documents. + // Simulate a pipeline. + // Run an ingest pipeline against a set of provided documents. + // You can either specify an existing pipeline to use with the provided + // documents or supply a pipeline definition in the body of the request. // https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-pipeline-api.html Simulate ingest_simulate.NewSimulate } type License struct { - // Deletes licensing information for the cluster + // Delete the license. + // When the license expires, your subscription level reverts to Basic. + // + // If the operator privileges feature is enabled, only operator users can use + // this API. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-license.html Delete license_delete.NewDelete // Get license information. - // Returns information about your Elastic license, including its type, its - // status, when it was issued, and when it expires. - // For more information about the different types of licenses, refer to [Elastic - // Stack subscriptions](https://www.elastic.co/subscriptions). + // Get information about your Elastic license including its type, its status, + // when it was issued, and when it expires. + // + // NOTE: If the master node is generating a new cluster state, the get license + // API may return a `404 Not Found` response. + // If you receive an unexpected 404 response after cluster startup, wait a short + // period and retry the request. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-license.html Get license_get.NewGet - // Retrieves information about the status of the basic license. + // Get the basic license status. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html GetBasicStatus license_get_basic_status.NewGetBasicStatus - // Retrieves information about the status of the trial license. + // Get the trial status. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trial-status.html GetTrialStatus license_get_trial_status.NewGetTrialStatus - // Updates the license for the cluster. + // 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/guide/en/elasticsearch/reference/current/update-license.html Post license_post.NewPost - // The start basic API enables you to initiate an indefinite basic license, - // which gives access to all the basic features. 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 following API: [Get basic - // status](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html). + // Start a basic license. + // Start an indefinite basic license, which gives access to all the basic + // features. + // + // NOTE: In order to start a basic license, you must not currently have a basic + // license. + // + // If the basic license does not support all of the features that are available + // with your current license, however, you are notified in the response. + // You must then re-submit the API request with the `acknowledge` parameter set + // to `true`. + // + // To check the status of your basic license, use the get basic license API. // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-basic.html PostStartBasic license_post_start_basic.NewPostStartBasic - // The start trial API enables you to start a 30-day trial, which gives access - // to all subscription features. + // Start a trial. + // Start a 30-day trial, which gives access to all subscription features. + // + // NOTE: You are allowed to start a trial only if your cluster has not already + // activated a trial for the current major product version. + // For example, if you have already activated a trial for v8.0, you cannot start + // a new trial until v9.0. You can, however, request an extended trial at + // https://www.elastic.co/trialextension. + // + // To check the status of your trial, use the get trial status API. // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trial.html PostStartTrial license_post_start_trial.NewPostStartTrial } @@ -1895,7 +2938,7 @@ type Ml struct { // they are not included in the explanation. // http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html ExplainDataFrameAnalytics ml_explain_data_frame_analytics.NewExplainDataFrameAnalytics - // Forces any buffered data to be processed by the job. + // 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 @@ -1906,37 +2949,37 @@ type Ml struct { // analyzing further data. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html FlushJob ml_flush_job.NewFlushJob - // Predicts the future behavior of a time series by using its historical - // behavior. + // 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. + // `over_field_name` in its configuration. Forcasts predict future behavior + // based on historical data. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html Forecast ml_forecast.NewForecast - // Retrieves anomaly detection job results for one or more buckets. + // Get anomaly detection job results for buckets. // The API presents a chronological view of the records, grouped by bucket. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html GetBuckets ml_get_buckets.NewGetBuckets - // Retrieves information about the scheduled events in calendars. + // Get info about events in calendars. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html GetCalendarEvents ml_get_calendar_events.NewGetCalendarEvents - // Retrieves configuration information for calendars. + // Get calendar configuration info. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html GetCalendars ml_get_calendars.NewGetCalendars - // Retrieves anomaly detection job results for one or more categories. + // Get anomaly detection job results for categories. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html GetCategories ml_get_categories.NewGetCategories - // Retrieves configuration information for data frame analytics jobs. + // Get data frame analytics job configuration info. // You can get information for multiple data frame analytics jobs in a single // API request by using a comma-separated list of data frame analytics jobs or a // wildcard expression. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html GetDataFrameAnalytics ml_get_data_frame_analytics.NewGetDataFrameAnalytics - // Retrieves usage information for data frame analytics jobs. + // Get data frame analytics jobs usage info. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html GetDataFrameAnalyticsStats ml_get_data_frame_analytics_stats.NewGetDataFrameAnalyticsStats - // Retrieves usage information for datafeeds. + // 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 @@ -1945,7 +2988,7 @@ type Ml struct { // This API returns a maximum of 10,000 datafeeds. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html GetDatafeedStats ml_get_datafeed_stats.NewGetDatafeedStats - // Retrieves configuration information for datafeeds. + // 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 @@ -1953,39 +2996,41 @@ type Ml struct { // This API returns a maximum of 10,000 datafeeds. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html GetDatafeeds ml_get_datafeeds.NewGetDatafeeds - // Retrieves filters. + // Get filters. // You can get a single filter or all filters. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html GetFilters ml_get_filters.NewGetFilters - // Retrieves anomaly detection job results for one or more influencers. + // Get anomaly detection job results for influencers. // Influencers are the entities that have contributed to, or are to blame for, // the anomalies. Influencer results are available only if an // `influencer_field_name` is specified in the job configuration. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html GetInfluencers ml_get_influencers.NewGetInfluencers - // Retrieves usage information for anomaly detection jobs. + // Get anomaly detection jobs usage info. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html GetJobStats ml_get_job_stats.NewGetJobStats - // Retrieves configuration information for anomaly detection jobs. + // Get anomaly detection jobs configuration info. // You can get information for multiple anomaly detection jobs in a single API // request by using a group name, a comma-separated list of jobs, or a wildcard // expression. You can get information for all anomaly detection jobs by using // `_all`, by specifying `*` as the ``, or by omitting the ``. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html GetJobs ml_get_jobs.NewGetJobs + // Get machine learning memory usage info. // Get information about how machine learning jobs and trained models are using // memory, // on each node, both within the JVM heap, and natively, outside of the JVM. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html GetMemoryStats ml_get_memory_stats.NewGetMemoryStats - // Retrieves usage information for anomaly detection job model snapshot - // upgrades. + // Get anomaly detection job model snapshot upgrade usage info. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html GetModelSnapshotUpgradeStats ml_get_model_snapshot_upgrade_stats.NewGetModelSnapshotUpgradeStats - // Retrieves information about model snapshots. + // Get model snapshots info. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html GetModelSnapshots ml_get_model_snapshots.NewGetModelSnapshots - // Retrieves overall bucket results that summarize the bucket results of + // 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 @@ -2004,7 +3049,7 @@ type Ml struct { // jobs' largest bucket span. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html GetOverallBuckets ml_get_overall_buckets.NewGetOverallBuckets - // Retrieves anomaly records for an anomaly detection job. + // 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. @@ -2017,18 +3062,19 @@ type Ml struct { // number of detectors. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html GetRecords ml_get_records.NewGetRecords - // Retrieves configuration information for a trained model. + // Get trained model configuration info. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html GetTrainedModels ml_get_trained_models.NewGetTrainedModels - // Retrieves usage information for trained models. You can get usage information - // for multiple trained + // Get trained models usage info. + // You can get usage information for multiple trained // models in a single API request by using a comma-separated list of model IDs // or a wildcard expression. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html GetTrainedModelsStats ml_get_trained_models_stats.NewGetTrainedModelsStats - // Evaluates a trained model. + // Evaluate a trained model. // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-trained-model.html InferTrainedModel ml_infer_trained_model.NewInferTrainedModel + // Return ML defaults and limits. // Returns 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 @@ -2039,19 +3085,18 @@ type Ml struct { // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html Info ml_info.NewInfo // Open anomaly detection jobs. - // An anomaly detection job must be opened in order for it to be ready to - // receive and analyze data. It can be opened and closed multiple times - // throughout its lifecycle. + // An anomaly detection job must be opened to be ready to receive and analyze + // data. It can be opened and closed multiple times throughout its lifecycle. // When you open a new job, it starts with an empty model. // When you open an existing job, the most recent model state is automatically // loaded. The job is ready to resume its analysis from where it left off, once // new data is received. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html OpenJob ml_open_job.NewOpenJob - // Adds scheduled events to a calendar. + // Add scheduled events to the calendar. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html PostCalendarEvents ml_post_calendar_events.NewPostCalendarEvents - // Sends data to an anomaly detection job for analysis. + // 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. @@ -2059,10 +3104,11 @@ type Ml struct { // a comma-separated list. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html PostData ml_post_data.NewPostData + // Preview features used by data frame analytics. // Previews the extracted features used by a data frame analytics config. // http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html PreviewDataFrameAnalytics ml_preview_data_frame_analytics.NewPreviewDataFrameAnalytics - // Previews a datafeed. + // 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 @@ -2078,18 +3124,18 @@ type Ml struct { // You can also use secondary authorization headers to supply the credentials. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html PreviewDatafeed ml_preview_datafeed.NewPreviewDatafeed - // Creates a calendar. + // Create a calendar. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html PutCalendar ml_put_calendar.NewPutCalendar - // Adds an anomaly detection job to a calendar. + // Add anomaly detection job to calendar. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html PutCalendarJob ml_put_calendar_job.NewPutCalendarJob - // Instantiates a data frame analytics job. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html PutDataFrameAnalytics ml_put_data_frame_analytics.NewPutDataFrameAnalytics - // Instantiates a datafeed. + // 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. @@ -2107,7 +3153,7 @@ type Ml struct { // the `.ml-config` index. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html PutDatafeed ml_put_datafeed.NewPutDatafeed - // Instantiates a filter. + // 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 @@ -2119,12 +3165,14 @@ type Ml struct { // the source index. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html PutJob ml_put_job.NewPutJob - // Enables you to supply a trained model that is not created by data frame + // Create a trained model. + // Enable you to supply a trained model that is not created by data frame // analytics. // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html PutTrainedModel ml_put_trained_model.NewPutTrainedModel - // Creates or updates a trained model alias. A trained model alias is a logical - // name used to reference a single trained model. + // 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. @@ -2141,23 +3189,23 @@ type Ml struct { // returns a warning. // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html PutTrainedModelAlias ml_put_trained_model_alias.NewPutTrainedModelAlias - // Creates part of a trained model definition. + // Create part of a trained model definition. // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html PutTrainedModelDefinitionPart ml_put_trained_model_definition_part.NewPutTrainedModelDefinitionPart - // Creates a trained model vocabulary. + // Create a trained model vocabulary. // This API is supported only for natural language processing (NLP) models. // The vocabulary is stored in the index as described in // `inference_config.*.vocabulary` of the trained model definition. // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html PutTrainedModelVocabulary ml_put_trained_model_vocabulary.NewPutTrainedModelVocabulary - // Resets an anomaly detection job. + // Reset an anomaly detection job. // All model state and results are deleted. The job is ready to start over as if // it had just been created. // It is not currently possible to reset multiple jobs using wildcards or a // comma separated list. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html ResetJob ml_reset_job.NewResetJob - // Reverts to a specific snapshot. + // 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 @@ -2167,6 +3215,7 @@ type Ml struct { // snapshot after Black Friday or a critical system failure. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html RevertModelSnapshot ml_revert_model_snapshot.NewRevertModelSnapshot + // Set upgrade_mode for ML indices. // Sets a cluster wide upgrade_mode setting that prepares machine learning // indices for an upgrade. // When upgrading your cluster, in some circumstances you must restart your @@ -2181,7 +3230,7 @@ type Ml struct { // machine learning info API. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html SetUpgradeMode ml_set_upgrade_mode.NewSetUpgradeMode - // Starts a data frame analytics job. + // 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 @@ -2195,7 +3244,7 @@ type Ml struct { // the destination index in advance with custom settings and mappings. // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html StartDataFrameAnalytics ml_start_data_frame_analytics.NewStartDataFrameAnalytics - // Starts one or more datafeeds. + // Start datafeeds. // // A datafeed must be started in order to retrieve data from Elasticsearch. A // datafeed can be started and stopped @@ -2217,28 +3266,28 @@ type Ml struct { // credentials are used instead. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html StartDatafeed ml_start_datafeed.NewStartDatafeed - // Starts a trained model deployment, which allocates the model to every machine - // learning node. + // Start a trained model deployment. + // It allocates the model to every machine learning node. // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trained-model-deployment.html StartTrainedModelDeployment ml_start_trained_model_deployment.NewStartTrainedModelDeployment - // Stops one or more data frame analytics jobs. + // Stop data frame analytics jobs. // A data frame analytics job can be started and stopped multiple times // throughout its lifecycle. // https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html StopDataFrameAnalytics ml_stop_data_frame_analytics.NewStopDataFrameAnalytics - // Stops one or more datafeeds. + // Stop datafeeds. // A datafeed that is stopped ceases to retrieve data from Elasticsearch. A // datafeed can be started and stopped // multiple times throughout its lifecycle. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html StopDatafeed ml_stop_datafeed.NewStopDatafeed - // Stops a trained model deployment. + // Stop a trained model deployment. // https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-trained-model-deployment.html StopTrainedModelDeployment ml_stop_trained_model_deployment.NewStopTrainedModelDeployment - // Updates an existing data frame analytics job. + // Update a data frame analytics job. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html UpdateDataFrameAnalytics ml_update_data_frame_analytics.NewUpdateDataFrameAnalytics - // Updates the properties of a datafeed. + // 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 @@ -2247,20 +3296,23 @@ type Ml struct { // those credentials are used instead. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html UpdateDatafeed ml_update_datafeed.NewUpdateDatafeed + // Update a filter. // Updates the description of a filter, adds items, or removes items from the // list. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html UpdateFilter ml_update_filter.NewUpdateFilter + // Update an anomaly detection job. // Updates certain properties of an anomaly detection job. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html UpdateJob ml_update_job.NewUpdateJob + // Update a snapshot. // Updates certain properties of a snapshot. // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html UpdateModelSnapshot ml_update_model_snapshot.NewUpdateModelSnapshot - // Starts a trained model deployment, which allocates the model to every machine - // learning node. + // Update a trained model deployment. // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html UpdateTrainedModelDeployment ml_update_trained_model_deployment.NewUpdateTrainedModelDeployment + // Upgrade a snapshot. // Upgrades 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 @@ -2287,34 +3339,57 @@ type Monitoring struct { } type Nodes struct { - // You can use this API to clear the archived repositories metering information - // in the cluster. + // Clear the archived repositories metering. + // Clear the archived repositories metering information in the cluster. // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html ClearRepositoriesMeteringArchive nodes_clear_repositories_metering_archive.NewClearRepositoriesMeteringArchive - // You can use the cluster repositories metering API to retrieve repositories - // metering information in a cluster. - // This API exposes monotonically non-decreasing counters and it’s 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 won’t be present after node restarts. + // Get cluster repositories metering. + // Get repositories metering information for a cluster. + // This API exposes monotonically non-decreasing counters and it is expected + // that clients would durably store the information needed to compute + // aggregations over a period of time. + // Additionally, the information exposed by this API is volatile, meaning that + // it will not be present after node restarts. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html GetRepositoriesMeteringInfo nodes_get_repositories_metering_info.NewGetRepositoriesMeteringInfo - // This API yields a breakdown of the hot threads on each selected node in the - // cluster. - // The output is plain text with a breakdown of each node’s top hot threads. + // Get the hot threads for nodes. + // Get a breakdown of the hot threads on each selected node in the cluster. + // The output is plain text with a breakdown of the top hot threads for each + // node. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html HotThreads nodes_hot_threads.NewHotThreads - // Returns cluster nodes information. + // Get node information. + // By default, the API returns all attributes and core settings for cluster + // nodes. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html Info nodes_info.NewInfo - // Reloads the keystore on nodes in the cluster. + // Reload the keystore on nodes in the cluster. + // + // Secure settings are stored in an on-disk keystore. Certain of these settings + // are reloadable. + // That is, you can change them on disk and reload them without restarting any + // nodes in the cluster. + // When you have updated reloadable secure settings in your keystore, you can + // use this API to reload those settings on each node. + // + // When the Elasticsearch keystore is password protected and not simply + // obfuscated, you must provide the password for the keystore when you reload + // the secure settings. + // Reloading the settings for the whole cluster assumes that the keystores for + // all nodes are protected with the same password; this method is allowed only + // when inter-node communications are encrypted. + // Alternatively, you can reload the secure settings on each node by locally + // accessing the API and passing the node-specific Elasticsearch keystore + // password. // https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-settings.html#reloadable-secure-settings ReloadSecureSettings nodes_reload_secure_settings.NewReloadSecureSettings - // Returns cluster nodes statistics. + // Get node statistics. + // Get statistics for nodes in a cluster. + // By default, all stats are returned. You can limit the returned information by + // using metrics. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html Stats nodes_stats.NewStats - // Returns information on the usage of features. + // Get feature usage information. // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-usage.html Usage nodes_usage.NewUsage } @@ -2336,27 +3411,37 @@ type Profiling struct { } type QueryRules struct { - // Deletes a query rule within a query ruleset. + // Delete a query rule. + // Delete a query rule within a query ruleset. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-rule.html DeleteRule query_rules_delete_rule.NewDeleteRule - // Deletes a query ruleset. + // Delete a query ruleset. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-ruleset.html DeleteRuleset query_rules_delete_ruleset.NewDeleteRuleset - // Returns the details about a query rule within a query ruleset + // Get a query rule. + // Get details about a query rule within a query ruleset. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-rule.html GetRule query_rules_get_rule.NewGetRule - // Returns the details about a query ruleset + // Get a query ruleset. + // Get details about a query ruleset. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-ruleset.html GetRuleset query_rules_get_ruleset.NewGetRuleset - // Returns summarized information about existing query rulesets. + // Get all query rulesets. + // Get summarized information about the query rulesets. // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-query-rulesets.html ListRulesets query_rules_list_rulesets.NewListRulesets - // Creates or updates a query rule within a query ruleset. + // Create or update a query rule. + // Create or update a query rule within a query ruleset. // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-rule.html PutRule query_rules_put_rule.NewPutRule - // Creates or updates a query ruleset. + // Create or update a query ruleset. // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-ruleset.html PutRuleset query_rules_put_ruleset.NewPutRuleset + // Test a query ruleset. + // Evaluate match criteria against a query ruleset to identify the rules that + // would match that criteria. + // https://www.elastic.co/guide/en/elasticsearch/reference/current/test-query-ruleset.html + Test query_rules_test.NewTest } type Rollup struct { @@ -2389,28 +3474,36 @@ type Rollup struct { } type SearchApplication struct { - // Deletes a search application. + // Delete a search application. + // Remove a search application and its associated alias. Indices attached to the + // search application are not removed. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-search-application.html Delete search_application_delete.NewDelete // Delete a behavioral analytics collection. + // The associated data stream is also deleted. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-analytics-collection.html DeleteBehavioralAnalytics search_application_delete_behavioral_analytics.NewDeleteBehavioralAnalytics - // Returns the details about a search application + // Get search application details. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-search-application.html Get search_application_get.NewGet - // Returns the existing behavioral analytics collections. + // Get behavioral analytics collections. // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-analytics-collection.html GetBehavioralAnalytics search_application_get_behavioral_analytics.NewGetBehavioralAnalytics // Returns the existing search applications. // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-search-applications.html List search_application_list.NewList - // Creates or updates a search application. + // Create or update a search application. // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-search-application.html Put search_application_put.NewPut - // Creates a behavioral analytics collection. + // Create a behavioral analytics collection. // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-analytics-collection.html PutBehavioralAnalytics search_application_put_behavioral_analytics.NewPutBehavioralAnalytics - // Perform a search against a search application. + // Run a search application search. + // Generate and run an Elasticsearch query that uses the specified query + // parameteter and the search template associated with the search application or + // default template. + // Unspecified template parameters are assigned their default values if + // applicable. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-search.html Search search_application_search.NewSearch } @@ -2431,10 +3524,13 @@ type SearchableSnapshots struct { } type Security struct { - // Creates or updates a user profile on behalf of another user. + // Activate a user profile. + // + // Create or update a user profile on behalf of another user. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-activate-user-profile.html ActivateUserProfile security_activate_user_profile.NewActivateUserProfile // Authenticate a user. + // // Authenticates a user and returns information about the authenticated user. // Include the user information in a [basic auth // header](https://en.wikipedia.org/wiki/Basic_access_authentication). @@ -2445,12 +3541,16 @@ type Security struct { // If the user cannot be authenticated, this API returns a 401 status code. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html Authenticate security_authenticate.NewAuthenticate + // Bulk delete roles. + // // The role management APIs are generally the preferred way to manage roles, // rather than using file-based role management. // The bulk delete roles API cannot delete roles that are defined in roles // files. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-delete-role.html BulkDeleteRole security_bulk_delete_role.NewBulkDeleteRole + // Bulk create or update roles. + // // The role management APIs are generally the preferred way to manage roles, // rather than using file-based role management. // The bulk create or update roles API cannot update roles that are defined in @@ -2460,29 +3560,44 @@ type Security struct { // Updates the attributes of multiple existing API keys. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-update-api-keys.html BulkUpdateApiKeys security_bulk_update_api_keys.NewBulkUpdateApiKeys - // Changes the passwords of users in the native realm and built-in users. + // Change passwords. + // + // Change the passwords of users in the native realm and built-in users. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html ChangePassword security_change_password.NewChangePassword - // Evicts a subset of all entries from the API key cache. + // Clear the API key cache. + // + // Evict a subset of all entries from the API key cache. // The cache is also automatically cleared on state changes of the security // index. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html ClearApiKeyCache security_clear_api_key_cache.NewClearApiKeyCache - // Evicts application privileges from the native application privileges cache. + // Clear the privileges cache. + // + // Evict privileges from the native application privilege cache. + // The cache is also automatically cleared for applications that have their + // privileges updated. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html ClearCachedPrivileges security_clear_cached_privileges.NewClearCachedPrivileges - // Evicts users from the user cache. Can completely clear the cache or evict + // Clear the user cache. + // + // Evict users from the user cache. You can completely clear the cache or evict // specific users. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html ClearCachedRealms security_clear_cached_realms.NewClearCachedRealms - // Evicts roles from the native role cache. + // Clear the roles cache. + // + // Evict roles from the native role cache. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html ClearCachedRoles security_clear_cached_roles.NewClearCachedRoles - // Evicts tokens from the service account token caches. + // Clear service account token caches. + // + // Evict a subset of all entries from the service account token caches. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html ClearCachedServiceTokens security_clear_cached_service_tokens.NewClearCachedServiceTokens // Create an API key. - // Creates an API key for access without requiring basic authentication. + // + // Create an API key for access without requiring basic authentication. // 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 @@ -2491,48 +3606,98 @@ type Security struct { // information when you create the API keys. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html CreateApiKey security_create_api_key.NewCreateApiKey - // Creates a cross-cluster API key for API key based remote cluster access. + // Create a cross-cluster API key. + // + // Create an API key of the `cross_cluster` type for the API key based remote + // cluster access. + // A `cross_cluster` API key cannot be used to authenticate through the REST + // interface. + // + // IMPORTANT: To authenticate this request you must use a credential that is not + // an API key. Even if you use an API key that has the required privilege, the + // API returns an error. + // + // Cross-cluster API keys are created by the Elasticsearch API key service, + // which is automatically enabled. + // + // NOTE: Unlike REST API keys, a cross-cluster API key does not capture + // permissions of the authenticated user. The API key’s effective permission is + // exactly as specified with the `access` property. + // + // A successful request returns a JSON structure that contains the API key, its + // unique ID, and its name. If applicable, it also returns expiration + // information for the API key in milliseconds. + // + // By default, API keys never expire. You can specify expiration information + // when you create the API keys. + // + // Cross-cluster API keys can only be updated with the update cross-cluster API + // key API. + // Attempting to update them with the update REST API key API or the bulk update + // REST API keys API will result in an error. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html CreateCrossClusterApiKey security_create_cross_cluster_api_key.NewCreateCrossClusterApiKey - // Creates a service accounts token for access without requiring basic + // Create a service account token. + // + // Create a service accounts token for access without requiring basic // authentication. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html CreateServiceToken security_create_service_token.NewCreateServiceToken - // Removes application privileges. + // Delete application privileges. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html DeletePrivileges security_delete_privileges.NewDeletePrivileges - // Removes roles in the native realm. + // Delete roles. + // + // Delete roles in the native realm. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html DeleteRole security_delete_role.NewDeleteRole - // Removes role mappings. + // Delete role mappings. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html DeleteRoleMapping security_delete_role_mapping.NewDeleteRoleMapping - // Deletes a service account token. + // Delete service account tokens. + // + // Delete service account tokens for a service in a specified namespace. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html DeleteServiceToken security_delete_service_token.NewDeleteServiceToken - // Deletes users from the native realm. + // Delete users. + // + // Delete users from the native realm. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html DeleteUser security_delete_user.NewDeleteUser - // Disables users in the native realm. + // Disable users. + // + // Disable users in the native realm. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html DisableUser security_disable_user.NewDisableUser - // Disables a user profile so it's not visible in user profile searches. + // Disable a user profile. + // + // Disable user profiles so that they are not visible in user profile searches. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user-profile.html DisableUserProfile security_disable_user_profile.NewDisableUserProfile - // Enables users in the native realm. + // Enable users. + // + // Enable users in the native realm. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html EnableUser security_enable_user.NewEnableUser - // Enables a user profile so it's visible in user profile searches. + // Enable a user profile. + // + // Enable user profiles to make them visible in user profile searches. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user-profile.html EnableUserProfile security_enable_user_profile.NewEnableUserProfile - // Enables a Kibana instance to configure itself for communication with a - // secured Elasticsearch cluster. + // Enroll Kibana. + // + // Enable a Kibana instance to configure itself for communication with a secured + // Elasticsearch cluster. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-kibana-enrollment.html EnrollKibana security_enroll_kibana.NewEnrollKibana - // Allows a new node to join an existing cluster with security features enabled. + // Enroll a node. + // + // Enroll a new node to allow it to join an existing cluster with security + // features enabled. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-node-enrollment.html EnrollNode security_enroll_node.NewEnrollNode // Get API key information. + // // Retrieves information for one or more API keys. // NOTE: If you have only the `manage_own_api_key` privilege, this API returns // only the API keys that you own. @@ -2541,46 +3706,66 @@ type Security struct { // ownership. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html GetApiKey security_get_api_key.NewGetApiKey - // Retrieves the list of cluster privileges and index privileges that are - // available in this version of Elasticsearch. + // Get builtin privileges. + // + // Get the list of cluster privileges and index privileges that are available in + // this version of Elasticsearch. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html GetBuiltinPrivileges security_get_builtin_privileges.NewGetBuiltinPrivileges - // Retrieves application privileges. + // Get application privileges. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html GetPrivileges security_get_privileges.NewGetPrivileges + // Get roles. + // + // Get roles in the native realm. // The role management APIs are generally the preferred way to manage roles, // rather than using file-based role management. // The get roles API cannot retrieve roles that are defined in roles files. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html GetRole security_get_role.NewGetRole - // Retrieves role mappings. + // Get role mappings. + // + // Role mappings define which roles are assigned to each user. + // The role mapping APIs are generally the preferred way to manage role mappings + // rather than using role mapping files. + // The get role mappings API cannot retrieve role mappings that are defined in + // role mapping files. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html GetRoleMapping security_get_role_mapping.NewGetRoleMapping - // This API returns a list of service accounts that match the provided path - // parameter(s). + // Get service accounts. + // + // Get a list of service accounts that match the provided path parameters. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html GetServiceAccounts security_get_service_accounts.NewGetServiceAccounts - // Retrieves information of all service credentials for a service account. + // Get service account credentials. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html GetServiceCredentials security_get_service_credentials.NewGetServiceCredentials // Retrieve settings for the security system indices // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-settings.html GetSettings security_get_settings.NewGetSettings - // Creates a bearer token for access without requiring basic authentication. + // Get a token. + // + // Create a bearer token for access without requiring basic authentication. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html GetToken security_get_token.NewGetToken - // Retrieves information about users in the native realm and built-in users. + // Get users. + // + // Get information about users in the native realm and built-in users. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html GetUser security_get_user.NewGetUser - // Retrieves security privileges for the logged in user. + // Get user privileges. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html GetUserPrivileges security_get_user_privileges.NewGetUserPrivileges - // Retrieves a user's profile using the unique profile ID. + // Get a user profile. + // + // Get a user's profile using the unique profile ID. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-profile.html GetUserProfile security_get_user_profile.NewGetUserProfile - // Creates an API key on behalf of another user. - // This API is similar to Create API keys, however it creates the API key for a - // user that is different than the user that runs the API. + // 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 (either an access token, or a // username and password) for the user on whose behalf the API key will be // created. @@ -2604,15 +3789,23 @@ type Security struct { // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html GrantApiKey security_grant_api_key.NewGrantApiKey // Check user privileges. - // Determines whether the specified user has a specified list of privileges. + // + // Determine whether the specified user has a specified list of privileges. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html HasPrivileges security_has_privileges.NewHasPrivileges - // Determines whether the users associated with the specified profile IDs have - // all the requested privileges. + // Check user profile privileges. + // + // Determine whether the users associated with the specified user profile IDs + // have all the requested privileges. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges-user-profile.html HasPrivilegesUserProfile security_has_privileges_user_profile.NewHasPrivilegesUserProfile // Invalidate API keys. - // Invalidates one or more 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. // The `manage_api_key` privilege allows deleting any API keys. // The `manage_own_api_key` only allows deleting API keys that are owned by the // user. @@ -2620,11 +3813,22 @@ type Security struct { // 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, i.e. an API key invalidates - // itself, specify its ID in the `ids` field. + // - Or, if the request is issued by an API key, that is to say an API key + // invalidates itself, specify its ID in the `ids` field. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html InvalidateApiKey security_invalidate_api_key.NewInvalidateApiKey - // Invalidates one or more access tokens or refresh tokens. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html InvalidateToken security_invalidate_token.NewInvalidateToken // Exchanges an OpenID Connection authentication response message for an @@ -2638,58 +3842,95 @@ type Security struct { // Creates an OAuth 2.0 authentication request as a URL string // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-prepare-authentication.html OidcPrepareAuthentication security_oidc_prepare_authentication.NewOidcPrepareAuthentication - // Adds or updates application privileges. + // Create or update application privileges. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html PutPrivileges security_put_privileges.NewPutPrivileges - // The role management APIs are generally the preferred way to manage roles, - // rather than using file-based role management. + // Create or update roles. + // + // The role management APIs are generally the preferred way to manage roles in + // the native realm, rather than using file-based role management. // The create or update roles API cannot update roles that are defined in roles // files. + // File-based role management is not available in Elastic Serverless. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html PutRole security_put_role.NewPutRole - // Creates and updates role mappings. + // 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. + // + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html PutRoleMapping security_put_role_mapping.NewPutRoleMapping - // Adds and updates users in the native realm. These users are commonly referred - // to as native users. + // Create or update users. + // + // A password is required for adding a new user but is optional when updating an + // existing user. + // To change a user’s password without updating any other fields, use the change + // password API. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html PutUser security_put_user.NewPutUser - // Query API keys. - // Retrieves a paginated list of API keys and their information. You can - // optionally filter the results with a query. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html QueryApiKeys security_query_api_keys.NewQueryApiKeys - // Retrieves roles in a paginated manner. You can optionally filter the results - // with a query. + // Find roles with a query. + // + // Get roles in a paginated manner. You can optionally filter the results with a + // query. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-role.html QueryRole security_query_role.NewQueryRole - // Retrieves information for Users in a paginated manner. You can optionally - // filter the results with a query. + // Find users with a query. + // + // Get information for users in a paginated manner. + // You can optionally filter the results with a query. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-user.html QueryUser security_query_user.NewQueryUser - // Submits a SAML Response message to Elasticsearch for consumption. + // Authenticate SAML. + // + // Submits a SAML response message to Elasticsearch for consumption. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html SamlAuthenticate security_saml_authenticate.NewSamlAuthenticate + // Logout of SAML completely. + // // Verifies the logout response sent from the SAML IdP. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html SamlCompleteLogout security_saml_complete_logout.NewSamlCompleteLogout + // Invalidate SAML. + // // Submits a SAML LogoutRequest message to Elasticsearch for consumption. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html SamlInvalidate security_saml_invalidate.NewSamlInvalidate + // Logout of SAML. + // // Submits a request to invalidate an access token and refresh token. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html SamlLogout security_saml_logout.NewSamlLogout - // Creates a SAML authentication request () as a URL string, based - // on the configuration of the respective SAML realm in Elasticsearch. + // Prepare SAML authentication. + // + // Creates a SAML authentication request (``) as a URL string, + // based on the configuration of the respective SAML realm in Elasticsearch. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html SamlPrepareAuthentication security_saml_prepare_authentication.NewSamlPrepareAuthentication + // Create SAML service provider metadata. + // // Generate SAML metadata for a SAML 2.0 Service Provider. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html SamlServiceProviderMetadata security_saml_service_provider_metadata.NewSamlServiceProviderMetadata + // Suggest a user profile. + // // Get suggestions for user profiles that match specified search criteria. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-suggest-user-profile.html SuggestUserProfiles security_suggest_user_profiles.NewSuggestUserProfiles // Update an API key. + // // Updates attributes of an existing API key. // Users can only update API keys that they created or that were granted to // them. @@ -2716,11 +3957,19 @@ type Security struct { // To update an API key, the owner user’s credentials are required. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-api-key.html UpdateApiKey security_update_api_key.NewUpdateApiKey + // Update a cross-cluster API key. + // + // Update the attributes of an existing cross-cluster API key, which is used for + // API key based remote cluster access. + // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html + UpdateCrossClusterApiKey security_update_cross_cluster_api_key.NewUpdateCrossClusterApiKey // Update settings for the security system index // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-settings.html UpdateSettings security_update_settings.NewUpdateSettings - // Updates specific data for the user profile that's associated with the - // specified unique ID. + // Update user profile data. + // + // Update specific data for the user profile that is associated with a unique + // ID. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-user-profile-data.html UpdateUserProfileData security_update_user_profile_data.NewUpdateUserProfileData } @@ -2802,6 +4051,9 @@ type Snapshot struct { // Returns information about a repository. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html GetRepository snapshot_get_repository.NewGetRepository + // Verifies the integrity of the contents of a snapshot repository + // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + RepositoryVerifyIntegrity snapshot_repository_verify_integrity.NewRepositoryVerifyIntegrity // Restores a snapshot. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html Restore snapshot_restore.NewRestore @@ -2814,56 +4066,96 @@ type Snapshot struct { } type Sql struct { - // Clears the SQL cursor + // Clear an SQL search cursor. // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html ClearCursor sql_clear_cursor.NewClearCursor - // Deletes an async SQL search or a stored synchronous SQL search. If the search - // is still running, the API cancels it. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-async-sql-search-api.html DeleteAsync sql_delete_async.NewDeleteAsync - // Returns the current status and available results for an async SQL search or - // stored synchronous SQL search + // Get async SQL search results. + // Get the current status and available results for an async SQL search or + // stored synchronous SQL search. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-api.html GetAsync sql_get_async.NewGetAsync - // Returns the current status of an async SQL search or a stored synchronous SQL - // search + // Get the async SQL search status. + // Get the current status of an async SQL search or a stored synchronous SQL + // search. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-status-api.html GetAsyncStatus sql_get_async_status.NewGetAsyncStatus - // Executes a SQL request + // Get SQL search results. + // Run an SQL request. // https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html Query sql_query.NewQuery - // Translates SQL into Elasticsearch queries + // Translate SQL into Elasticsearch queries. + // Translate an SQL search into a search API request containing Query DSL. // https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html Translate sql_translate.NewTranslate } type Ssl struct { - // Retrieves information about the X.509 certificates used to encrypt + // Get SSL certificates. + // + // Get information about the X.509 certificates that are used to encrypt // communications in the cluster. + // The API returns a list that includes certificates from all TLS contexts + // including: + // + // - Settings for transport and HTTP interfaces + // - TLS settings that are used within authentication realms + // - TLS settings for remote monitoring exporters + // + // The list includes certificates that are used for configuring trust, such as + // those configured in the `xpack.security.transport.ssl.truststore` and + // `xpack.security.transport.ssl.certificate_authorities` settings. + // It also includes certificates that are used for configuring server identity, + // such as `xpack.security.http.ssl.keystore` and + // `xpack.security.http.ssl.certificate settings`. + // + // The list does not include certificates that are sourced from the default SSL + // context of the Java Runtime Environment (JRE), even if those certificates are + // in use within Elasticsearch. + // + // NOTE: When a PKCS#11 token is configured as the truststore of the JRE, the + // API returns all the certificates that are included in the PKCS#11 token + // irrespective of whether these are used in the Elasticsearch TLS + // configuration. + // + // If Elasticsearch is configured to use a keystore or truststore, the API + // output includes all certificates in that store, even though some of the + // certificates might not be in active use within the cluster. // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html Certificates ssl_certificates.NewCertificates } type Synonyms struct { - // Deletes a synonym set + // Delete a synonym set. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonyms-set.html DeleteSynonym synonyms_delete_synonym.NewDeleteSynonym - // Deletes a synonym rule in a synonym set + // Delete a synonym rule. + // Delete a synonym rule from a synonym set. // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonym-rule.html DeleteSynonymRule synonyms_delete_synonym_rule.NewDeleteSynonymRule - // Retrieves a synonym set + // Get a synonym set. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms-set.html GetSynonym synonyms_get_synonym.NewGetSynonym - // Retrieves a synonym rule from a synonym set + // Get a synonym rule. + // Get a synonym rule from a synonym set. // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonym-rule.html GetSynonymRule synonyms_get_synonym_rule.NewGetSynonymRule - // Retrieves a summary of all defined synonym sets + // Get all synonym sets. + // Get a summary of all defined synonym sets. // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-synonyms-sets.html GetSynonymsSets synonyms_get_synonyms_sets.NewGetSynonymsSets - // Creates or updates a synonym set. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonyms-set.html PutSynonym synonyms_put_synonym.NewPutSynonym - // Creates or updates a synonym rule in a synonym set + // Create or update a synonym rule. + // Create or update a synonym rule in a synonym set. // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonym-rule.html PutSynonymRule synonyms_put_synonym_rule.NewPutSynonymRule } @@ -3152,13 +4444,24 @@ type API struct { // This reduces overhead and can greatly increase indexing speed. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html Bulk core_bulk.NewBulk - // Clears the search context and results for a scrolling search. + // Clear a scrolling search. + // + // Clear the search context and results for a scrolling search. // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html ClearScroll core_clear_scroll.NewClearScroll - // Closes a point-in-time. + // Close a point in time. + // + // A point in time must be opened explicitly before being used in search + // requests. + // The `keep_alive` parameter tells Elasticsearch how long it should persist. + // A point in time is automatically closed when the `keep_alive` period has + // elapsed. + // However, keeping points in time has a cost; close them as soon as they are no + // longer required for search requests. // https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html ClosePointInTime core_close_point_in_time.NewClosePointInTime - // Returns number of documents matching a query. + // Count search results. + // Get the number of documents matching a query. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html Count core_count.NewCount // Index a document. @@ -3176,8 +4479,13 @@ type API struct { // Deletes documents that match the specified query. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html DeleteByQuery core_delete_by_query.NewDeleteByQuery - // Changes the number of requests per second for a particular Delete By Query + // Throttle a delete by query operation. + // + // Change the number of requests per second for a particular delete by query // operation. + // Rethrottling that speeds up the query takes effect immediately but + // rethrotting that slows down the query takes effect after completing the + // current batch to prevent scroll timeouts. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html DeleteByQueryRethrottle core_delete_by_query_rethrottle.NewDeleteByQueryRethrottle // Delete a script or search template. @@ -3197,12 +4505,15 @@ type API struct { // a query. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html Explain core_explain.NewExplain - // The field capabilities API returns the information about the capabilities of - // fields among multiple indices. - // The field capabilities API returns runtime fields like any other field. For - // example, a runtime field with a type - // of keyword is returned as any other field that belongs to the `keyword` - // family. + // Get the field capabilities. + // + // Get information about the capabilities of fields among multiple indices. + // + // For data streams, the API returns field capabilities among the stream’s + // backing indices. + // It returns runtime fields like any other field. + // For example, a runtime field with a type of keyword is returned the same as + // any other field that belongs to the `keyword` family. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html FieldCaps core_field_caps.NewFieldCaps // Get a document by its ID. @@ -3213,17 +4524,50 @@ type API struct { // Retrieves a stored script or search template. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html GetScript core_get_script.NewGetScript - // Returns all script contexts. + // Get script contexts. + // + // Get a list of supported script contexts and their methods. // https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-contexts.html GetScriptContext core_get_script_context.NewGetScriptContext - // Returns available script types, languages and contexts + // Get script languages. + // + // Get a list of available script types, languages, and contexts. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html GetScriptLanguages core_get_script_languages.NewGetScriptLanguages // Get a document's source. // Returns the source of a document. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html GetSource core_get_source.NewGetSource - // Returns the health of the cluster. + // Get the cluster health. + // Get a report with the health status of an Elasticsearch cluster. + // The report contains a list of indicators that compose Elasticsearch + // functionality. + // + // Each indicator has a health status of: green, unknown, yellow or red. + // The indicator will provide an explanation and metadata describing the reason + // for its current health status. + // + // The cluster’s status is controlled by the worst indicator status. + // + // In the event that an indicator’s status is non-green, a list of impacts may + // be present in the indicator result which detail the functionalities that are + // negatively affected by the health issue. + // Each impact carries with it a severity level, an area of the system that is + // affected, and a simple description of the impact on the system. + // + // Some health indicators can determine the root cause of a health problem and + // prescribe a set of steps that can be performed in order to improve the health + // of the system. + // The root cause and remediation steps are encapsulated in a diagnosis. + // A diagnosis contains a cause detailing a root cause analysis, an action + // containing a brief description of the steps to take to fix the problem, the + // list of affected resources (if applicable), and a detailed step-by-step + // troubleshooting guide to fix the diagnosed problem. + // + // NOTE: The health indicators perform root cause analysis of non-green health + // statuses. This can be computationally expensive when called frequently. + // When setting up automated polling of the API for health status, set verbose + // to false to disable the more expensive analysis logic. // https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html HealthReport core_health_report.NewHealthReport // Index a document. @@ -3237,23 +4581,72 @@ type API struct { // Returns basic information about the cluster. // https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html Info core_info.NewInfo - // Performs a kNN search. + // Run a knn search. + // + // NOTE: The kNN search API has been replaced by the `knn` option in the search + // API. + // + // Perform a k-nearest neighbor (kNN) search on a dense_vector field and return + // the matching documents. + // Given a query vector, the API finds the k closest vectors and returns those + // documents as search hits. + // + // Elasticsearch uses the HNSW algorithm to support efficient kNN search. + // Like most kNN algorithms, HNSW is an approximate method that sacrifices + // result accuracy for improved search speed. + // This means the results returned are not always the true k closest neighbors. + // + // The kNN search API supports restricting the search using a filter. + // The search will return the top k documents that also match the filter query. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html KnnSearch core_knn_search.NewKnnSearch - // Allows to get multiple documents in one request. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html Mget core_mget.NewMget - // Allows to execute several search operations in one request. + // Run multiple searches. + // + // The format of the request is similar to the bulk API format and makes use of + // the newline delimited JSON (NDJSON) format. + // The structure is as follows: + // + // ``` + // header\n + // body\n + // header\n + // body\n + // ``` + // + // This structure is specifically optimized to reduce parsing if a specific + // search ends up redirected to another node. + // + // IMPORTANT: The final line of data must end with a newline character `\n`. + // Each newline character may be preceded by a carriage return `\r`. + // When sending requests to this endpoint the `Content-Type` header should be + // set to `application/x-ndjson`. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html Msearch core_msearch.NewMsearch - // Runs multiple templated searches with a single request. + // Run multiple templated searches. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html MsearchTemplate core_msearch_template.NewMsearchTemplate - // Returns multiple termvectors in one request. + // Get multiple term vectors. + // + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html Mtermvectors core_mtermvectors.NewMtermvectors - // A search request by default executes against the most recent visible data of - // the target indices, + // 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 @@ -3263,18 +4656,24 @@ type API struct { // `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. + // The `keep_alive` parameter tells Elasticsearch how long it should persist. // https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html OpenPointInTime core_open_point_in_time.NewOpenPointInTime // Ping the cluster. - // Returns whether the cluster is running. + // Get information about whether the cluster is running. // https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html Ping core_ping.NewPing // Create or update a script or search template. // Creates or updates a stored script or search template. // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html PutScript core_put_script.NewPutScript - // Enables you to evaluate the quality of ranked search results over a set of - // typical search queries. + // Evaluate ranked search results. + // + // Evaluate the quality of ranked search results over a set of typical search + // queries. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html RankEval core_rank_eval.NewRankEval // Reindex documents. @@ -3283,43 +4682,93 @@ type API struct { // source. For example, you cannot reindex a data stream into itself. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html Reindex core_reindex.NewReindex - // Copies documents from a source to a destination. + // Throttle a reindex operation. + // + // Change the number of requests per second for a particular reindex operation. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html ReindexRethrottle core_reindex_rethrottle.NewReindexRethrottle - // Renders a search template as a search request body. + // Render a search template. + // + // Render a search template as a search request body. // https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html RenderSearchTemplate core_render_search_template.NewRenderSearchTemplate // Run a script. // Runs a script and returns a result. // https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html ScriptsPainlessExecute core_scripts_painless_execute.NewScriptsPainlessExecute - // Allows to retrieve a large numbers of results from a single search request. + // Run a scrolling search. + // + // IMPORTANT: The scroll API is no longer recommend for deep pagination. If you + // need to preserve the index state while paging through more than 10,000 hits, + // use the `search_after` parameter with a point in time (PIT). + // + // The scroll API gets large sets of results from a single scrolling search + // request. + // To get the necessary scroll ID, submit a search API request that includes an + // argument for the `scroll` query parameter. + // The `scroll` parameter indicates how long Elasticsearch should retain the + // search context for the request. + // The search response returns a scroll ID in the `_scroll_id` response body + // parameter. + // You can then use the scroll ID with the scroll API to retrieve the next batch + // of results for the request. + // If the Elasticsearch security features are enabled, the access to the results + // of a specific scroll ID is restricted to the user or API key that submitted + // the search. + // + // You can also use the scroll API to specify a new scroll parameter that + // extends or shortens the retention period for the search context. + // + // IMPORTANT: Results from a scrolling search reflect the state of the index at + // the time of the initial search request. Subsequent indexing or document + // changes only affect later search and scroll requests. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-scroll Scroll core_scroll.NewScroll - // Returns search hits that match the query defined in the request. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html Search core_search.NewSearch // Search a vector tile. - // Searches a vector tile for geospatial values. + // + // Search a vector tile for geospatial values. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-vector-tile-api.html SearchMvt core_search_mvt.NewSearchMvt - // Returns information about the indices and shards that a search request would - // be executed against. + // 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. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html SearchShards core_search_shards.NewSearchShards - // Runs a search with a search template. + // Run a search with a search template. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html SearchTemplate core_search_template.NewSearchTemplate - // The terms enum API can be used to discover terms in the index that begin - // with the provided string. It is designed for low-latency look-ups used in + // Get terms in an index. + // + // Discover terms that match a partial string in an index. + // This "terms enum" API is designed for low-latency look-ups used in // auto-complete scenarios. + // + // If the `complete` property in the response is false, the returned terms set + // may be incomplete and should be treated as approximate. + // This can occur due to a few reasons, such as a request timeout or a node + // error. + // + // NOTE: The terms enum API may return terms from deleted documents. Deleted + // documents are initially only marked as deleted. It is not until their + // segments are merged that documents are actually deleted. Until that happens, + // the terms enum API will return terms from these documents. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html TermsEnum core_terms_enum.NewTermsEnum // Get term vector information. - // Returns information and statistics about terms in the fields of a particular + // + // Get information and statistics about terms in the fields of a particular // document. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html Termvectors core_termvectors.NewTermvectors @@ -3334,8 +4783,13 @@ type API struct { // mapping changes. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html UpdateByQuery core_update_by_query.NewUpdateByQuery - // Changes the number of requests per second for a particular Update By Query + // Throttle an update by query operation. + // + // Change the number of requests per second for a particular update by query // operation. + // Rethrottling that speeds up the query takes effect immediately but + // rethrotting that slows down the query takes effect after completing the + // current batch to prevent scroll timeouts. // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html UpdateByQueryRethrottle core_update_by_query_rethrottle.NewUpdateByQueryRethrottle } @@ -3645,12 +5099,15 @@ func New(tp elastictransport.Interface) *API { // Ingest Ingest: Ingest{ - DeletePipeline: ingest_delete_pipeline.NewDeletePipelineFunc(tp), - GeoIpStats: ingest_geo_ip_stats.NewGeoIpStatsFunc(tp), - GetPipeline: ingest_get_pipeline.NewGetPipelineFunc(tp), - ProcessorGrok: ingest_processor_grok.NewProcessorGrokFunc(tp), - PutPipeline: ingest_put_pipeline.NewPutPipelineFunc(tp), - Simulate: ingest_simulate.NewSimulateFunc(tp), + DeleteGeoipDatabase: ingest_delete_geoip_database.NewDeleteGeoipDatabaseFunc(tp), + DeletePipeline: ingest_delete_pipeline.NewDeletePipelineFunc(tp), + GeoIpStats: ingest_geo_ip_stats.NewGeoIpStatsFunc(tp), + GetGeoipDatabase: ingest_get_geoip_database.NewGetGeoipDatabaseFunc(tp), + GetPipeline: ingest_get_pipeline.NewGetPipelineFunc(tp), + ProcessorGrok: ingest_processor_grok.NewProcessorGrokFunc(tp), + PutGeoipDatabase: ingest_put_geoip_database.NewPutGeoipDatabaseFunc(tp), + PutPipeline: ingest_put_pipeline.NewPutPipelineFunc(tp), + Simulate: ingest_simulate.NewSimulateFunc(tp), }, // License @@ -3788,6 +5245,7 @@ func New(tp elastictransport.Interface) *API { ListRulesets: query_rules_list_rulesets.NewListRulesetsFunc(tp), PutRule: query_rules_put_rule.NewPutRuleFunc(tp), PutRuleset: query_rules_put_ruleset.NewPutRulesetFunc(tp), + Test: query_rules_test.NewTestFunc(tp), }, // Rollup @@ -3884,6 +5342,7 @@ func New(tp elastictransport.Interface) *API { SamlServiceProviderMetadata: security_saml_service_provider_metadata.NewSamlServiceProviderMetadataFunc(tp), SuggestUserProfiles: security_suggest_user_profiles.NewSuggestUserProfilesFunc(tp), UpdateApiKey: security_update_api_key.NewUpdateApiKeyFunc(tp), + UpdateCrossClusterApiKey: security_update_cross_cluster_api_key.NewUpdateCrossClusterApiKeyFunc(tp), UpdateSettings: security_update_settings.NewUpdateSettingsFunc(tp), UpdateUserProfileData: security_update_user_profile_data.NewUpdateUserProfileDataFunc(tp), }, @@ -3910,17 +5369,18 @@ func New(tp elastictransport.Interface) *API { // Snapshot Snapshot: Snapshot{ - CleanupRepository: snapshot_cleanup_repository.NewCleanupRepositoryFunc(tp), - Clone: snapshot_clone.NewCloneFunc(tp), - Create: snapshot_create.NewCreateFunc(tp), - CreateRepository: snapshot_create_repository.NewCreateRepositoryFunc(tp), - Delete: snapshot_delete.NewDeleteFunc(tp), - DeleteRepository: snapshot_delete_repository.NewDeleteRepositoryFunc(tp), - Get: snapshot_get.NewGetFunc(tp), - GetRepository: snapshot_get_repository.NewGetRepositoryFunc(tp), - Restore: snapshot_restore.NewRestoreFunc(tp), - Status: snapshot_status.NewStatusFunc(tp), - VerifyRepository: snapshot_verify_repository.NewVerifyRepositoryFunc(tp), + CleanupRepository: snapshot_cleanup_repository.NewCleanupRepositoryFunc(tp), + Clone: snapshot_clone.NewCloneFunc(tp), + Create: snapshot_create.NewCreateFunc(tp), + CreateRepository: snapshot_create_repository.NewCreateRepositoryFunc(tp), + Delete: snapshot_delete.NewDeleteFunc(tp), + DeleteRepository: snapshot_delete_repository.NewDeleteRepositoryFunc(tp), + Get: snapshot_get.NewGetFunc(tp), + GetRepository: snapshot_get_repository.NewGetRepositoryFunc(tp), + RepositoryVerifyIntegrity: snapshot_repository_verify_integrity.NewRepositoryVerifyIntegrityFunc(tp), + Restore: snapshot_restore.NewRestoreFunc(tp), + Status: snapshot_status.NewStatusFunc(tp), + VerifyRepository: snapshot_verify_repository.NewVerifyRepositoryFunc(tp), }, // Sql diff --git a/typedapi/asyncsearch/delete/delete.go b/typedapi/asyncsearch/delete/delete.go index 7cca10eaaf..fa28025f5e 100644 --- a/typedapi/asyncsearch/delete/delete.go +++ b/typedapi/asyncsearch/delete/delete.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes an async search by identifier. -// If the search is still running, the search request will be cancelled. +// 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 @@ -82,8 +83,9 @@ func NewDeleteFunc(tp elastictransport.Interface) NewDelete { } } -// Deletes an async search by identifier. -// If the search is still running, the search request will be cancelled. +// 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 diff --git a/typedapi/asyncsearch/delete/response.go b/typedapi/asyncsearch/delete/response.go index 0ff4ca302e..39202fd4ab 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/async_search/delete/AsyncSearchDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/async_search/delete/AsyncSearchDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/asyncsearch/get/get.go b/typedapi/asyncsearch/get/get.go index 1b1c7f5afd..a9d45d86ea 100644 --- a/typedapi/asyncsearch/get/get.go +++ b/typedapi/asyncsearch/get/get.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves the results of a previously submitted async search request given -// its identifier. +// 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. @@ -80,8 +81,9 @@ func NewGetFunc(tp elastictransport.Interface) NewGet { } } -// Retrieves the results of a previously submitted async search request given -// its identifier. +// 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. diff --git a/typedapi/asyncsearch/get/response.go b/typedapi/asyncsearch/get/response.go index a9b174e3e1..e57341034a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package get @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/async_search/get/AsyncSearchGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/async_search/get/AsyncSearchGetResponse.ts#L22-L24 type Response struct { // CompletionTime Indicates when the async search completed. Only present diff --git a/typedapi/asyncsearch/status/response.go b/typedapi/asyncsearch/status/response.go index 4064cff2d1..2260a72bb5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package status @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package status // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/async_search/status/AsyncSearchStatusResponse.ts#L39-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/async_search/status/AsyncSearchStatusResponse.ts#L39-L41 type Response struct { // Clusters_ Metadata about clusters involved in the cross-cluster search. diff --git a/typedapi/asyncsearch/status/status.go b/typedapi/asyncsearch/status/status.go index c275ba5542..3820873086 100644 --- a/typedapi/asyncsearch/status/status.go +++ b/typedapi/asyncsearch/status/status.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Get async search status -// Retrieves the status of a previously submitted async search request given its +// 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, use of this API is // restricted to the `monitoring_user` role. @@ -80,8 +81,9 @@ func NewStatusFunc(tp elastictransport.Interface) NewStatus { } } -// Get async search status -// Retrieves the status of a previously submitted async search request given its +// 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, use of this API is // restricted to the `monitoring_user` role. @@ -307,6 +309,16 @@ func (r *Status) _id(id string) *Status { return r } +// KeepAlive Specifies how long the async search needs to be available. +// Ongoing async searches and any saved search results are deleted after this +// period. +// API name: keep_alive +func (r *Status) KeepAlive(duration string) *Status { + r.values.Set("keep_alive", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/asyncsearch/submit/request.go b/typedapi/asyncsearch/submit/request.go index 1d6f37c29a..298e1e025d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package submit @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package submit // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/async_search/submit/AsyncSearchSubmitRequest.ts#L55-L286 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/async_search/submit/AsyncSearchSubmitRequest.ts#L55-L280 type Request struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Collapse *types.FieldCollapse `json:"collapse,omitempty"` diff --git a/typedapi/asyncsearch/submit/response.go b/typedapi/asyncsearch/submit/response.go index 26f9158f14..552c6b152c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package submit @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package submit // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/async_search/submit/AsyncSearchSubmitResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/async_search/submit/AsyncSearchSubmitResponse.ts#L22-L24 type Response struct { // CompletionTime Indicates when the async search completed. Only present diff --git a/typedapi/asyncsearch/submit/submit.go b/typedapi/asyncsearch/submit/submit.go index da20d9ea1e..c32590431d 100644 --- a/typedapi/asyncsearch/submit/submit.go +++ b/typedapi/asyncsearch/submit/submit.go @@ -16,17 +16,19 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Runs a search request asynchronously. +// 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, hence -// partial results become available following the sort criteria that was -// requested. -// Warning: Async search does not support scroll nor search requests that only -// include the suggest section. -// By default, Elasticsearch doesn’t allow you to store an async search response -// larger than 10Mb and an attempt to do this results in an error. +// 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. package submit @@ -93,15 +95,17 @@ func NewSubmitFunc(tp elastictransport.Interface) NewSubmit { } } -// Runs a search request asynchronously. +// 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, hence -// partial results become available following the sort criteria that was -// requested. -// Warning: Async search does not support scroll nor search requests that only -// include the suggest section. -// By default, Elasticsearch doesn’t allow you to store an async search response -// larger than 10Mb and an attempt to do this results in an error. +// 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. // @@ -362,16 +366,6 @@ func (r *Submit) KeepOnCompletion(keeponcompletion bool) *Submit { return r } -// KeepAlive Specifies how long the async search needs to be available. -// Ongoing async searches and any saved search results are deleted after this -// period. -// API name: keep_alive -func (r *Submit) KeepAlive(duration string) *Submit { - r.values.Set("keep_alive", duration) - - 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 @@ -509,16 +503,6 @@ func (r *Submit) Preference(preference string) *Submit { return r } -// PreFilterShardSize The default value cannot be changed, which enforces the execution of a -// pre-filter roundtrip to retrieve statistics from each shard so that the ones -// that surely don’t hold any document matching the query get skipped. -// API name: pre_filter_shard_size -func (r *Submit) PreFilterShardSize(prefiltershardsize string) *Submit { - r.values.Set("pre_filter_shard_size", prefiltershardsize) - - return r -} - // RequestCache Specify if request cache should be used for this request or not, defaults to // true // API name: request_cache @@ -536,13 +520,6 @@ func (r *Submit) Routing(routing string) *Submit { return r } -// API name: scroll -func (r *Submit) Scroll(duration string) *Submit { - r.values.Set("scroll", duration) - - return r -} - // SearchType Search operation type // API name: search_type func (r *Submit) SearchType(searchtype searchtype.SearchType) *Submit { @@ -592,6 +569,8 @@ func (r *Submit) TypedKeys(typedkeys bool) *Submit { return r } +// RestTotalHitsAsInt Indicates whether hits.total should be rendered as an integer or an object in +// the rest search response // API name: rest_total_hits_as_int func (r *Submit) RestTotalHitsAsInt(resttotalhitsasint bool) *Submit { r.values.Set("rest_total_hits_as_int", strconv.FormatBool(resttotalhitsasint)) diff --git a/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go b/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go index 89b910cc3e..9f19155a26 100644 --- a/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go +++ b/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go @@ -16,10 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. -// Direct use is not supported. +// 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. package deleteautoscalingpolicy import ( @@ -77,8 +80,11 @@ func NewDeleteAutoscalingPolicyFunc(tp elastictransport.Interface) NewDeleteAuto } } -// Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. -// Direct use is not supported. +// Delete an autoscaling policy. +// +// NOTE: This feature is designed for indirect use by Elasticsearch Service, +// Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not +// supported. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html func New(tp elastictransport.Interface) *DeleteAutoscalingPolicy { @@ -301,6 +307,25 @@ func (r *DeleteAutoscalingPolicy) _name(name string) *DeleteAutoscalingPolicy { 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 *DeleteAutoscalingPolicy) MasterTimeout(duration string) *DeleteAutoscalingPolicy { + 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 *DeleteAutoscalingPolicy) Timeout(duration string) *DeleteAutoscalingPolicy { + 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 diff --git a/typedapi/autoscaling/deleteautoscalingpolicy/response.go b/typedapi/autoscaling/deleteautoscalingpolicy/response.go index ac10ae3fd3..05b1cf4b28 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleteautoscalingpolicy // Response holds the response body struct for the package deleteautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go b/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go index 087d0606e0..66b0b7ffca 100644 --- a/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go +++ b/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go @@ -16,11 +16,31 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Gets the current autoscaling capacity based on the configured autoscaling -// policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not +// 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. package getautoscalingcapacity import ( @@ -70,10 +90,30 @@ func NewGetAutoscalingCapacityFunc(tp elastictransport.Interface) NewGetAutoscal } } -// Gets the current autoscaling capacity based on the configured autoscaling -// policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not +// Get the autoscaling capacity. +// +// NOTE: This feature is designed for indirect use by Elasticsearch Service, +// Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not // supported. // +// This API gets the current autoscaling capacity based on the configured +// autoscaling policy. +// It will return information to size the cluster appropriately to the current +// workload. +// +// The `required_capacity` is calculated as the maximum of the +// `required_capacity` result of all individual deciders that are enabled for +// the policy. +// +// The operator should verify that the `current_nodes` match the operator’s +// knowledge of the cluster to avoid making autoscaling decisions based on stale +// or incomplete information. +// +// The response contains decider-specific information you can use to diagnose +// how and why autoscaling determined a certain capacity was required. +// This information is provided for diagnosis only. +// Do not use this information to make autoscaling decisions. +// // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html func New(tp elastictransport.Interface) *GetAutoscalingCapacity { r := &GetAutoscalingCapacity{ @@ -280,6 +320,16 @@ func (r *GetAutoscalingCapacity) Header(key, value string) *GetAutoscalingCapaci 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 *GetAutoscalingCapacity) MasterTimeout(duration string) *GetAutoscalingCapacity { + r.values.Set("master_timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/autoscaling/getautoscalingcapacity/response.go b/typedapi/autoscaling/getautoscalingcapacity/response.go index 07c61d2528..5a4633900c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getautoscalingcapacity @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getautoscalingcapacity // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 374c8c9c39..7dd9b131b3 100644 --- a/typedapi/autoscaling/getautoscalingpolicy/get_autoscaling_policy.go +++ b/typedapi/autoscaling/getautoscalingpolicy/get_autoscaling_policy.go @@ -16,10 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and -// ECK. Direct use is not supported. +// 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. package getautoscalingpolicy import ( @@ -77,8 +80,11 @@ func NewGetAutoscalingPolicyFunc(tp elastictransport.Interface) NewGetAutoscalin } } -// Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and -// ECK. Direct use is not supported. +// Get an autoscaling policy. +// +// NOTE: This feature is designed for indirect use by Elasticsearch Service, +// Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not +// supported. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html func New(tp elastictransport.Interface) *GetAutoscalingPolicy { @@ -301,6 +307,16 @@ func (r *GetAutoscalingPolicy) _name(name string) *GetAutoscalingPolicy { 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 *GetAutoscalingPolicy) MasterTimeout(duration string) *GetAutoscalingPolicy { + r.values.Set("master_timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/autoscaling/getautoscalingpolicy/response.go b/typedapi/autoscaling/getautoscalingpolicy/response.go index b549e63d49..f0350f8f8b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getautoscalingpolicy @@ -26,10 +26,10 @@ import ( // Response holds the response body struct for the package getautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/autoscaling/get_autoscaling_policy/GetAutoscalingPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/autoscaling/get_autoscaling_policy/GetAutoscalingPolicyResponse.ts#L22-L24 type Response struct { - // Deciders Decider settings + // Deciders Decider settings. Deciders map[string]json.RawMessage `json:"deciders"` Roles []string `json:"roles"` } diff --git a/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go b/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go index 79eae2757e..c96a67c1ea 100644 --- a/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go +++ b/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go @@ -16,10 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and -// ECK. Direct use is not supported. +// 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. package putautoscalingpolicy import ( @@ -82,8 +85,11 @@ func NewPutAutoscalingPolicyFunc(tp elastictransport.Interface) NewPutAutoscalin } } -// Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and -// ECK. Direct use is not supported. +// Create or update an autoscaling policy. +// +// NOTE: This feature is designed for indirect use by Elasticsearch Service, +// Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not +// supported. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html func New(tp elastictransport.Interface) *PutAutoscalingPolicy { @@ -317,6 +323,25 @@ func (r *PutAutoscalingPolicy) _name(name string) *PutAutoscalingPolicy { 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 *PutAutoscalingPolicy) MasterTimeout(duration string) *PutAutoscalingPolicy { + 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 *PutAutoscalingPolicy) Timeout(duration string) *PutAutoscalingPolicy { + 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 @@ -361,7 +386,7 @@ func (r *PutAutoscalingPolicy) Pretty(pretty bool) *PutAutoscalingPolicy { return r } -// Deciders Decider settings +// Deciders Decider settings. // API name: deciders func (r *PutAutoscalingPolicy) Deciders(deciders map[string]json.RawMessage) *PutAutoscalingPolicy { diff --git a/typedapi/autoscaling/putautoscalingpolicy/request.go b/typedapi/autoscaling/putautoscalingpolicy/request.go index b0f3301948..c1c8fc0e93 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putautoscalingpolicy @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L25-L51 type Request = types.AutoscalingPolicy // NewRequest returns a Request diff --git a/typedapi/autoscaling/putautoscalingpolicy/response.go b/typedapi/autoscaling/putautoscalingpolicy/response.go index 59208f8eae..97c353921b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putautoscalingpolicy // Response holds the response body struct for the package putautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/capabilities/capabilities.go b/typedapi/capabilities/capabilities.go index 016061bfa2..0dd9ce22d0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // 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 dce6a35afc..9488843407 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get aliases. // Retrieves the cluster’s index aliases, including filter and routing diff --git a/typedapi/cat/aliases/response.go b/typedapi/cat/aliases/response.go index ab27589687..faa40ad212 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package aliases @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package aliases // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/aliases/CatAliasesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/aliases/CatAliasesResponse.ts#L22-L24 type Response []types.AliasesRecord diff --git a/typedapi/cat/allocation/allocation.go b/typedapi/cat/allocation/allocation.go index 3051d93db4..cd2eb00d0c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Provides a snapshot of the number of shards allocated to each data node and // their disk space. diff --git a/typedapi/cat/allocation/response.go b/typedapi/cat/allocation/response.go index 81fc0a1f4f..e5d5f07a68 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package allocation @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package allocation // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/allocation/CatAllocationResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/allocation/CatAllocationResponse.ts#L22-L24 type Response []types.AllocationRecord diff --git a/typedapi/cat/componenttemplates/component_templates.go b/typedapi/cat/componenttemplates/component_templates.go index 0d15dd753c..059adda69f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get component templates. // Returns information about component templates in a cluster. diff --git a/typedapi/cat/componenttemplates/response.go b/typedapi/cat/componenttemplates/response.go index 4f3168f2f2..b93d161b92 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package componenttemplates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package componenttemplates // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/component_templates/CatComponentTemplatesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/component_templates/CatComponentTemplatesResponse.ts#L22-L24 type Response []types.CatComponentTemplate diff --git a/typedapi/cat/count/count.go b/typedapi/cat/count/count.go index fe64df910e..b53adf3f13 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get a document count. // Provides quick access to a document count for a data stream, an index, or an diff --git a/typedapi/cat/count/response.go b/typedapi/cat/count/response.go index 4f4540f024..7f6e10bbf5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package count @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/count/CatCountResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/count/CatCountResponse.ts#L22-L24 type Response []types.CountRecord diff --git a/typedapi/cat/fielddata/fielddata.go b/typedapi/cat/fielddata/fielddata.go index 5f07762568..34c623e84f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns the amount of heap memory currently used by the field data cache on // every data node in the cluster. diff --git a/typedapi/cat/fielddata/response.go b/typedapi/cat/fielddata/response.go index 8e3717327b..a028dadaf6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package fielddata @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package fielddata // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/fielddata/CatFielddataResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/fielddata/CatFielddataResponse.ts#L22-L24 type Response []types.FielddataRecord diff --git a/typedapi/cat/health/health.go b/typedapi/cat/health/health.go index 7a5a835f14..7fabfa8915 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns the health status of a cluster, similar to the cluster health API. // IMPORTANT: cat APIs are only intended for human consumption using the command diff --git a/typedapi/cat/health/response.go b/typedapi/cat/health/response.go index d52a652562..72cce7f8c9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package health @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package health // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/health/CatHealthResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/health/CatHealthResponse.ts#L22-L24 type Response []types.HealthRecord diff --git a/typedapi/cat/help/help.go b/typedapi/cat/help/help.go index 9c67403f4b..3eea505325 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get CAT help. // Returns help for the CAT APIs. diff --git a/typedapi/cat/help/response.go b/typedapi/cat/help/response.go index 13992e6614..0ff710932a 100644 --- a/typedapi/cat/help/response.go +++ b/typedapi/cat/help/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package help @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package help // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/help/CatHelpResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/help/CatHelpResponse.ts#L22-L24 type Response []types.HelpRecord diff --git a/typedapi/cat/indices/indices.go b/typedapi/cat/indices/indices.go index 87b7216759..5ea7e31b30 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get index information. // Returns high-level information about indices in a cluster, including backing diff --git a/typedapi/cat/indices/response.go b/typedapi/cat/indices/response.go index 74f27a0667..50ea01426e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package indices @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package indices // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/indices/CatIndicesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/indices/CatIndicesResponse.ts#L22-L24 type Response []types.IndicesRecord diff --git a/typedapi/cat/master/master.go b/typedapi/cat/master/master.go index 146ec1cdbb..4a6838b5d2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns information about the master node, including the ID, bound IP // address, and name. diff --git a/typedapi/cat/master/response.go b/typedapi/cat/master/response.go index 001c32a61a..2171f7bddc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package master @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package master // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/master/CatMasterResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/master/CatMasterResponse.ts#L22-L24 type Response []types.MasterRecord diff --git a/typedapi/cat/mldatafeeds/ml_datafeeds.go b/typedapi/cat/mldatafeeds/ml_datafeeds.go index c7ac282615..3d815c5b22 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get datafeeds. // Returns configuration and usage information about datafeeds. diff --git a/typedapi/cat/mldatafeeds/response.go b/typedapi/cat/mldatafeeds/response.go index 174f9556e9..bc7c6633d4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package mldatafeeds @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mldatafeeds // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/ml_datafeeds/CatDatafeedsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/ml_datafeeds/CatDatafeedsResponse.ts#L22-L24 type Response []types.DatafeedsRecord diff --git a/typedapi/cat/mldataframeanalytics/ml_data_frame_analytics.go b/typedapi/cat/mldataframeanalytics/ml_data_frame_analytics.go index 6133297693..2ef135ba1e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get data frame analytics jobs. // Returns configuration and usage information about data frame analytics jobs. diff --git a/typedapi/cat/mldataframeanalytics/response.go b/typedapi/cat/mldataframeanalytics/response.go index 444011571c..f21e833397 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package mldataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mldataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/ml_data_frame_analytics/CatDataFrameAnalyticsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/ml_data_frame_analytics/CatDataFrameAnalyticsResponse.ts#L22-L24 type Response []types.DataFrameAnalyticsRecord diff --git a/typedapi/cat/mljobs/ml_jobs.go b/typedapi/cat/mljobs/ml_jobs.go index 25cb427592..3df0322fd1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get anomaly detection jobs. // Returns configuration and usage information for anomaly detection jobs. diff --git a/typedapi/cat/mljobs/response.go b/typedapi/cat/mljobs/response.go index e44204086a..ed30288402 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package mljobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mljobs // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/ml_jobs/CatJobsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/ml_jobs/CatJobsResponse.ts#L22-L24 type Response []types.JobsRecord diff --git a/typedapi/cat/mltrainedmodels/ml_trained_models.go b/typedapi/cat/mltrainedmodels/ml_trained_models.go index c68671c9b4..d74c2c4e69 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get trained models. // Returns configuration and usage information about inference trained models. diff --git a/typedapi/cat/mltrainedmodels/response.go b/typedapi/cat/mltrainedmodels/response.go index f7036a7cd0..50cfaf7c4d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package mltrainedmodels @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mltrainedmodels // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L24 type Response []types.TrainedModelsRecord diff --git a/typedapi/cat/nodeattrs/nodeattrs.go b/typedapi/cat/nodeattrs/nodeattrs.go index da85e6bfb2..583b5e2ad5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns information about custom node attributes. // IMPORTANT: cat APIs are only intended for human consumption using the command diff --git a/typedapi/cat/nodeattrs/response.go b/typedapi/cat/nodeattrs/response.go index 82e7ec45ea..bf79140cca 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package nodeattrs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package nodeattrs // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/nodeattrs/CatNodeAttributesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/nodeattrs/CatNodeAttributesResponse.ts#L22-L24 type Response []types.NodeAttributesRecord diff --git a/typedapi/cat/nodes/nodes.go b/typedapi/cat/nodes/nodes.go index 646ffcfacf..98589f3d5b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns information about the nodes in a cluster. // IMPORTANT: cat APIs are only intended for human consumption using the command diff --git a/typedapi/cat/nodes/response.go b/typedapi/cat/nodes/response.go index 6ab0270af1..d62b4aa65f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package nodes @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package nodes // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/nodes/CatNodesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/nodes/CatNodesResponse.ts#L22-L24 type Response []types.NodesRecord diff --git a/typedapi/cat/pendingtasks/pending_tasks.go b/typedapi/cat/pendingtasks/pending_tasks.go index 59e3ec70d8..a48450e712 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns cluster-level changes that have not yet been executed. // IMPORTANT: cat APIs are only intended for human consumption using the command diff --git a/typedapi/cat/pendingtasks/response.go b/typedapi/cat/pendingtasks/response.go index 43df84f36c..746771fe98 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package pendingtasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package pendingtasks // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/pending_tasks/CatPendingTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/pending_tasks/CatPendingTasksResponse.ts#L22-L24 type Response []types.PendingTasksRecord diff --git a/typedapi/cat/plugins/plugins.go b/typedapi/cat/plugins/plugins.go index 2f4ed2bfd8..fcb9c525c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns a list of plugins running on each node of a cluster. // IMPORTANT: cat APIs are only intended for human consumption using the command diff --git a/typedapi/cat/plugins/response.go b/typedapi/cat/plugins/response.go index 39892f9308..18c1ce4a50 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package plugins @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package plugins // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/plugins/CatPluginsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/plugins/CatPluginsResponse.ts#L22-L24 type Response []types.PluginsRecord diff --git a/typedapi/cat/recovery/recovery.go b/typedapi/cat/recovery/recovery.go index 0a9360e406..28fabc538d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns information about ongoing and completed shard recoveries. // Shard recovery is the process of initializing a shard copy, such as restoring diff --git a/typedapi/cat/recovery/response.go b/typedapi/cat/recovery/response.go index 9228581ee5..4543524153 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package recovery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package recovery // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/recovery/CatRecoveryResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/recovery/CatRecoveryResponse.ts#L22-L24 type Response []types.RecoveryRecord diff --git a/typedapi/cat/repositories/repositories.go b/typedapi/cat/repositories/repositories.go index 47d39aafc9..d764b68168 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns the snapshot repositories for a cluster. // IMPORTANT: cat APIs are only intended for human consumption using the command diff --git a/typedapi/cat/repositories/response.go b/typedapi/cat/repositories/response.go index 0bd84c85e3..8234fac54c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package repositories @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package repositories // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/repositories/CatRepositoriesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/repositories/CatRepositoriesResponse.ts#L22-L24 type Response []types.RepositoriesRecord diff --git a/typedapi/cat/segments/response.go b/typedapi/cat/segments/response.go index cd9136f5a2..cbe3feab5b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package segments @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package segments // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/segments/CatSegmentsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/segments/CatSegmentsResponse.ts#L22-L24 type Response []types.SegmentsRecord diff --git a/typedapi/cat/segments/segments.go b/typedapi/cat/segments/segments.go index b200b94539..9039533a98 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns low-level information about the Lucene segments in index shards. // For data streams, the API returns information about the backing indices. diff --git a/typedapi/cat/shards/response.go b/typedapi/cat/shards/response.go index 992498ec62..85ae1f168e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package shards @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package shards // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/shards/CatShardsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/shards/CatShardsResponse.ts#L22-L24 type Response []types.ShardsRecord diff --git a/typedapi/cat/shards/shards.go b/typedapi/cat/shards/shards.go index cfea4a8eec..3753c539cb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns information about the shards in a cluster. // For data streams, the API returns information about the backing indices. diff --git a/typedapi/cat/snapshots/response.go b/typedapi/cat/snapshots/response.go index 300574791a..46cb7ea7ce 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package snapshots @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package snapshots // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/snapshots/CatSnapshotsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/snapshots/CatSnapshotsResponse.ts#L22-L24 type Response []types.SnapshotsRecord diff --git a/typedapi/cat/snapshots/snapshots.go b/typedapi/cat/snapshots/snapshots.go index b08e087d27..19cdf3d25a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns information about the snapshots stored in one or more repositories. // A snapshot is a backup of an index or running Elasticsearch cluster. diff --git a/typedapi/cat/tasks/response.go b/typedapi/cat/tasks/response.go index 5ec14b1b91..ba7240d2a9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package tasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package tasks // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/tasks/CatTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/tasks/CatTasksResponse.ts#L22-L24 type Response []types.TasksRecord diff --git a/typedapi/cat/tasks/tasks.go b/typedapi/cat/tasks/tasks.go index 7562f5bc8e..38390fc6ba 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns information about tasks currently executing in the cluster. // IMPORTANT: cat APIs are only intended for human consumption using the command diff --git a/typedapi/cat/templates/response.go b/typedapi/cat/templates/response.go index b528206021..96ffe52e82 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package templates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package templates // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/templates/CatTemplatesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/templates/CatTemplatesResponse.ts#L22-L24 type Response []types.TemplatesRecord diff --git a/typedapi/cat/templates/templates.go b/typedapi/cat/templates/templates.go index 5a34478e36..c7b421ffa6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns information about index templates in a cluster. // You can use index templates to apply index settings and field mappings to new diff --git a/typedapi/cat/threadpool/response.go b/typedapi/cat/threadpool/response.go index bae4eb350b..e8094e9613 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package threadpool @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package threadpool // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/thread_pool/CatThreadPoolResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/thread_pool/CatThreadPoolResponse.ts#L22-L24 type Response []types.ThreadPoolRecord diff --git a/typedapi/cat/threadpool/thread_pool.go b/typedapi/cat/threadpool/thread_pool.go index 2801a15087..50577684e6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns thread pool statistics for each node in a cluster. // Returned information includes all built-in thread pools and custom thread diff --git a/typedapi/cat/transforms/response.go b/typedapi/cat/transforms/response.go index 745ac79af3..7f77d7d269 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package transforms @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package transforms // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/transforms/CatTransformsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/transforms/CatTransformsResponse.ts#L22-L24 type Response []types.TransformsRecord diff --git a/typedapi/cat/transforms/transforms.go b/typedapi/cat/transforms/transforms.go index 7c8e9b01b2..58ee864777 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get transforms. // Returns configuration and usage information about transforms. diff --git a/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go b/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go index 5f6cf78822..7fd6855150 100644 --- a/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go +++ b/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes auto-follow patterns. +// Delete auto-follow patterns. +// Delete a collection of cross-cluster replication auto-follow patterns. package deleteautofollowpattern import ( @@ -76,7 +77,8 @@ func NewDeleteAutoFollowPatternFunc(tp elastictransport.Interface) NewDeleteAuto } } -// Deletes auto-follow patterns. +// Delete auto-follow patterns. +// Delete a collection of cross-cluster replication auto-follow patterns. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html func New(tp elastictransport.Interface) *DeleteAutoFollowPattern { diff --git a/typedapi/ccr/deleteautofollowpattern/response.go b/typedapi/ccr/deleteautofollowpattern/response.go index e36b0887e0..b0d3c067f7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleteautofollowpattern // Response holds the response body struct for the package deleteautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/delete_auto_follow_pattern/DeleteAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/delete_auto_follow_pattern/DeleteAutoFollowPatternResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/follow/follow.go b/typedapi/ccr/follow/follow.go index 61e75acf3f..28c390a089 100644 --- a/typedapi/ccr/follow/follow.go +++ b/typedapi/ccr/follow/follow.go @@ -16,10 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a new follower index configured to follow the referenced leader -// index. +// 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. package follow import ( @@ -82,8 +85,11 @@ func NewFollowFunc(tp elastictransport.Interface) NewFollow { } } -// Creates a new follower index configured to follow the referenced leader -// index. +// Create a follower. +// Create a cross-cluster replication follower index that follows a specific +// leader index. +// When the API returns, the follower index exists and cross-cluster replication +// starts replicating operations from the leader index to the follower index. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html func New(tp elastictransport.Interface) *Follow { diff --git a/typedapi/ccr/follow/request.go b/typedapi/ccr/follow/request.go index 85f7321f8b..7c4f12af03 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package follow @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package follow // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/follow/CreateFollowIndexRequest.ts#L25-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/follow/CreateFollowIndexRequest.ts#L25-L54 type Request struct { LeaderIndex *string `json:"leader_index,omitempty"` MaxOutstandingReadRequests *int64 `json:"max_outstanding_read_requests,omitempty"` diff --git a/typedapi/ccr/follow/response.go b/typedapi/ccr/follow/response.go index 224aaa8be3..03153f5e3f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package follow // Response holds the response body struct for the package follow // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/follow/CreateFollowIndexResponse.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 01d302f872..cd63ccf7fc 100644 --- a/typedapi/ccr/followinfo/follow_info.go +++ b/typedapi/ccr/followinfo/follow_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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves information about all follower indices, including parameters and -// status for each follower 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. package followinfo import ( @@ -77,8 +79,10 @@ func NewFollowInfoFunc(tp elastictransport.Interface) NewFollowInfo { } } -// Retrieves information about all follower indices, including parameters and -// status for each follower 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/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html func New(tp elastictransport.Interface) *FollowInfo { diff --git a/typedapi/ccr/followinfo/response.go b/typedapi/ccr/followinfo/response.go index 5a5e9721e4..1dfa6b99f8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package followinfo @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package followinfo // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/follow_info/FollowInfoResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 c7b2ad94c2..c8e95ab5b8 100644 --- a/typedapi/ccr/followstats/follow_stats.go +++ b/typedapi/ccr/followstats/follow_stats.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves follower stats. return shard-level stats about the following tasks -// associated with each shard for the specified indices. +// 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. package followstats import ( @@ -77,8 +79,10 @@ func NewFollowStatsFunc(tp elastictransport.Interface) NewFollowStats { } } -// Retrieves follower stats. return shard-level stats about the following tasks -// associated with each shard for the specified indices. +// Get follower stats. +// Get cross-cluster replication follower stats. +// The API returns shard-level stats about the "following tasks" associated with +// each shard for the specified indices. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html func New(tp elastictransport.Interface) *FollowStats { diff --git a/typedapi/ccr/followstats/response.go b/typedapi/ccr/followstats/response.go index 0f68a1df21..aa6b10c6eb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package followstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package followstats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/follow_stats/FollowIndexStatsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/follow_stats/FollowIndexStatsResponse.ts#L22-L24 type Response struct { Indices []types.FollowIndexStats `json:"indices"` } diff --git a/typedapi/ccr/forgetfollower/forget_follower.go b/typedapi/ccr/forgetfollower/forget_follower.go index 3b139bc2a1..c3d99f6d19 100644 --- a/typedapi/ccr/forgetfollower/forget_follower.go +++ b/typedapi/ccr/forgetfollower/forget_follower.go @@ -16,9 +16,33 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Removes the follower retention leases from the leader. +// 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. package forgetfollower import ( @@ -81,7 +105,31 @@ func NewForgetFollowerFunc(tp elastictransport.Interface) NewForgetFollower { } } -// Removes the follower retention leases from the leader. +// Forget a follower. +// Remove the cross-cluster replication follower retention leases from the +// leader. +// +// A following index takes out retention leases on its leader index. +// These leases are used to increase the likelihood that the shards of the +// leader index retain the history of operations that the shards of the +// following index need to run replication. +// When a follower index is converted to a regular index by the unfollow API +// (either by directly calling the API or by index lifecycle management tasks), +// these leases are removed. +// However, removal of the leases can fail, for example when the remote cluster +// containing the leader index is unavailable. +// While the leases will eventually expire on their own, their extended +// existence can cause the leader index to hold more history than necessary and +// prevent index lifecycle management from performing some operations on the +// leader index. +// This API exists to enable manually removing the leases when the unfollow API +// is unable to do so. +// +// NOTE: This API does not stop replication by a following index. If you use +// this API with a follower index that is still actively following, the +// following index will add back retention leases on the leader. +// The only purpose of this API is to handle the case of failure to remove the +// following retention leases after the unfollow API is invoked. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html func New(tp elastictransport.Interface) *ForgetFollower { diff --git a/typedapi/ccr/forgetfollower/request.go b/typedapi/ccr/forgetfollower/request.go index 5539d78e1f..3767582ffd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package forgetfollower @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package forgetfollower // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/forget_follower/ForgetFollowerIndexRequest.ts#L23-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/forget_follower/ForgetFollowerIndexRequest.ts#L23-L51 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 3b95a47c1c..ae4d2dff4e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package forgetfollower @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package forgetfollower // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/forget_follower/ForgetFollowerIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 dfa4c2b555..bcd074216b 100644 --- a/typedapi/ccr/getautofollowpattern/get_auto_follow_pattern.go +++ b/typedapi/ccr/getautofollowpattern/get_auto_follow_pattern.go @@ -16,10 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Gets configured auto-follow patterns. Returns the specified auto-follow -// pattern collection. +// Get auto-follow patterns. +// Get cross-cluster replication auto-follow patterns. package getautofollowpattern import ( @@ -75,8 +75,8 @@ func NewGetAutoFollowPatternFunc(tp elastictransport.Interface) NewGetAutoFollow } } -// Gets configured auto-follow patterns. Returns the specified auto-follow -// pattern collection. +// Get auto-follow patterns. +// Get cross-cluster replication auto-follow patterns. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html func New(tp elastictransport.Interface) *GetAutoFollowPattern { diff --git a/typedapi/ccr/getautofollowpattern/response.go b/typedapi/ccr/getautofollowpattern/response.go index a9f2b0fc59..2cb21cc14b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getautofollowpattern @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/get_auto_follow_pattern/GetAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 9ae061f626..0f0b281626 100644 --- a/typedapi/ccr/pauseautofollowpattern/pause_auto_follow_pattern.go +++ b/typedapi/ccr/pauseautofollowpattern/pause_auto_follow_pattern.go @@ -16,9 +16,20 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Pauses an auto-follow pattern +// 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. package pauseautofollowpattern import ( @@ -76,7 +87,18 @@ func NewPauseAutoFollowPatternFunc(tp elastictransport.Interface) NewPauseAutoFo } } -// Pauses an auto-follow pattern +// Pause an auto-follow pattern. +// Pause a cross-cluster replication auto-follow pattern. +// When the API returns, the auto-follow pattern is inactive. +// New indices that are created on the remote cluster and match the auto-follow +// patterns are ignored. +// +// You can resume auto-following with the resume auto-follow pattern API. +// When it resumes, the auto-follow pattern is active again and automatically +// configures follower indices for newly created indices on the remote cluster +// that match its patterns. +// Remote indices that were created while the pattern was paused will also be +// followed, unless they have been deleted or closed in the interim. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html func New(tp elastictransport.Interface) *PauseAutoFollowPattern { diff --git a/typedapi/ccr/pauseautofollowpattern/response.go b/typedapi/ccr/pauseautofollowpattern/response.go index 2887379cb9..a308c1efe7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package pauseautofollowpattern // Response holds the response body struct for the package pauseautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/pause_auto_follow_pattern/PauseAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/pause_auto_follow_pattern/PauseAutoFollowPatternResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/pausefollow/pause_follow.go b/typedapi/ccr/pausefollow/pause_follow.go index 3acc62d252..e90a277d63 100644 --- a/typedapi/ccr/pausefollow/pause_follow.go +++ b/typedapi/ccr/pausefollow/pause_follow.go @@ -16,10 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Pauses a follower index. The follower index will not fetch any additional -// operations from the leader index. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package pausefollow import ( @@ -77,8 +82,13 @@ func NewPauseFollowFunc(tp elastictransport.Interface) NewPauseFollow { } } -// Pauses a follower index. The follower index will not fetch any additional -// operations from the leader index. +// Pause a follower. +// Pause a cross-cluster replication follower index. +// The follower index will not fetch any additional operations from the leader +// index. +// You can resume following with the resume follower API. +// You can pause and resume a follower index to change the configuration of the +// following task. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html func New(tp elastictransport.Interface) *PauseFollow { diff --git a/typedapi/ccr/pausefollow/response.go b/typedapi/ccr/pausefollow/response.go index 68f56d7081..644d053bac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package pausefollow // Response holds the response body struct for the package pausefollow // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/pause_follow/PauseFollowIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/pause_follow/PauseFollowIndexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go b/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go index dd78a102ce..59102d605a 100644 --- a/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go +++ b/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go @@ -16,11 +16,20 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Creates a new named collection of auto-follow patterns against a specified -// remote cluster. Newly created indices on the remote cluster matching any of -// the specified patterns will be automatically configured as follower indices. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package putautofollowpattern import ( @@ -83,9 +92,18 @@ func NewPutAutoFollowPatternFunc(tp elastictransport.Interface) NewPutAutoFollow } } -// Creates a new named collection of auto-follow patterns against a specified -// remote cluster. Newly created indices on the remote cluster matching any of -// the specified patterns will be automatically configured as follower indices. +// Create or update auto-follow patterns. +// Create a collection of cross-cluster replication auto-follow patterns for a +// remote cluster. +// Newly created indices on the remote cluster that match any of the patterns +// are automatically configured as follower indices. +// Indices on the remote cluster that were created before the auto-follow +// pattern was created will not be auto-followed even if they match the pattern. +// +// This API can also be used to update auto-follow patterns. +// NOTE: Follower indices that were configured automatically before updating an +// auto-follow pattern will remain unchanged even if they do not match against +// the new patterns. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html func New(tp elastictransport.Interface) *PutAutoFollowPattern { diff --git a/typedapi/ccr/putautofollowpattern/request.go b/typedapi/ccr/putautofollowpattern/request.go index 49c2020431..837dd92dd0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putautofollowpattern @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternRequest.ts#L27-L112 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternRequest.ts#L27-L120 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 7a1b58e892..5d09242039 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putautofollowpattern // Response holds the response body struct for the package putautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/resumeautofollowpattern/response.go b/typedapi/ccr/resumeautofollowpattern/response.go index 866c7df925..c3d0612e78 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package resumeautofollowpattern // Response holds the response body struct for the package resumeautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/resume_auto_follow_pattern/ResumeAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/resume_auto_follow_pattern/ResumeAutoFollowPatternResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go b/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go index 66ad35c709..99c05f5825 100644 --- a/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go +++ b/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go @@ -16,9 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Resumes an auto-follow pattern that has been paused +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package resumeautofollowpattern import ( @@ -76,7 +81,12 @@ func NewResumeAutoFollowPatternFunc(tp elastictransport.Interface) NewResumeAuto } } -// Resumes an auto-follow pattern that has been paused +// Resume an auto-follow pattern. +// Resume a cross-cluster replication auto-follow pattern that was paused. +// The auto-follow pattern will resume configuring following indices for newly +// created indices that match its patterns on the remote cluster. +// Remote indices created while the pattern was paused will also be followed +// unless they have been deleted or closed in the interim. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html func New(tp elastictransport.Interface) *ResumeAutoFollowPattern { diff --git a/typedapi/ccr/resumefollow/request.go b/typedapi/ccr/resumefollow/request.go index a4826d0627..1b175155b6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package resumefollow @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package resumefollow // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/resume_follow/ResumeFollowIndexRequest.ts#L25-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/resume_follow/ResumeFollowIndexRequest.ts#L25-L52 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 7512c2946d..e60432f7f0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package resumefollow // Response holds the response body struct for the package resumefollow // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/resume_follow/ResumeFollowIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/resume_follow/ResumeFollowIndexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/resumefollow/resume_follow.go b/typedapi/ccr/resumefollow/resume_follow.go index 62644ea50d..576321aafd 100644 --- a/typedapi/ccr/resumefollow/resume_follow.go +++ b/typedapi/ccr/resumefollow/resume_follow.go @@ -16,9 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Resumes a follower index that has been paused +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package resumefollow import ( @@ -81,7 +87,13 @@ func NewResumeFollowFunc(tp elastictransport.Interface) NewResumeFollow { } } -// Resumes a follower index that has been paused +// Resume a follower. +// Resume a cross-cluster replication follower index that was paused. +// The follower index could have been paused with the pause follower API. +// Alternatively it could be paused due to replication that cannot be retried +// due to failures during following tasks. +// When this API returns, the follower index will resume fetching operations +// from the leader index. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html func New(tp elastictransport.Interface) *ResumeFollow { diff --git a/typedapi/ccr/stats/response.go b/typedapi/ccr/stats/response.go index 52d62c2719..0be916424b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/stats/CcrStatsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/stats/CcrStatsResponse.ts#L22-L27 type Response struct { AutoFollowStats types.AutoFollowStats `json:"auto_follow_stats"` FollowStats types.FollowStats `json:"follow_stats"` diff --git a/typedapi/ccr/stats/stats.go b/typedapi/ccr/stats/stats.go index 7b4bba3e38..a1fce60b61 100644 --- a/typedapi/ccr/stats/stats.go +++ b/typedapi/ccr/stats/stats.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Gets all stats related to cross-cluster replication. +// Get cross-cluster replication stats. +// This API returns stats about auto-following and the same shard-level stats as +// the get follower stats API. package stats import ( @@ -68,7 +70,9 @@ func NewStatsFunc(tp elastictransport.Interface) NewStats { } } -// Gets all stats related to cross-cluster replication. +// Get cross-cluster replication stats. +// This API returns stats about auto-following and the same shard-level stats as +// the get follower stats API. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html func New(tp elastictransport.Interface) *Stats { diff --git a/typedapi/ccr/unfollow/response.go b/typedapi/ccr/unfollow/response.go index be1cf34272..76b245d1ed 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package unfollow // Response holds the response body struct for the package unfollow // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/unfollow/UnfollowIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/unfollow/UnfollowIndexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/unfollow/unfollow.go b/typedapi/ccr/unfollow/unfollow.go index 5992ab72f5..05e7723c67 100644 --- a/typedapi/ccr/unfollow/unfollow.go +++ b/typedapi/ccr/unfollow/unfollow.go @@ -16,10 +16,18 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Stops the following task associated with a follower index and removes index -// metadata and settings associated with cross-cluster replication. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. +// +// NOTE: 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. package unfollow import ( @@ -77,8 +85,16 @@ func NewUnfollowFunc(tp elastictransport.Interface) NewUnfollow { } } -// Stops the following task associated with a follower index and removes index -// metadata and settings associated with cross-cluster replication. +// 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. +// +// NOTE: Currently cross-cluster replication does not support converting an +// existing regular index to a follower index. Converting a follower index to a +// regular index is an irreversible operation. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html func New(tp elastictransport.Interface) *Unfollow { diff --git a/typedapi/cluster/allocationexplain/allocation_explain.go b/typedapi/cluster/allocationexplain/allocation_explain.go index 009f67067e..6dbc0f597e 100644 --- a/typedapi/cluster/allocationexplain/allocation_explain.go +++ b/typedapi/cluster/allocationexplain/allocation_explain.go @@ -16,9 +16,18 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Provides explanations for shard allocations in the cluster. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package allocationexplain import ( @@ -73,7 +82,16 @@ func NewAllocationExplainFunc(tp elastictransport.Interface) NewAllocationExplai } } -// Provides explanations for shard allocations in the cluster. +// Explain the shard allocations. +// Get explanations for shard allocations in the cluster. +// For unassigned shards, it provides an explanation for why the shard is +// unassigned. +// For assigned shards, it provides an explanation for why the shard is +// remaining on its current node and has not moved or rebalanced to another +// node. +// This API can be very useful when attempting to diagnose why a shard is +// unassigned or why a shard continues to remain on its current node when you +// might expect otherwise. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html func New(tp elastictransport.Interface) *AllocationExplain { diff --git a/typedapi/cluster/allocationexplain/request.go b/typedapi/cluster/allocationexplain/request.go index 2288681e37..cab86e197b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package allocationexplain @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package allocationexplain // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts#L24-L61 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts#L24-L66 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 0e35aa0f98..6f7f993ee6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package allocationexplain @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package allocationexplain // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/ClusterAllocationExplainResponse.ts#L32-L64 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 db6a95466c..9828543b3c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete component templates. // Deletes component templates. diff --git a/typedapi/cluster/deletecomponenttemplate/response.go b/typedapi/cluster/deletecomponenttemplate/response.go index a961c7dcab..61dc5ecf9d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletecomponenttemplate // Response holds the response body struct for the package deletecomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/delete_component_template/ClusterDeleteComponentTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/delete_component_template/ClusterDeleteComponentTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go b/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go index 088b777919..e2de44241e 100644 --- a/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go +++ b/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Clears cluster voting config exclusions. +// Clear cluster voting config exclusions. +// Remove master-eligible nodes from the voting configuration exclusion list. package deletevotingconfigexclusions import ( @@ -66,7 +67,8 @@ func NewDeleteVotingConfigExclusionsFunc(tp elastictransport.Interface) NewDelet } } -// Clears cluster voting config exclusions. +// Clear cluster voting config exclusions. +// Remove master-eligible nodes from the voting configuration exclusion list. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html func New(tp elastictransport.Interface) *DeleteVotingConfigExclusions { diff --git a/typedapi/cluster/existscomponenttemplate/exists_component_template.go b/typedapi/cluster/existscomponenttemplate/exists_component_template.go index fc0940c052..00e1957df6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Check component templates. // Returns information about whether a particular component template exists. diff --git a/typedapi/cluster/getcomponenttemplate/get_component_template.go b/typedapi/cluster/getcomponenttemplate/get_component_template.go index 885e4427ab..1a5e47dd48 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get component templates. // Retrieves information about component templates. diff --git a/typedapi/cluster/getcomponenttemplate/response.go b/typedapi/cluster/getcomponenttemplate/response.go index 5b68a97818..81d64a9486 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getcomponenttemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/get_component_template/ClusterGetComponentTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 a805b56e77..f845c28dbf 100644 --- a/typedapi/cluster/getsettings/get_settings.go +++ b/typedapi/cluster/getsettings/get_settings.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns cluster-wide settings. +// Get cluster-wide settings. // By default, it returns only settings that have been explicitly defined. package getsettings @@ -69,7 +69,7 @@ func NewGetSettingsFunc(tp elastictransport.Interface) NewGetSettings { } } -// Returns cluster-wide settings. +// Get cluster-wide settings. // By default, it returns only settings that have been explicitly defined. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-get-settings.html diff --git a/typedapi/cluster/getsettings/response.go b/typedapi/cluster/getsettings/response.go index c4224ec56f..c38679a07c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/get_settings/ClusterGetSettingsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/get_settings/ClusterGetSettingsResponse.ts#L23-L29 type Response struct { Defaults map[string]json.RawMessage `json:"defaults,omitempty"` Persistent map[string]json.RawMessage `json:"persistent"` diff --git a/typedapi/cluster/health/health.go b/typedapi/cluster/health/health.go index 0c38f0c158..f8def429a2 100644 --- a/typedapi/cluster/health/health.go +++ b/typedapi/cluster/health/health.go @@ -16,18 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// The cluster health API returns a simple status on the health of the cluster. +// 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, and -// green means that all shards are allocated. The index level status is -// controlled by the worst shard status. The cluster status is controlled by the -// worst index status. +// 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. package health import ( @@ -88,16 +93,21 @@ func NewHealthFunc(tp elastictransport.Interface) NewHealth { } } -// The cluster health API returns a simple status on the health of the cluster. +// 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, and -// green means that all shards are allocated. The index level status is -// controlled by the worst shard status. The cluster status is controlled by the -// worst index status. +// streams and indices. +// For data streams, the API retrieves the health status of the stream’s backing +// indices. +// +// The cluster health status is: green, yellow or red. +// On the shard level, a red status indicates that the specific shard is not +// allocated in the cluster. Yellow means that the primary shard is allocated +// but replicas are not. Green means that all shards are allocated. +// The index level status is controlled by the worst shard status. +// +// One of the main benefits of the API is the ability to wait until the cluster +// reaches a certain high watermark health level. +// The cluster status is controlled by the worst index status. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html func New(tp elastictransport.Interface) *Health { diff --git a/typedapi/cluster/health/response.go b/typedapi/cluster/health/response.go index 4dd5ca18ee..5f275d8fab 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package health @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package health // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/health/ClusterHealthResponse.ts#L26-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/health/ClusterHealthResponse.ts#L26-L37 type Response struct { // ActivePrimaryShards The number of active primary shards. @@ -63,6 +63,8 @@ type Response struct { // TimedOut If false the response returned within the period of time that is specified by // the timeout parameter (30s by default) TimedOut bool `json:"timed_out"` + // UnassignedPrimaryShards The number of primary shards that are not allocated. + UnassignedPrimaryShards int `json:"unassigned_primary_shards"` // UnassignedShards The number of shards that are not allocated. UnassignedShards int `json:"unassigned_shards"` } diff --git a/typedapi/cluster/info/info.go b/typedapi/cluster/info/info.go index 4582d2f04d..9560e90f17 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get cluster info. // Returns basic information about the cluster. diff --git a/typedapi/cluster/info/response.go b/typedapi/cluster/info/response.go index 2b29a75125..b3c20d64e2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/info/ClusterInfoResponse.ts#L26-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ec2e5b2251..ad27e54bf4 100644 --- a/typedapi/cluster/pendingtasks/pending_tasks.go +++ b/typedapi/cluster/pendingtasks/pending_tasks.go @@ -16,12 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns cluster-level changes (such as create index, update mapping, allocate -// or fail shard) that have not yet been executed. +// 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 +// 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 @@ -76,10 +78,12 @@ func NewPendingTasksFunc(tp elastictransport.Interface) NewPendingTasks { } } -// Returns cluster-level changes (such as create index, update mapping, allocate -// or fail shard) that have not yet been executed. +// 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 +// 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 diff --git a/typedapi/cluster/pendingtasks/response.go b/typedapi/cluster/pendingtasks/response.go index 947e531ac8..fecc963ef9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package pendingtasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package pendingtasks // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/pending_tasks/ClusterPendingTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 5da0908aa1..7bf80e296b 100644 --- a/typedapi/cluster/postvotingconfigexclusions/post_voting_config_exclusions.go +++ b/typedapi/cluster/postvotingconfigexclusions/post_voting_config_exclusions.go @@ -16,9 +16,47 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Updates the cluster voting config exclusions by node ids or node names. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package postvotingconfigexclusions import ( @@ -66,7 +104,45 @@ func NewPostVotingConfigExclusionsFunc(tp elastictransport.Interface) NewPostVot } } -// Updates the cluster voting config exclusions by node ids or node names. +// 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/guide/en/elasticsearch/reference/current/voting-config-exclusions.html func New(tp elastictransport.Interface) *PostVotingConfigExclusions { diff --git a/typedapi/cluster/putcomponenttemplate/put_component_template.go b/typedapi/cluster/putcomponenttemplate/put_component_template.go index 77a739e5c8..32f1081325 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create or update a component template. // Creates or updates a component template. @@ -352,7 +352,7 @@ func (r *PutComponentTemplate) Header(key, value string) *PutComponentTemplate { // Name Name of the component template to create. // Elasticsearch includes the following built-in component templates: -// `logs-mappings`; 'logs-settings`; `metrics-mappings`; +// `logs-mappings`; `logs-settings`; `metrics-mappings`; // `metrics-settings`;`synthetics-mapping`; `synthetics-settings`. // Elastic Agent uses these templates to configure backing indices for its data // streams. diff --git a/typedapi/cluster/putcomponenttemplate/request.go b/typedapi/cluster/putcomponenttemplate/request.go index cb466532a4..7341f68564 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putcomponenttemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L94 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L95 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 fa896d7b0b..2abdf89555 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putcomponenttemplate // Response holds the response body struct for the package putcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/put_component_template/ClusterPutComponentTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/put_component_template/ClusterPutComponentTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/cluster/putsettings/put_settings.go b/typedapi/cluster/putsettings/put_settings.go index 9990c33eff..4463b1653c 100644 --- a/typedapi/cluster/putsettings/put_settings.go +++ b/typedapi/cluster/putsettings/put_settings.go @@ -16,9 +16,40 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the cluster settings. +// 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. package putsettings import ( @@ -73,7 +104,38 @@ func NewPutSettingsFunc(tp elastictransport.Interface) NewPutSettings { } } -// Updates the cluster settings. +// Update the cluster settings. +// Configure and update dynamic settings on a running cluster. +// You can also configure dynamic settings locally on an unstarted or shut down +// node in `elasticsearch.yml`. +// +// Updates made with this API can be persistent, which apply across cluster +// restarts, or transient, which reset after a cluster restart. +// You can also reset transient or persistent settings by assigning them a null +// value. +// +// If you configure the same setting using multiple methods, Elasticsearch +// applies the settings in following order of precedence: 1) Transient setting; +// 2) Persistent setting; 3) `elasticsearch.yml` setting; 4) Default setting +// value. +// For example, you can apply a transient setting to override a persistent +// setting or `elasticsearch.yml` setting. +// However, a change to an `elasticsearch.yml` setting will not override a +// defined transient or persistent setting. +// +// TIP: In Elastic Cloud, use the user settings feature to configure all cluster +// settings. This method automatically rejects unsafe settings that could break +// your cluster. +// If you run Elasticsearch on your own hardware, use this API to configure +// dynamic cluster settings. +// Only use `elasticsearch.yml` for static cluster settings and node settings. +// The API doesn’t require a restart and ensures a setting’s value is the same +// on all nodes. +// +// WARNING: Transient cluster settings are no longer recommended. Use persistent +// cluster settings instead. +// If a cluster becomes unstable, transient settings can clear unexpectedly, +// resulting in a potentially undesired cluster configuration. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html func New(tp elastictransport.Interface) *PutSettings { diff --git a/typedapi/cluster/putsettings/request.go b/typedapi/cluster/putsettings/request.go index d04547d6bc..5aafd74114 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putsettings @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/put_settings/ClusterPutSettingsRequest.ts#L25-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/put_settings/ClusterPutSettingsRequest.ts#L25-L61 type Request struct { Persistent map[string]json.RawMessage `json:"persistent,omitempty"` Transient map[string]json.RawMessage `json:"transient,omitempty"` diff --git a/typedapi/cluster/putsettings/response.go b/typedapi/cluster/putsettings/response.go index 236c911570..b9e180144c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/put_settings/ClusterPutSettingsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 af64ba0fea..074acec1fa 100644 --- a/typedapi/cluster/remoteinfo/remote_info.go +++ b/typedapi/cluster/remoteinfo/remote_info.go @@ -16,11 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// The cluster remote info API allows you to retrieve all of the configured -// remote cluster information. It returns connection and endpoint information -// keyed by the configured remote cluster alias. +// Get remote cluster information. +// Get all of the configured remote cluster information. +// This API returns connection and endpoint information keyed by the configured +// remote cluster alias. package remoteinfo import ( @@ -70,9 +71,10 @@ func NewRemoteInfoFunc(tp elastictransport.Interface) NewRemoteInfo { } } -// The cluster remote info API allows you to retrieve all of the configured -// remote cluster information. It returns connection and endpoint information -// keyed by the configured remote cluster alias. +// Get remote cluster information. +// Get all of the configured remote cluster information. +// This API returns connection and endpoint information keyed by the configured +// remote cluster alias. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-remote-info.html func New(tp elastictransport.Interface) *RemoteInfo { diff --git a/typedapi/cluster/remoteinfo/response.go b/typedapi/cluster/remoteinfo/response.go index b83cda543c..f189cd2c19 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package remoteinfo @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package remoteinfo // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 be7cdb669d..c37012a5cf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package reroute @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package reroute // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/reroute/ClusterRerouteRequest.ts#L25-L70 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/reroute/ClusterRerouteRequest.ts#L25-L85 type Request struct { // Commands Defines the commands to perform. diff --git a/typedapi/cluster/reroute/reroute.go b/typedapi/cluster/reroute/reroute.go index 4de201cafb..0f505d13cc 100644 --- a/typedapi/cluster/reroute/reroute.go +++ b/typedapi/cluster/reroute/reroute.go @@ -16,9 +16,37 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Allows to manually change the allocation of individual shards in the cluster. +// 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. package reroute import ( @@ -73,7 +101,35 @@ func NewRerouteFunc(tp elastictransport.Interface) NewReroute { } } -// Allows to manually change the allocation of individual shards in the cluster. +// Reroute the cluster. +// Manually change the allocation of individual shards in the cluster. +// For example, a shard can be moved from one node to another explicitly, an +// allocation can be canceled, and an unassigned shard can be explicitly +// allocated to a specific node. +// +// It is important to note that after processing any reroute commands +// Elasticsearch will perform rebalancing as normal (respecting the values of +// settings such as `cluster.routing.rebalance.enable`) in order to remain in a +// balanced state. +// For example, if the requested allocation includes moving a shard from node1 +// to node2 then this may cause a shard to be moved from node2 back to node1 to +// even things out. +// +// The cluster can be set to disable allocations using the +// `cluster.routing.allocation.enable` setting. +// If allocations are disabled then the only allocations that will be performed +// are explicit ones given using the reroute command, and consequent allocations +// due to rebalancing. +// +// The cluster will attempt to allocate a shard a maximum of +// `index.allocation.max_retries` times in a row (defaults to `5`), before +// giving up and leaving the shard unallocated. +// This scenario can be caused by structural problems such as having an analyzer +// which refers to a stopwords file which doesn’t exist on all nodes. +// +// Once the problem has been corrected, allocation can be manually retried by +// calling the reroute API with the `?retry_failed` URI query parameter, which +// will attempt a single retry round for these shards. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html func New(tp elastictransport.Interface) *Reroute { @@ -292,8 +348,11 @@ func (r *Reroute) Header(key, value string) *Reroute { return r } -// DryRun If true, then the request simulates the operation only and returns the -// resulting state. +// DryRun If true, then the request simulates the operation. +// It will calculate the result of applying the commands to the current cluster +// state and return the resulting cluster state after the commands (and +// rebalancing) have been applied; it will not actually perform the requested +// changes. // API name: dry_run func (r *Reroute) DryRun(dryrun bool) *Reroute { r.values.Set("dry_run", strconv.FormatBool(dryrun)) @@ -302,7 +361,7 @@ func (r *Reroute) DryRun(dryrun bool) *Reroute { } // Explain If true, then the response contains an explanation of why the commands can or -// cannot be executed. +// cannot run. // API name: explain func (r *Reroute) Explain(explain bool) *Reroute { r.values.Set("explain", strconv.FormatBool(explain)) diff --git a/typedapi/cluster/reroute/response.go b/typedapi/cluster/reroute/response.go index efdd1de7cf..23971f37c3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package reroute @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package reroute // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/reroute/ClusterRerouteResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d0d26f5060..5db21668a3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package state @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package state // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/state/ClusterStateResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/state/ClusterStateResponse.ts#L22-L29 type Response = json.RawMessage diff --git a/typedapi/cluster/state/state.go b/typedapi/cluster/state/state.go index 72bd665f0a..9ec0c1b913 100644 --- a/typedapi/cluster/state/state.go +++ b/typedapi/cluster/state/state.go @@ -16,9 +16,40 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns a comprehensive information about the state of the cluster. +// 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. package state import ( @@ -78,7 +109,38 @@ func NewStateFunc(tp elastictransport.Interface) NewState { } } -// Returns a comprehensive information about the state of the cluster. +// Get the cluster state. +// Get comprehensive information about the state of the cluster. +// +// The cluster state is an internal data structure which keeps track of a +// variety of information needed by every node, including the identity and +// attributes of the other nodes in the cluster; cluster-wide settings; index +// metadata, including the mapping and settings for each index; the location and +// status of every shard copy in the cluster. +// +// The elected master node ensures that every node in the cluster has a copy of +// the same cluster state. +// This API lets you retrieve a representation of this internal state for +// debugging or diagnostic purposes. +// You may need to consult the Elasticsearch source code to determine the +// precise meaning of the response. +// +// By default the API will route requests to the elected master node since this +// node is the authoritative source of cluster states. +// You can also retrieve the cluster state held on the node handling the API +// request by adding the `?local=true` query parameter. +// +// Elasticsearch may need to expend significant effort to compute a response to +// this API in larger clusters, and the response may comprise a very large +// quantity of data. +// If you use this API repeatedly, your cluster may become unstable. +// +// WARNING: The response is a representation of an internal data structure. +// Its format is not subject to the same compatibility guarantees as other more +// stable APIs and may change from version to version. +// Do not query this API using external monitoring tools. +// Instead, obtain the information you require using other more stable cluster +// APIs. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html func New(tp elastictransport.Interface) *State { diff --git a/typedapi/cluster/stats/response.go b/typedapi/cluster/stats/response.go index 728e8a1d7f..260d21e75c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stats @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/ClusterStatsResponse.ts#L53-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/ClusterStatsResponse.ts#L53-L55 type Response struct { // ClusterName Name of the cluster, based on the cluster name setting. diff --git a/typedapi/cluster/stats/stats.go b/typedapi/cluster/stats/stats.go index 13335e3891..0890e26ba9 100644 --- a/typedapi/cluster/stats/stats.go +++ b/typedapi/cluster/stats/stats.go @@ -16,10 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns cluster statistics. -// It returns basic index metrics (shard numbers, store size, memory usage) and +// 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). package stats @@ -77,8 +77,8 @@ func NewStatsFunc(tp elastictransport.Interface) NewStats { } } -// Returns cluster statistics. -// It returns basic index metrics (shard numbers, store size, memory usage) and +// 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). // @@ -313,10 +313,10 @@ func (r *Stats) NodeId(nodeid string) *Stats { return r } -// FlatSettings If `true`, returns settings in flat format. -// API name: flat_settings -func (r *Stats) FlatSettings(flatsettings bool) *Stats { - r.values.Set("flat_settings", strconv.FormatBool(flatsettings)) +// IncludeRemotes Include remote cluster data into the response +// API name: include_remotes +func (r *Stats) IncludeRemotes(includeremotes bool) *Stats { + r.values.Set("include_remotes", strconv.FormatBool(includeremotes)) return r } diff --git a/typedapi/connector/checkin/check_in.go b/typedapi/connector/checkin/check_in.go index f3f10a66f4..bfa6868d70 100644 --- a/typedapi/connector/checkin/check_in.go +++ b/typedapi/connector/checkin/check_in.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the last_seen field in the connector, and sets it to current -// timestamp +// Check in a connector. +// +// Update the `last_seen` field in the connector and set it to the current +// timestamp. package checkin import ( @@ -77,8 +79,10 @@ func NewCheckInFunc(tp elastictransport.Interface) NewCheckIn { } } -// Updates the last_seen field in the connector, and sets it to current -// timestamp +// Check in a connector. +// +// Update the `last_seen` field in the connector and set it to the current +// timestamp. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-api.html func New(tp elastictransport.Interface) *CheckIn { diff --git a/typedapi/connector/checkin/response.go b/typedapi/connector/checkin/response.go index 033157edae..ee43ef1ce3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package checkin @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package checkin // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/check_in/ConnectorCheckInResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 6fb57a18ff..efd159f2ce 100644 --- a/typedapi/connector/delete/delete.go +++ b/typedapi/connector/delete/delete.go @@ -16,9 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes a connector. +// 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. package delete import ( @@ -76,7 +82,13 @@ func NewDeleteFunc(tp elastictransport.Interface) NewDelete { } } -// Deletes a connector. +// Delete a connector. +// +// Removes a connector and associated sync jobs. +// This is a destructive action that is not recoverable. +// NOTE: This action doesn’t delete any API keys, ingest pipelines, or data +// indices associated with the connector. +// These need to be removed manually. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-api.html func New(tp elastictransport.Interface) *Delete { diff --git a/typedapi/connector/delete/response.go b/typedapi/connector/delete/response.go index d336937769..f4ae96309b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/delete/ConnectorDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/delete/ConnectorDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/connector/get/get.go b/typedapi/connector/get/get.go index 6083207b4e..5685a2a67c 100644 --- a/typedapi/connector/get/get.go +++ b/typedapi/connector/get/get.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves a connector. +// Get a connector. +// +// Get the details about a connector. package get import ( @@ -76,7 +78,9 @@ func NewGetFunc(tp elastictransport.Interface) NewGet { } } -// Retrieves a connector. +// Get a connector. +// +// Get the details about a connector. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-api.html func New(tp elastictransport.Interface) *Get { diff --git a/typedapi/connector/get/response.go b/typedapi/connector/get/response.go index acb90b31a9..a3c6fbf087 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package get @@ -35,7 +35,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/get/ConnectorGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/get/ConnectorGetResponse.ts#L22-L24 type Response struct { ApiKeyId *string `json:"api_key_id,omitempty"` ApiKeySecretId *string `json:"api_key_secret_id,omitempty"` diff --git a/typedapi/connector/lastsync/last_sync.go b/typedapi/connector/lastsync/last_sync.go index cd6888cef1..90b58a3c46 100644 --- a/typedapi/connector/lastsync/last_sync.go +++ b/typedapi/connector/lastsync/last_sync.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates last sync stats in the connector document +// 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. package lastsync import ( @@ -82,7 +85,10 @@ func NewLastSyncFunc(tp elastictransport.Interface) NewLastSync { } } -// Updates last sync stats in the connector document +// Update the connector last sync stats. +// +// Update the fields related to the last sync of a connector. +// This action is used for analytics and monitoring. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-last-sync-api.html func New(tp elastictransport.Interface) *LastSync { diff --git a/typedapi/connector/lastsync/request.go b/typedapi/connector/lastsync/request.go index 7996a4d5de..fa43d8c9c7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package lastsync @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package lastsync // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L26-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L26-L60 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 ef854eaf93..4ed9d1bdc4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package lastsync @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package lastsync // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/last_sync/ConnectorUpdateLastSyncResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 79af582f01..fd362dd734 100644 --- a/typedapi/connector/list/list.go +++ b/typedapi/connector/list/list.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns existing connectors. +// Get all connectors. +// +// Get information about all connectors. package list import ( @@ -68,7 +70,9 @@ func NewListFunc(tp elastictransport.Interface) NewList { } } -// Returns existing connectors. +// Get all connectors. +// +// Get information about all connectors. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-api.html func New(tp elastictransport.Interface) *List { diff --git a/typedapi/connector/list/response.go b/typedapi/connector/list/response.go index a7da6d2845..f7bc006b65 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package list @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/list/ConnectorListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e356a03384..b3c5285fe5 100644 --- a/typedapi/connector/post/post.go +++ b/typedapi/connector/post/post.go @@ -16,9 +16,17 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a connector. +// 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. package post import ( @@ -73,7 +81,15 @@ func NewPostFunc(tp elastictransport.Interface) NewPost { } } -// Creates a connector. +// Create a connector. +// +// Connectors are Elasticsearch integrations that bring content from third-party +// data sources, which can be deployed on Elastic Cloud or hosted on your own +// infrastructure. +// Elastic managed connectors (Native connectors) are a managed service on +// Elastic Cloud. +// Self-managed connectors (Connector clients) are self-managed on your +// infrastructure. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html func New(tp elastictransport.Interface) *Post { diff --git a/typedapi/connector/post/request.go b/typedapi/connector/post/request.go index b53c926e3e..c9410a6dff 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package post @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/post/ConnectorPostRequest.ts#L22-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/post/ConnectorPostRequest.ts#L22-L46 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 c1d202b2c7..d1e96f7e63 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package post @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/post/ConnectorPostResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f49bb3c212..1449764cab 100644 --- a/typedapi/connector/put/put.go +++ b/typedapi/connector/put/put.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates or updates a connector. +// Create or update a connector. package put import ( @@ -79,7 +79,7 @@ func NewPutFunc(tp elastictransport.Interface) NewPut { } } -// Creates or updates a connector. +// Create or update a connector. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html func New(tp elastictransport.Interface) *Put { diff --git a/typedapi/connector/put/request.go b/typedapi/connector/put/request.go index 5345bf652f..5fa7f70ce7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package put @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/put/ConnectorPutRequest.ts#L22-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/put/ConnectorPutRequest.ts#L22-L48 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 f89b03661c..93b64784b4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package put @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/put/ConnectorPutResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 b72f8696c5..7134d71ff9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Creates a secret for a Connector. package secretpost diff --git a/typedapi/connector/syncjobcancel/response.go b/typedapi/connector/syncjobcancel/response.go index 6e69300995..b0781da3c1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package syncjobcancel @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package syncjobcancel // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/sync_job_cancel/SyncJobCancelResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 0eba100d15..d1f540377f 100644 --- a/typedapi/connector/syncjobcancel/sync_job_cancel.go +++ b/typedapi/connector/syncjobcancel/sync_job_cancel.go @@ -16,9 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Cancels a connector sync job. +// 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. package syncjobcancel import ( @@ -76,7 +81,12 @@ func NewSyncJobCancelFunc(tp elastictransport.Interface) NewSyncJobCancel { } } -// Cancels a connector sync job. +// Cancel a connector sync job. +// +// Cancel a connector sync job, which sets the status to cancelling and updates +// `cancellation_requested_at` to the current time. +// The connector service is then responsible for setting the status of connector +// sync jobs to cancelled. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cancel-connector-sync-job-api.html func New(tp elastictransport.Interface) *SyncJobCancel { diff --git a/typedapi/connector/syncjobdelete/response.go b/typedapi/connector/syncjobdelete/response.go index eff1c4ab26..277490ac12 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package syncjobdelete // Response holds the response body struct for the package syncjobdelete // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/connector/syncjobdelete/sync_job_delete.go b/typedapi/connector/syncjobdelete/sync_job_delete.go index 7b31154493..8c4c75bd59 100644 --- a/typedapi/connector/syncjobdelete/sync_job_delete.go +++ b/typedapi/connector/syncjobdelete/sync_job_delete.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes a connector sync job. +// Delete a connector sync job. +// +// Remove a connector sync job and its associated data. +// This is a destructive action that is not recoverable. package syncjobdelete import ( @@ -76,7 +79,10 @@ func NewSyncJobDeleteFunc(tp elastictransport.Interface) NewSyncJobDelete { } } -// Deletes a connector sync job. +// Delete a connector sync job. +// +// Remove a connector sync job and its associated data. +// This is a destructive action that is not recoverable. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-sync-job-api.html func New(tp elastictransport.Interface) *SyncJobDelete { diff --git a/typedapi/connector/syncjobget/response.go b/typedapi/connector/syncjobget/response.go index dedc920e03..4b3fef79ce 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package syncjobget @@ -36,7 +36,7 @@ import ( // Response holds the response body struct for the package syncjobget // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/sync_job_get/SyncJobGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/sync_job_get/SyncJobGetResponse.ts#L22-L24 type Response struct { CancelationRequestedAt types.DateTime `json:"cancelation_requested_at,omitempty"` CanceledAt types.DateTime `json:"canceled_at,omitempty"` diff --git a/typedapi/connector/syncjobget/sync_job_get.go b/typedapi/connector/syncjobget/sync_job_get.go index a0afe0a5bb..595998afe1 100644 --- a/typedapi/connector/syncjobget/sync_job_get.go +++ b/typedapi/connector/syncjobget/sync_job_get.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves a connector sync job. +// Get a connector sync job. package syncjobget import ( @@ -76,7 +76,7 @@ func NewSyncJobGetFunc(tp elastictransport.Interface) NewSyncJobGet { } } -// Retrieves a connector sync job. +// Get a connector sync job. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-sync-job-api.html func New(tp elastictransport.Interface) *SyncJobGet { diff --git a/typedapi/connector/syncjoblist/response.go b/typedapi/connector/syncjoblist/response.go index 6640453965..6be1f18a09 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package syncjoblist @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package syncjoblist // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/sync_job_list/SyncJobListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4276279e0c..e2aef0dc6d 100644 --- a/typedapi/connector/syncjoblist/sync_job_list.go +++ b/typedapi/connector/syncjoblist/sync_job_list.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Lists connector sync jobs. +// Get all connector sync jobs. +// +// Get information about all stored connector sync jobs listed by their creation +// date in ascending order. package syncjoblist import ( @@ -70,7 +73,10 @@ func NewSyncJobListFunc(tp elastictransport.Interface) NewSyncJobList { } } -// Lists connector sync jobs. +// Get all connector sync jobs. +// +// Get information about all stored connector sync jobs listed by their creation +// date in ascending order. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-sync-jobs-api.html func New(tp elastictransport.Interface) *SyncJobList { diff --git a/typedapi/connector/syncjobpost/request.go b/typedapi/connector/syncjobpost/request.go index a9f5f8912f..8b554ed1dc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package syncjobpost @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package syncjobpost // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/sync_job_post/SyncJobPostRequest.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/sync_job_post/SyncJobPostRequest.ts#L23-L45 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 338a98f77b..99591093d9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package syncjobpost // Response holds the response body struct for the package syncjobpost // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/sync_job_post/SyncJobPostResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 8589a81793..e7a01ea7f3 100644 --- a/typedapi/connector/syncjobpost/sync_job_post.go +++ b/typedapi/connector/syncjobpost/sync_job_post.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a connector sync job. +// Create a connector sync job. +// +// Create a connector sync job document in the internal index and initialize its +// counters and timestamps with default values. package syncjobpost import ( @@ -75,7 +78,10 @@ func NewSyncJobPostFunc(tp elastictransport.Interface) NewSyncJobPost { } } -// Creates a connector sync job. +// Create a connector sync job. +// +// Create a connector sync job document in the internal index and initialize its +// counters and timestamps with default values. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-sync-job-api.html func New(tp elastictransport.Interface) *SyncJobPost { diff --git a/typedapi/connector/updateactivefiltering/response.go b/typedapi/connector/updateactivefiltering/response.go index 17742cd5ba..38d15a4819 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateactivefiltering @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateactivefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f2255e9f11..4ab2944722 100644 --- a/typedapi/connector/updateactivefiltering/update_active_filtering.go +++ b/typedapi/connector/updateactivefiltering/update_active_filtering.go @@ -16,8 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Activate the connector draft filter. +// // Activates the valid draft filtering for a connector. package updateactivefiltering @@ -76,6 +78,8 @@ func NewUpdateActiveFilteringFunc(tp elastictransport.Interface) NewUpdateActive } } +// Activate the connector draft filter. +// // Activates the valid draft filtering for a connector. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html diff --git a/typedapi/connector/updateapikeyid/request.go b/typedapi/connector/updateapikeyid/request.go index 0582692d70..d7466a2f2f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateapikeyid @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updateapikeyid // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L47 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 8c7c205666..748e703eb5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateapikeyid @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateapikeyid // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 110a05168c..1fa51e3925 100644 --- a/typedapi/connector/updateapikeyid/update_api_key_id.go +++ b/typedapi/connector/updateapikeyid/update_api_key_id.go @@ -16,9 +16,16 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the API key id in the connector document +// 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. package updateapikeyid import ( @@ -81,7 +88,14 @@ func NewUpdateApiKeyIdFunc(tp elastictransport.Interface) NewUpdateApiKeyId { } } -// Updates the API key id in the connector document +// Update the connector API key ID. +// +// Update the `api_key_id` and `api_key_secret_id` fields of a connector. +// You can specify the ID of the API key used for authorization and the ID of +// the connector secret where the API key is stored. +// The connector secret ID is required only for Elastic managed (native) +// connectors. +// Self-managed connectors (connector clients) do not use this field. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-api-key-id-api.html func New(tp elastictransport.Interface) *UpdateApiKeyId { diff --git a/typedapi/connector/updateconfiguration/request.go b/typedapi/connector/updateconfiguration/request.go index a543962897..4d8cb49b20 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateconfiguration @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package updateconfiguration // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L49 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 7c84714c74..7389c77314 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateconfiguration @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateconfiguration // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_configuration/ConnectorUpdateConfigurationResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 c1e27f338b..f501e0f285 100644 --- a/typedapi/connector/updateconfiguration/update_configuration.go +++ b/typedapi/connector/updateconfiguration/update_configuration.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the configuration field in the connector document +// Update the connector configuration. +// +// Update the configuration field in the connector document. package updateconfiguration import ( @@ -81,7 +83,9 @@ func NewUpdateConfigurationFunc(tp elastictransport.Interface) NewUpdateConfigur } } -// Updates the configuration field in the connector document +// Update the connector configuration. +// +// Update the configuration field in the connector document. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-configuration-api.html func New(tp elastictransport.Interface) *UpdateConfiguration { diff --git a/typedapi/connector/updateerror/request.go b/typedapi/connector/updateerror/request.go index af714bc66b..434ac781d4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateerror @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package updateerror // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L48 type Request struct { Error any `json:"error"` } diff --git a/typedapi/connector/updateerror/response.go b/typedapi/connector/updateerror/response.go index 8c05e9c1ec..ce1d57947b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateerror @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateerror // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 481de3ade8..75c3d50a92 100644 --- a/typedapi/connector/updateerror/update_error.go +++ b/typedapi/connector/updateerror/update_error.go @@ -16,9 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the filtering field in the connector document +// 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. package updateerror import ( @@ -81,7 +87,13 @@ func NewUpdateErrorFunc(tp elastictransport.Interface) NewUpdateError { } } -// Updates the filtering field in the connector document +// Update the connector error field. +// +// Set the error field for the connector. +// If the error provided in the request body is non-null, the connector’s status +// is updated to error. +// Otherwise, if the error is reset to null, the connector status is updated to +// connected. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-error-api.html func New(tp elastictransport.Interface) *UpdateError { diff --git a/typedapi/connector/updatefiltering/request.go b/typedapi/connector/updatefiltering/request.go index af5a206bfc..dac82cc9e4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatefiltering @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L54 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 140344fca4..8dc83275d3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatefiltering @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 253449c7f5..ee68bd1038 100644 --- a/typedapi/connector/updatefiltering/update_filtering.go +++ b/typedapi/connector/updatefiltering/update_filtering.go @@ -16,9 +16,16 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the filtering field in the connector document +// 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. package updatefiltering import ( @@ -81,7 +88,14 @@ func NewUpdateFilteringFunc(tp elastictransport.Interface) NewUpdateFiltering { } } -// Updates the filtering field in the connector document +// Update the connector filtering. +// +// Update the draft filtering configuration of a connector and marks the draft +// validation state as edited. +// The filtering draft is activated once validated by the running Elastic +// connector service. +// The filtering property is used to configure sync rules (both basic and +// advanced) for a connector. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html func New(tp elastictransport.Interface) *UpdateFiltering { diff --git a/typedapi/connector/updatefilteringvalidation/request.go b/typedapi/connector/updatefilteringvalidation/request.go index b2f818b003..608c75e5eb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatefilteringvalidation @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatefilteringvalidation // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L42 type Request struct { Validation types.FilteringRulesValidation `json:"validation"` } diff --git a/typedapi/connector/updatefilteringvalidation/response.go b/typedapi/connector/updatefilteringvalidation/response.go index ea3eab03f3..197c6432fc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatefilteringvalidation @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatefilteringvalidation // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 a55b4343e1..04f3c05c59 100644 --- a/typedapi/connector/updatefilteringvalidation/update_filtering_validation.go +++ b/typedapi/connector/updatefilteringvalidation/update_filtering_validation.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the draft filtering validation info for a connector. +// Update the connector draft filtering validation. +// +// Update the draft filtering validation info for a connector. package updatefilteringvalidation import ( @@ -81,7 +83,9 @@ func NewUpdateFilteringValidationFunc(tp elastictransport.Interface) NewUpdateFi } } -// Updates the draft filtering validation info for a connector. +// Update the connector draft filtering validation. +// +// Update the draft filtering validation info for a connector. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-validation-api.html func New(tp elastictransport.Interface) *UpdateFilteringValidation { diff --git a/typedapi/connector/updateindexname/request.go b/typedapi/connector/updateindexname/request.go index f31d86c4a1..7b307e77d4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateindexname @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package updateindexname // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L45 type Request struct { IndexName any `json:"index_name"` } diff --git a/typedapi/connector/updateindexname/response.go b/typedapi/connector/updateindexname/response.go index 7c71932a44..4ce8d08990 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateindexname @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateindexname // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_index_name/ConnectorUpdateIndexNameResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4c43bfaeee..f7e6752bf0 100644 --- a/typedapi/connector/updateindexname/update_index_name.go +++ b/typedapi/connector/updateindexname/update_index_name.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the index_name in the connector document +// 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. package updateindexname import ( @@ -81,7 +84,10 @@ func NewUpdateIndexNameFunc(tp elastictransport.Interface) NewUpdateIndexName { } } -// Updates the index_name in the connector document +// Update the connector index name. +// +// Update the `index_name` field of a connector, specifying the index where the +// data ingested by the connector is stored. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-index-name-api.html func New(tp elastictransport.Interface) *UpdateIndexName { diff --git a/typedapi/connector/updatename/request.go b/typedapi/connector/updatename/request.go index 4fea05762d..e2b40e8b77 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatename @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatename // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_name/ConnectorUpdateNameRequest.ts#L22-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_name/ConnectorUpdateNameRequest.ts#L22-L43 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 501959879b..33d9c1e4f2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatename @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatename // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 22b1ae546c..c60dfb268a 100644 --- a/typedapi/connector/updatename/update_name.go +++ b/typedapi/connector/updatename/update_name.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the name and description fields in the connector document +// Update the connector name and description. package updatename import ( @@ -81,7 +81,7 @@ func NewUpdateNameFunc(tp elastictransport.Interface) NewUpdateName { } } -// Updates the name and description fields in the connector document +// Update the connector name and description. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-name-description-api.html func New(tp elastictransport.Interface) *UpdateName { diff --git a/typedapi/connector/updatenative/request.go b/typedapi/connector/updatenative/request.go index 4145ded58a..8ca05d7967 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatenative @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatenative // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_native/ConnectorUpdateNativeRequest.ts#L22-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_native/ConnectorUpdateNativeRequest.ts#L22-L42 type Request struct { IsNative bool `json:"is_native"` } diff --git a/typedapi/connector/updatenative/response.go b/typedapi/connector/updatenative/response.go index daf94cff31..f35de65753 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatenative @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatenative // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_native/ConnectorUpdateNativeResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 387ad23999..230c36f53e 100644 --- a/typedapi/connector/updatenative/update_native.go +++ b/typedapi/connector/updatenative/update_native.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the is_native flag in the connector document +// Update the connector is_native flag. package updatenative import ( @@ -81,7 +81,7 @@ func NewUpdateNativeFunc(tp elastictransport.Interface) NewUpdateNative { } } -// Updates the is_native flag in the connector document +// Update the connector is_native flag. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-native-api.html func New(tp elastictransport.Interface) *UpdateNative { diff --git a/typedapi/connector/updatepipeline/request.go b/typedapi/connector/updatepipeline/request.go index 16b26bf1ed..2d057d4d2a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatepipeline @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L46 type Request struct { Pipeline types.IngestPipelineParams `json:"pipeline"` } diff --git a/typedapi/connector/updatepipeline/response.go b/typedapi/connector/updatepipeline/response.go index 2a4c3e1640..3602be8a8f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatepipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_pipeline/ConnectorUpdatePipelineResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1ff410579f..ddac535998 100644 --- a/typedapi/connector/updatepipeline/update_pipeline.go +++ b/typedapi/connector/updatepipeline/update_pipeline.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the pipeline field in the connector document +// Update the connector pipeline. +// +// When you create a new connector, the configuration of an ingest pipeline is +// populated with default settings. package updatepipeline import ( @@ -81,7 +84,10 @@ func NewUpdatePipelineFunc(tp elastictransport.Interface) NewUpdatePipeline { } } -// Updates the pipeline field in the connector document +// Update the connector pipeline. +// +// When you create a new connector, the configuration of an ingest pipeline is +// populated with default settings. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-pipeline-api.html func New(tp elastictransport.Interface) *UpdatePipeline { diff --git a/typedapi/connector/updatescheduling/request.go b/typedapi/connector/updatescheduling/request.go index a9eff95329..b0295b5621 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatescheduling @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatescheduling // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L44 type Request struct { Scheduling types.SchedulingConfiguration `json:"scheduling"` } diff --git a/typedapi/connector/updatescheduling/response.go b/typedapi/connector/updatescheduling/response.go index 2643849d4f..4e83bad150 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatescheduling @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatescheduling // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 7ccc4dbd58..1d3e05c23f 100644 --- a/typedapi/connector/updatescheduling/update_scheduling.go +++ b/typedapi/connector/updatescheduling/update_scheduling.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the scheduling field in the connector document +// Update the connector scheduling. package updatescheduling import ( @@ -81,7 +81,7 @@ func NewUpdateSchedulingFunc(tp elastictransport.Interface) NewUpdateScheduling } } -// Updates the scheduling field in the connector document +// Update the connector scheduling. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-scheduling-api.html func New(tp elastictransport.Interface) *UpdateScheduling { diff --git a/typedapi/connector/updateservicetype/request.go b/typedapi/connector/updateservicetype/request.go index 9af84bb339..88aa6fae6c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateservicetype @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updateservicetype // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts#L22-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts#L22-L42 type Request struct { ServiceType string `json:"service_type"` } diff --git a/typedapi/connector/updateservicetype/response.go b/typedapi/connector/updateservicetype/response.go index fbbca850ff..8d9546ae6b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateservicetype @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateservicetype // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 84412adb57..b2e4e010c5 100644 --- a/typedapi/connector/updateservicetype/update_service_type.go +++ b/typedapi/connector/updateservicetype/update_service_type.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the service type of the connector +// Update the connector service type. package updateservicetype import ( @@ -81,7 +81,7 @@ func NewUpdateServiceTypeFunc(tp elastictransport.Interface) NewUpdateServiceTyp } } -// Updates the service type of the connector +// Update the connector service type. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-service-type-api.html func New(tp elastictransport.Interface) *UpdateServiceType { diff --git a/typedapi/connector/updatestatus/request.go b/typedapi/connector/updatestatus/request.go index dceddf6680..ca4cc2baa3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatestatus @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatestatus // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L43 type Request struct { Status connectorstatus.ConnectorStatus `json:"status"` } diff --git a/typedapi/connector/updatestatus/response.go b/typedapi/connector/updatestatus/response.go index 172f1f9bf9..5a5e7ffcc4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatestatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatestatus // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 516aad0bf2..a4820e33a8 100644 --- a/typedapi/connector/updatestatus/update_status.go +++ b/typedapi/connector/updatestatus/update_status.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the status of the connector +// Update the connector status. package updatestatus import ( @@ -82,7 +82,7 @@ func NewUpdateStatusFunc(tp elastictransport.Interface) NewUpdateStatus { } } -// Updates the status of the connector +// Update the connector status. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-status-api.html func New(tp elastictransport.Interface) *UpdateStatus { diff --git a/typedapi/core/bulk/bulk.go b/typedapi/core/bulk/bulk.go index 788e8482ac..6939d6b5cb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Bulk index or delete documents. // Performs multiple indexing or delete operations in a single API call. @@ -324,6 +324,15 @@ func (r *Bulk) Index(index string) *Bulk { return r } +// ListExecutedPipelines If `true`, the response will include the ingest pipelines that were executed +// for each index or create. +// API name: list_executed_pipelines +func (r *Bulk) ListExecutedPipelines(listexecutedpipelines bool) *Bulk { + r.values.Set("list_executed_pipelines", strconv.FormatBool(listexecutedpipelines)) + + return r +} + // Pipeline ID of the pipeline to use to preprocess incoming documents. // If the index has a default ingest pipeline specified, then setting the value // to `_none` disables the default ingest pipeline for this request. @@ -408,6 +417,15 @@ func (r *Bulk) RequireAlias(requirealias bool) *Bulk { 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 *Bulk) RequireDataStream(requiredatastream bool) *Bulk { + r.values.Set("require_data_stream", strconv.FormatBool(requiredatastream)) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/core/bulk/request.go b/typedapi/core/bulk/request.go index 738c440ca7..182708c108 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package bulk // Request holds the request body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/bulk/BulkRequest.ts#L32-L104 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/bulk/BulkRequest.ts#L32-L115 type Request = []any diff --git a/typedapi/core/bulk/response.go b/typedapi/core/bulk/response.go index e4c7b3777f..95651b1202 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package bulk @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/bulk/BulkResponse.ts#L24-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/bulk/BulkResponse.ts#L24-L31 type Response struct { Errors bool `json:"errors"` IngestTook *int64 `json:"ingest_took,omitempty"` diff --git a/typedapi/core/clearscroll/clear_scroll.go b/typedapi/core/clearscroll/clear_scroll.go index af70f2f82b..9cceaa8dfd 100644 --- a/typedapi/core/clearscroll/clear_scroll.go +++ b/typedapi/core/clearscroll/clear_scroll.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Clears the search context and results for a scrolling search. +// Clear a scrolling search. +// +// Clear the search context and results for a scrolling search. package clearscroll import ( @@ -75,7 +77,9 @@ func NewClearScrollFunc(tp elastictransport.Interface) NewClearScroll { } } -// Clears the search context and results for a scrolling search. +// Clear a scrolling search. +// +// Clear the search context and results for a scrolling search. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html func New(tp elastictransport.Interface) *ClearScroll { diff --git a/typedapi/core/clearscroll/request.go b/typedapi/core/clearscroll/request.go index f1e93b247b..e50649770e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearscroll @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package clearscroll // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/clear_scroll/ClearScrollRequest.ts#L23-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/clear_scroll/ClearScrollRequest.ts#L23-L48 type Request struct { // ScrollId Scroll IDs to clear. diff --git a/typedapi/core/clearscroll/response.go b/typedapi/core/clearscroll/response.go index ec5d214e61..72f415ede6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearscroll // Response holds the response body struct for the package clearscroll // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/clear_scroll/ClearScrollResponse.ts#L22-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/clear_scroll/ClearScrollResponse.ts#L22-L36 type Response struct { NumFreed int `json:"num_freed"` Succeeded bool `json:"succeeded"` diff --git a/typedapi/core/closepointintime/close_point_in_time.go b/typedapi/core/closepointintime/close_point_in_time.go index 66eef38600..5baa4b5d52 100644 --- a/typedapi/core/closepointintime/close_point_in_time.go +++ b/typedapi/core/closepointintime/close_point_in_time.go @@ -16,9 +16,17 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Closes a point-in-time. +// 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. package closepointintime import ( @@ -73,7 +81,15 @@ func NewClosePointInTimeFunc(tp elastictransport.Interface) NewClosePointInTime } } -// Closes a point-in-time. +// Close a point in time. +// +// A point in time must be opened explicitly before being used in search +// requests. +// The `keep_alive` parameter tells Elasticsearch how long it should persist. +// A point in time is automatically closed when the `keep_alive` period has +// elapsed. +// However, keeping points in time has a cost; close them as soon as they are no +// longer required for search requests. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html func New(tp elastictransport.Interface) *ClosePointInTime { diff --git a/typedapi/core/closepointintime/request.go b/typedapi/core/closepointintime/request.go index 5958a60ecd..4fb25cdd5a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package closepointintime @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package closepointintime // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L43 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 dc4658de1a..b6e00094f0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package closepointintime // Response holds the response body struct for the package closepointintime // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L36 type Response struct { NumFreed int `json:"num_freed"` Succeeded bool `json:"succeeded"` diff --git a/typedapi/core/count/count.go b/typedapi/core/count/count.go index ebd7a91d5f..a8c7ff5a86 100644 --- a/typedapi/core/count/count.go +++ b/typedapi/core/count/count.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns number of documents matching a query. +// Count search results. +// Get the number of documents matching a query. package count import ( @@ -81,7 +82,8 @@ func NewCountFunc(tp elastictransport.Interface) NewCount { } } -// Returns number of documents matching a query. +// Count search results. +// Get the number of documents matching a query. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html func New(tp elastictransport.Interface) *Count { diff --git a/typedapi/core/count/request.go b/typedapi/core/count/request.go index c9e14e95f9..0ac6020f5e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package count @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/count/CountRequest.ts#L26-L120 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/count/CountRequest.ts#L26-L123 type Request struct { // Query Defines the search definition using the Query DSL. diff --git a/typedapi/core/count/response.go b/typedapi/core/count/response.go index 99365df1f3..d838566238 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package count @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/count/CountResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 67152166ec..16b586778f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Index a document. // Adds a JSON document to the specified data stream or index and makes it diff --git a/typedapi/core/create/request.go b/typedapi/core/create/request.go index 0b18fd1def..3b862b36ac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package create @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/create/CreateRequest.ts#L32-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/create/CreateRequest.ts#L32-L96 type Request = json.RawMessage // NewRequest returns a Request diff --git a/typedapi/core/create/response.go b/typedapi/core/create/response.go index 161a74d4be..607e43ebf4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package create @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/create/CreateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/create/CreateResponse.ts#L22-L24 type Response struct { ForcedRefresh *bool `json:"forced_refresh,omitempty"` Id_ string `json:"_id"` diff --git a/typedapi/core/delete/delete.go b/typedapi/core/delete/delete.go index 81ed5e83a2..9c5190bbb2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete a document. // Removes a JSON document from the specified index. diff --git a/typedapi/core/delete/response.go b/typedapi/core/delete/response.go index 7408260a50..5da6eb5fb8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package delete @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/delete/DeleteResponse.ts#L22-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/delete/DeleteResponse.ts#L22-L34 type Response struct { ForcedRefresh *bool `json:"forced_refresh,omitempty"` Id_ string `json:"_id"` diff --git a/typedapi/core/deletebyquery/delete_by_query.go b/typedapi/core/deletebyquery/delete_by_query.go index 7f40dae969..f94e332aa6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete documents. // Deletes documents that match the specified query. diff --git a/typedapi/core/deletebyquery/request.go b/typedapi/core/deletebyquery/request.go index 2edfa30f7c..f860474742 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletebyquery @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package deletebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/delete_by_query/DeleteByQueryRequest.ts#L36-L210 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/delete_by_query/DeleteByQueryRequest.ts#L36-L211 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 e794ec5612..e09f079584 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletebyquery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deletebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/delete_by_query/DeleteByQueryResponse.ts#L26-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/delete_by_query/DeleteByQueryResponse.ts#L26-L45 type Response struct { Batches *int64 `json:"batches,omitempty"` Deleted *int64 `json:"deleted,omitempty"` diff --git a/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go b/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go index 13b3773781..8b462ba545 100644 --- a/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go +++ b/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go @@ -16,10 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Changes the number of requests per second for a particular Delete By Query +// 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. package deletebyqueryrethrottle import ( @@ -77,8 +82,13 @@ func NewDeleteByQueryRethrottleFunc(tp elastictransport.Interface) NewDeleteByQu } } -// Changes the number of requests per second for a particular Delete By Query +// Throttle a delete by query operation. +// +// Change the number of requests per second for a particular delete by query // operation. +// Rethrottling that speeds up the query takes effect immediately but +// rethrotting that slows down the query takes effect after completing the +// current batch to prevent scroll timeouts. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html func New(tp elastictransport.Interface) *DeleteByQueryRethrottle { diff --git a/typedapi/core/deletebyqueryrethrottle/response.go b/typedapi/core/deletebyqueryrethrottle/response.go index 9db20cef9f..38ef22c389 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletebyqueryrethrottle @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package deletebyqueryrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleResponse.ts#L22-L24 type Response struct { NodeFailures []types.ErrorCause `json:"node_failures,omitempty"` // Nodes Task information grouped by node, if `group_by` was set to `node` (the diff --git a/typedapi/core/deletescript/delete_script.go b/typedapi/core/deletescript/delete_script.go index 319ffa554d..a1e259b139 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete a script or search template. // Deletes a stored script or search template. diff --git a/typedapi/core/deletescript/response.go b/typedapi/core/deletescript/response.go index f53c0962b8..1189b91332 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletescript // Response holds the response body struct for the package deletescript // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/delete_script/DeleteScriptResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/delete_script/DeleteScriptResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/core/exists/exists.go b/typedapi/core/exists/exists.go index 131eff90ac..83fbe78692 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Check a document. // Checks if a specified document exists. diff --git a/typedapi/core/existssource/exists_source.go b/typedapi/core/existssource/exists_source.go index d6d7ee0372..f639320b6a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Check for a document source. // Checks if a document's `_source` is stored. diff --git a/typedapi/core/explain/explain.go b/typedapi/core/explain/explain.go index b93bc89b32..6c3f716747 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Explain a document match result. // Returns information about why a specific document matches, or doesn’t match, diff --git a/typedapi/core/explain/request.go b/typedapi/core/explain/request.go index c7357a9dc4..133405f5b8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package explain @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package explain // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/explain/ExplainRequest.ts#L26-L106 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/explain/ExplainRequest.ts#L26-L107 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 eece18633d..7454d0edc2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package explain @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explain // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/explain/ExplainResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4943a78373..6d7624a331 100644 --- a/typedapi/core/fieldcaps/field_caps.go +++ b/typedapi/core/fieldcaps/field_caps.go @@ -16,14 +16,17 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// The field capabilities API returns the information about the capabilities of -// fields among multiple indices. -// The field capabilities API returns runtime fields like any other field. For -// example, a runtime field with a type -// of keyword is returned as any other field that belongs to the `keyword` -// family. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package fieldcaps import ( @@ -85,12 +88,15 @@ func NewFieldCapsFunc(tp elastictransport.Interface) NewFieldCaps { } } -// The field capabilities API returns the information about the capabilities of -// fields among multiple indices. -// The field capabilities API returns runtime fields like any other field. For -// example, a runtime field with a type -// of keyword is returned as any other field that belongs to the `keyword` -// family. +// Get the field capabilities. +// +// Get information about the capabilities of fields among multiple indices. +// +// For data streams, the API returns field capabilities among the stream’s +// backing indices. +// It returns runtime fields like any other field. +// For example, a runtime field with a type of keyword is returned the same as +// any other field that belongs to the `keyword` family. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html func New(tp elastictransport.Interface) *FieldCaps { diff --git a/typedapi/core/fieldcaps/request.go b/typedapi/core/fieldcaps/request.go index de6e740b16..6c9c4bae7b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package fieldcaps @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package fieldcaps // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/field_caps/FieldCapabilitiesRequest.ts#L25-L106 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/field_caps/FieldCapabilitiesRequest.ts#L25-L111 type Request struct { // Fields 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 dcb6e2d423..de2baaf6e8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package fieldcaps @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package fieldcaps // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/field_caps/FieldCapabilitiesResponse.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/field_caps/FieldCapabilitiesResponse.ts#L24-L35 type Response struct { Fields map[string]map[string]types.FieldCapability `json:"fields"` Indices []string `json:"indices"` diff --git a/typedapi/core/get/get.go b/typedapi/core/get/get.go index 5df662380d..2deab4e496 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get a document by its ID. // Retrieves the document with the specified ID from an index. diff --git a/typedapi/core/get/response.go b/typedapi/core/get/response.go index 9d82deff35..e2d5d21489 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package get @@ -26,11 +26,12 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/get/GetResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/get/GetResponse.ts#L23-L34 type Response struct { Fields map[string]json.RawMessage `json:"fields,omitempty"` Found bool `json:"found"` Id_ string `json:"_id"` + Ignored_ []string `json:"_ignored,omitempty"` Index_ string `json:"_index"` PrimaryTerm_ *int64 `json:"_primary_term,omitempty"` Routing_ *string `json:"_routing,omitempty"` diff --git a/typedapi/core/getscript/get_script.go b/typedapi/core/getscript/get_script.go index 185ea71173..0336612d13 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get a script or search template. // Retrieves a stored script or search template. diff --git a/typedapi/core/getscript/response.go b/typedapi/core/getscript/response.go index 45f82f8028..5bd8ffdc10 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getscript @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscript // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/get_script/GetScriptResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d718b58f5d..8ddfc6805a 100644 --- a/typedapi/core/getscriptcontext/get_script_context.go +++ b/typedapi/core/getscriptcontext/get_script_context.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns all script contexts. +// Get script contexts. +// +// Get a list of supported script contexts and their methods. package getscriptcontext import ( @@ -68,7 +70,9 @@ func NewGetScriptContextFunc(tp elastictransport.Interface) NewGetScriptContext } } -// Returns all script contexts. +// Get script contexts. +// +// Get a list of supported script contexts and their methods. // // https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-contexts.html func New(tp elastictransport.Interface) *GetScriptContext { diff --git a/typedapi/core/getscriptcontext/response.go b/typedapi/core/getscriptcontext/response.go index 72dae7af66..17b76dc076 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getscriptcontext @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscriptcontext // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/get_script_context/GetScriptContextResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 de99d7220f..bf9421edc9 100644 --- a/typedapi/core/getscriptlanguages/get_script_languages.go +++ b/typedapi/core/getscriptlanguages/get_script_languages.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns available script types, languages and contexts +// Get script languages. +// +// Get a list of available script types, languages, and contexts. package getscriptlanguages import ( @@ -68,7 +70,9 @@ func NewGetScriptLanguagesFunc(tp elastictransport.Interface) NewGetScriptLangua } } -// Returns available script types, languages and contexts +// Get script languages. +// +// Get a list of available script types, languages, and contexts. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html func New(tp elastictransport.Interface) *GetScriptLanguages { diff --git a/typedapi/core/getscriptlanguages/response.go b/typedapi/core/getscriptlanguages/response.go index 67668ac7c2..e8d3ac65fc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getscriptlanguages @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscriptlanguages // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/get_script_languages/GetScriptLanguagesResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 0825e0085c..9b44ca2455 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get a document's source. // Returns the source of a document. diff --git a/typedapi/core/getsource/response.go b/typedapi/core/getsource/response.go index f906ded05b..a328befd00 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getsource @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsource // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/get_source/SourceResponse.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f3fdd35e9d..f32234494a 100644 --- a/typedapi/core/healthreport/health_report.go +++ b/typedapi/core/healthreport/health_report.go @@ -16,9 +16,38 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns the health of the cluster. +// 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. package healthreport import ( @@ -74,7 +103,36 @@ func NewHealthReportFunc(tp elastictransport.Interface) NewHealthReport { } } -// Returns the health of the cluster. +// Get the cluster health. +// Get a report with the health status of an Elasticsearch cluster. +// The report contains a list of indicators that compose Elasticsearch +// functionality. +// +// Each indicator has a health status of: green, unknown, yellow or red. +// The indicator will provide an explanation and metadata describing the reason +// for its current health status. +// +// The cluster’s status is controlled by the worst indicator status. +// +// In the event that an indicator’s status is non-green, a list of impacts may +// be present in the indicator result which detail the functionalities that are +// negatively affected by the health issue. +// Each impact carries with it a severity level, an area of the system that is +// affected, and a simple description of the impact on the system. +// +// Some health indicators can determine the root cause of a health problem and +// prescribe a set of steps that can be performed in order to improve the health +// of the system. +// The root cause and remediation steps are encapsulated in a diagnosis. +// A diagnosis contains a cause detailing a root cause analysis, an action +// containing a brief description of the steps to take to fix the problem, the +// list of affected resources (if applicable), and a detailed step-by-step +// troubleshooting guide to fix the diagnosed problem. +// +// NOTE: The health indicators perform root cause analysis of non-green health +// statuses. This can be computationally expensive when called frequently. +// When setting up automated polling of the API for health status, set verbose +// to false to disable the more expensive analysis logic. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html func New(tp elastictransport.Interface) *HealthReport { diff --git a/typedapi/core/healthreport/response.go b/typedapi/core/healthreport/response.go index afc63726ee..422ed2eae5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package healthreport @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package healthreport // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/Response.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 0dd0d41930..581e7db9af 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Index a document. // Adds a JSON document to the specified data stream or index and makes it diff --git a/typedapi/core/index/request.go b/typedapi/core/index/request.go index 70010f8acb..128c99f7ba 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package index @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package index // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/index/IndexRequest.ts#L35-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/index/IndexRequest.ts#L35-L119 type Request = json.RawMessage // NewRequest returns a Request diff --git a/typedapi/core/index/response.go b/typedapi/core/index/response.go index 8e9fd2fbe3..38fd59a978 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package index @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package index // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/index/IndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/index/IndexResponse.ts#L22-L24 type Response struct { ForcedRefresh *bool `json:"forced_refresh,omitempty"` Id_ string `json:"_id"` diff --git a/typedapi/core/info/info.go b/typedapi/core/info/info.go index f5afe98c69..af55e11f5f 100644 --- a/typedapi/core/info/info.go +++ b/typedapi/core/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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get cluster info. // Returns basic information about the cluster. diff --git a/typedapi/core/info/response.go b/typedapi/core/info/response.go index 097c1abc4a..80937d9198 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/info/RootNodeInfoResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/info/RootNodeInfoResponse.ts#L23-L31 type Response struct { ClusterName string `json:"cluster_name"` ClusterUuid string `json:"cluster_uuid"` diff --git a/typedapi/core/knnsearch/knn_search.go b/typedapi/core/knnsearch/knn_search.go index bb88cac106..29eb232cba 100644 --- a/typedapi/core/knnsearch/knn_search.go +++ b/typedapi/core/knnsearch/knn_search.go @@ -16,9 +16,25 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Performs a kNN search. +// Run a knn search. +// +// NOTE: The kNN search API has been replaced by the `knn` option in the search +// API. +// +// Perform a k-nearest neighbor (kNN) search on a dense_vector field and return +// the matching documents. +// Given a query vector, the API finds the k closest vectors and returns those +// documents as search hits. +// +// Elasticsearch uses the HNSW algorithm to support efficient kNN search. +// Like most kNN algorithms, HNSW is an approximate method that sacrifices +// result accuracy for improved search speed. +// This means the results returned are not always the true k closest neighbors. +// +// The kNN search API supports restricting the search using a filter. +// The search will return the top k documents that also match the filter query. package knnsearch import ( @@ -81,7 +97,23 @@ func NewKnnSearchFunc(tp elastictransport.Interface) NewKnnSearch { } } -// Performs a kNN search. +// Run a knn search. +// +// NOTE: The kNN search API has been replaced by the `knn` option in the search +// API. +// +// Perform a k-nearest neighbor (kNN) search on a dense_vector field and return +// the matching documents. +// Given a query vector, the API finds the k closest vectors and returns those +// documents as search hits. +// +// Elasticsearch uses the HNSW algorithm to support efficient kNN search. +// Like most kNN algorithms, HNSW is an approximate method that sacrifices +// result accuracy for improved search speed. +// This means the results returned are not always the true k closest neighbors. +// +// The kNN search API supports restricting the search using a filter. +// The search will return the top k documents that also match the filter query. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html func New(tp elastictransport.Interface) *KnnSearch { diff --git a/typedapi/core/knnsearch/request.go b/typedapi/core/knnsearch/request.go index 781de09bf5..38ae95ef89 100644 --- a/typedapi/core/knnsearch/request.go +++ b/typedapi/core/knnsearch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package knnsearch @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package knnsearch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/knn_search/KnnSearchRequest.ts#L27-L80 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/knn_search/KnnSearchRequest.ts#L26-L96 type Request struct { // DocvalueFields The request returns doc values for field names matching these patterns diff --git a/typedapi/core/knnsearch/response.go b/typedapi/core/knnsearch/response.go index a88f661fef..3eecc736d9 100644 --- a/typedapi/core/knnsearch/response.go +++ b/typedapi/core/knnsearch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package knnsearch @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package knnsearch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/knn_search/KnnSearchResponse.ts#L26-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/knn_search/KnnSearchResponse.ts#L26-L54 type Response struct { // Fields Contains field values for the documents. These fields diff --git a/typedapi/core/mget/mget.go b/typedapi/core/mget/mget.go index 411cd58414..0153e7ca1b 100644 --- a/typedapi/core/mget/mget.go +++ b/typedapi/core/mget/mget.go @@ -16,9 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Allows to get multiple documents in one request. +// 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. package mget import ( @@ -79,7 +85,13 @@ func NewMgetFunc(tp elastictransport.Interface) NewMget { } } -// Allows to get multiple documents in one request. +// 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html func New(tp elastictransport.Interface) *Mget { diff --git a/typedapi/core/mget/request.go b/typedapi/core/mget/request.go index 77ec80701b..5a42da23fb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package mget @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package mget // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/mget/MultiGetRequest.ts#L25-L98 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/mget/MultiGetRequest.ts#L25-L104 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 a7a9720336..d54d80d0bd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package mget @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package mget // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/mget/MultiGetResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/mget/MultiGetResponse.ts#L22-L26 type Response struct { Docs []types.MgetResponseItem `json:"docs"` } @@ -76,7 +76,7 @@ func (s *Response) UnmarshalJSON(data []byte) error { switch t { - case "fields", "found", "_primary_term", "_routing", "_seq_no", "_source", "_version": + case "fields", "found", "_ignored", "_primary_term", "_routing", "_seq_no", "_source", "_version": o := types.NewGetResult() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { diff --git a/typedapi/core/msearch/msearch.go b/typedapi/core/msearch/msearch.go index 7b6fbcaab2..8138a3a490 100644 --- a/typedapi/core/msearch/msearch.go +++ b/typedapi/core/msearch/msearch.go @@ -16,9 +16,28 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Allows to execute several search operations in one request. +// 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`. package msearch import ( @@ -81,7 +100,26 @@ func NewMsearchFunc(tp elastictransport.Interface) NewMsearch { } } -// Allows to execute several search operations in one request. +// Run multiple searches. +// +// The format of the request is similar to the bulk API format and makes use of +// the newline delimited JSON (NDJSON) format. +// The structure is as follows: +// +// ``` +// header\n +// body\n +// header\n +// body\n +// ``` +// +// This structure is specifically optimized to reduce parsing if a specific +// search ends up redirected to another node. +// +// IMPORTANT: The final line of data must end with a newline character `\n`. +// Each newline character may be preceded by a carriage return `\r`. +// When sending requests to this endpoint the `Content-Type` header should be +// set to `application/x-ndjson`. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html func New(tp elastictransport.Interface) *Msearch { diff --git a/typedapi/core/msearch/request.go b/typedapi/core/msearch/request.go index c56d8913e1..48b7348f31 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package msearch @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch/MultiSearchRequest.ts#L25-L106 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch/MultiSearchRequest.ts#L25-L124 type Request = []types.MsearchRequestItem diff --git a/typedapi/core/msearch/response.go b/typedapi/core/msearch/response.go index eb0bf6fe1f..d9db2fc78f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package msearch @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch/MultiSearchResponse.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch/MultiSearchResponse.ts#L25-L27 type Response struct { Responses []types.MsearchResponseItem `json:"responses"` Took int64 `json:"took"` diff --git a/typedapi/core/msearchtemplate/msearch_template.go b/typedapi/core/msearchtemplate/msearch_template.go index 8f5ac6f4cb..d243988549 100644 --- a/typedapi/core/msearchtemplate/msearch_template.go +++ b/typedapi/core/msearchtemplate/msearch_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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Runs multiple templated searches with a single request. +// Run multiple templated searches. package msearchtemplate import ( @@ -80,7 +80,7 @@ func NewMsearchTemplateFunc(tp elastictransport.Interface) NewMsearchTemplate { } } -// Runs multiple templated searches with a single request. +// Run multiple templated searches. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html func New(tp elastictransport.Interface) *MsearchTemplate { diff --git a/typedapi/core/msearchtemplate/request.go b/typedapi/core/msearchtemplate/request.go index 1e4c89edc0..0ecffddee2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package msearchtemplate @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L70 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L72 type Request = []types.RequestItem diff --git a/typedapi/core/msearchtemplate/response.go b/typedapi/core/msearchtemplate/response.go index efd210a1a2..5e96a58ec5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package msearchtemplate @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package msearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L24 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 7892aa4a64..286b67e763 100644 --- a/typedapi/core/mtermvectors/mtermvectors.go +++ b/typedapi/core/mtermvectors/mtermvectors.go @@ -16,9 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns multiple termvectors in one request. +// Get multiple term vectors. +// +// 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. package mtermvectors import ( @@ -80,7 +86,13 @@ func NewMtermvectorsFunc(tp elastictransport.Interface) NewMtermvectors { } } -// Returns multiple termvectors in one request. +// Get multiple term vectors. +// +// 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html func New(tp elastictransport.Interface) *Mtermvectors { diff --git a/typedapi/core/mtermvectors/request.go b/typedapi/core/mtermvectors/request.go index 255bf46b36..7ff5187a21 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package mtermvectors @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package mtermvectors // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L109 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L116 type Request struct { // Docs Array of existing or artificial documents. diff --git a/typedapi/core/mtermvectors/response.go b/typedapi/core/mtermvectors/response.go index 0039a383d3..124e5c56e5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package mtermvectors @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mtermvectors // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/mtermvectors/MultiTermVectorsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 24c96f3943..95f3ca692d 100644 --- a/typedapi/core/openpointintime/open_point_in_time.go +++ b/typedapi/core/openpointintime/open_point_in_time.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// A search request by default executes against the most recent visible data of -// the target indices, +// 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 @@ -29,9 +31,14 @@ // `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. +// The `keep_alive` parameter tells Elasticsearch how long it should persist. package openpointintime import ( + gobytes "bytes" "context" "encoding/json" "errors" @@ -63,6 +70,10 @@ type OpenPointInTime struct { raw io.Reader + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + paramSet int index string @@ -87,8 +98,10 @@ func NewOpenPointInTimeFunc(tp elastictransport.Interface) NewOpenPointInTime { } } -// A search request by default executes against the most recent visible data of -// the target indices, +// 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 @@ -99,12 +112,20 @@ func NewOpenPointInTimeFunc(tp elastictransport.Interface) NewOpenPointInTime { // 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. +// The `keep_alive` parameter tells Elasticsearch how long it should persist. +// // https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html func New(tp elastictransport.Interface) *OpenPointInTime { r := &OpenPointInTime{ transport: tp, values: make(url.Values), headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + + req: NewRequest(), } if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { @@ -116,6 +137,21 @@ func New(tp elastictransport.Interface) *OpenPointInTime { 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 *OpenPointInTime) Raw(raw io.Reader) *OpenPointInTime { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *OpenPointInTime) Request(req *Request) *OpenPointInTime { + r.req = req + + return r +} + // HttpRequest returns the http.Request object built from the // given parameters. func (r *OpenPointInTime) HttpRequest(ctx context.Context) (*http.Request, error) { @@ -125,6 +161,31 @@ func (r *OpenPointInTime) HttpRequest(ctx context.Context) (*http.Request, error 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 OpenPointInTime: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + r.path.Scheme = "http" switch { @@ -269,45 +330,6 @@ func (r OpenPointInTime) Do(providedCtx context.Context) (*Response, error) { 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 OpenPointInTime) 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, "open_point_in_time") - 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 OpenPointInTime 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 OpenPointInTime headers map. func (r *OpenPointInTime) Header(key, value string) *OpenPointInTime { r.headers.Set(key, value) @@ -375,6 +397,17 @@ func (r *OpenPointInTime) ExpandWildcards(expandwildcards ...expandwildcard.Expa return r } +// AllowPartialSearchResults If `false`, creating a point in time request when a shard is missing or +// unavailable will throw an exception. +// If `true`, the point in time will contain all the shards that are available +// at the time of the request. +// API name: allow_partial_search_results +func (r *OpenPointInTime) AllowPartialSearchResults(allowpartialsearchresults bool) *OpenPointInTime { + r.values.Set("allow_partial_search_results", strconv.FormatBool(allowpartialsearchresults)) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -418,3 +451,13 @@ func (r *OpenPointInTime) Pretty(pretty bool) *OpenPointInTime { return r } + +// IndexFilter Allows to filter indices if the provided query rewrites to `match_none` on +// every shard. +// API name: index_filter +func (r *OpenPointInTime) IndexFilter(indexfilter *types.Query) *OpenPointInTime { + + r.req.IndexFilter = indexfilter + + return r +} diff --git a/typedapi/core/openpointintime/request.go b/typedapi/core/openpointintime/request.go new file mode 100644 index 0000000000..2168594433 --- /dev/null +++ b/typedapi/core/openpointintime/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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package openpointintime + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// Request holds the request body struct for the package openpointintime +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L87 +type Request struct { + + // IndexFilter Allows to filter indices if the provided query rewrites to `match_none` on + // every shard. + IndexFilter *types.Query `json:"index_filter,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 Openpointintime request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/core/openpointintime/response.go b/typedapi/core/openpointintime/response.go index 29db756db8..40327ee26e 100644 --- a/typedapi/core/openpointintime/response.go +++ b/typedapi/core/openpointintime/response.go @@ -16,15 +16,21 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package openpointintime +import ( + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + // Response holds the response body struct for the package openpointintime // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/open_point_in_time/OpenPointInTimeResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L29 type Response struct { Id string `json:"id"` + // Shards_ Shards used to create the PIT + Shards_ types.ShardStatistics `json:"_shards"` } // NewResponse returns a Response diff --git a/typedapi/core/ping/ping.go b/typedapi/core/ping/ping.go index 7fd847072b..11066a7d3e 100644 --- a/typedapi/core/ping/ping.go +++ b/typedapi/core/ping/ping.go @@ -16,10 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Ping the cluster. -// Returns whether the cluster is running. +// Get information about whether the cluster is running. package ping import ( @@ -68,7 +68,7 @@ func NewPingFunc(tp elastictransport.Interface) NewPing { } // Ping the cluster. -// Returns whether the cluster is running. +// Get information about whether the cluster is running. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html func New(tp elastictransport.Interface) *Ping { diff --git a/typedapi/core/putscript/put_script.go b/typedapi/core/putscript/put_script.go index 0752d9eb3d..147186d9e4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create or update a script or search template. // Creates or updates a stored script or search template. diff --git a/typedapi/core/putscript/request.go b/typedapi/core/putscript/request.go index ef7321e686..ff9eeb6afc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putscript @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putscript // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/put_script/PutScriptRequest.ts#L25-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/put_script/PutScriptRequest.ts#L25-L66 type Request struct { // Script Contains 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 0f610a02c7..5231b0763b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putscript // Response holds the response body struct for the package putscript // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/put_script/PutScriptResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/put_script/PutScriptResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/core/rankeval/rank_eval.go b/typedapi/core/rankeval/rank_eval.go index 6e6cc25c16..147c650f81 100644 --- a/typedapi/core/rankeval/rank_eval.go +++ b/typedapi/core/rankeval/rank_eval.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Enables you to evaluate the quality of ranked search results over a set of -// typical search queries. +// Evaluate ranked search results. +// +// Evaluate the quality of ranked search results over a set of typical search +// queries. package rankeval import ( @@ -81,8 +83,10 @@ func NewRankEvalFunc(tp elastictransport.Interface) NewRankEval { } } -// Enables you to evaluate the quality of ranked search results over a set of -// typical search queries. +// Evaluate ranked search results. +// +// Evaluate the quality of ranked search results over a set of typical search +// queries. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html func New(tp elastictransport.Interface) *RankEval { diff --git a/typedapi/core/rankeval/request.go b/typedapi/core/rankeval/request.go index 5f6c84f0d6..2e3de5ca70 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package rankeval @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package rankeval // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/RankEvalRequest.ts#L24-L61 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/rank_eval/RankEvalRequest.ts#L24-L64 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 c355c1ad91..b5012213ce 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package rankeval @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package rankeval // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/RankEvalResponse.ts#L26-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e620f2cc9c..b074bd237c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Reindex documents. // Copies documents from a source to a destination. The source can be any diff --git a/typedapi/core/reindex/request.go b/typedapi/core/reindex/request.go index dd8f8e1d82..d92bce624a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package reindex @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package reindex // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/reindex/ReindexRequest.ts#L27-L103 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/reindex/ReindexRequest.ts#L27-L104 type Request struct { // Conflicts Set to proceed to continue reindexing even if there are conflicts. diff --git a/typedapi/core/reindex/response.go b/typedapi/core/reindex/response.go index 63817ea43d..bc7d845e4a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package reindex @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reindex // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/reindex/ReindexResponse.ts#L26-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/reindex/ReindexResponse.ts#L26-L45 type Response struct { Batches *int64 `json:"batches,omitempty"` Created *int64 `json:"created,omitempty"` diff --git a/typedapi/core/reindexrethrottle/reindex_rethrottle.go b/typedapi/core/reindexrethrottle/reindex_rethrottle.go index 3a851c5656..d339ba04d1 100644 --- a/typedapi/core/reindexrethrottle/reindex_rethrottle.go +++ b/typedapi/core/reindexrethrottle/reindex_rethrottle.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Copies documents from a source to a destination. +// Throttle a reindex operation. +// +// Change the number of requests per second for a particular reindex operation. package reindexrethrottle import ( @@ -76,7 +78,9 @@ func NewReindexRethrottleFunc(tp elastictransport.Interface) NewReindexRethrottl } } -// Copies documents from a source to a destination. +// Throttle a reindex operation. +// +// Change the number of requests per second for a particular reindex operation. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html func New(tp elastictransport.Interface) *ReindexRethrottle { diff --git a/typedapi/core/reindexrethrottle/response.go b/typedapi/core/reindexrethrottle/response.go index a1fb7f1de6..8e066a8736 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package reindexrethrottle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reindexrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/reindex_rethrottle/ReindexRethrottleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e669b02f60..5a029a2fc2 100644 --- a/typedapi/core/rendersearchtemplate/render_search_template.go +++ b/typedapi/core/rendersearchtemplate/render_search_template.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Renders a search template as a search request body. +// Render a search template. +// +// Render a search template as a search request body. package rendersearchtemplate import ( @@ -79,7 +81,9 @@ func NewRenderSearchTemplateFunc(tp elastictransport.Interface) NewRenderSearchT } } -// Renders a search template as a search request body. +// Render a search template. +// +// Render a search template as a search request body. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html func New(tp elastictransport.Interface) *RenderSearchTemplate { diff --git a/typedapi/core/rendersearchtemplate/request.go b/typedapi/core/rendersearchtemplate/request.go index d33b139c2a..305ed560f3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package rendersearchtemplate @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package rendersearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L58 type Request struct { File *string `json:"file,omitempty"` // Params Key-value pairs used to replace Mustache variables in the template. diff --git a/typedapi/core/rendersearchtemplate/response.go b/typedapi/core/rendersearchtemplate/response.go index 19a11a5265..ab651f2539 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package rendersearchtemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package rendersearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/render_search_template/RenderSearchTemplateResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 8e068fb7be..5f616b3b1b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package scriptspainlessexecute @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package scriptspainlessexecute // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L48 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 efdab61c51..61e6a624ad 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package scriptspainlessexecute @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package scriptspainlessexecute // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/scripts_painless_execute/ExecutePainlessScriptResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4a9b5994a6..333eb387e9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Run a script. // Runs a script and returns a result. diff --git a/typedapi/core/scroll/request.go b/typedapi/core/scroll/request.go index 5370f5c2f0..6a32b1c620 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package scroll @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package scroll // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/scroll/ScrollRequest.ts#L24-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/scroll/ScrollRequest.ts#L24-L75 type Request struct { // Scroll Period to retain the search context for scrolling. diff --git a/typedapi/core/scroll/response.go b/typedapi/core/scroll/response.go index dfa0febd0b..3cea3c98ed 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package scroll @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package scroll // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/scroll/ScrollResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/scroll/ScrollResponse.ts#L22-L24 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` @@ -504,6 +504,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := types.NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := types.NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/core/scroll/scroll.go b/typedapi/core/scroll/scroll.go index 3569e24b8a..4b7e31b4b9 100644 --- a/typedapi/core/scroll/scroll.go +++ b/typedapi/core/scroll/scroll.go @@ -16,9 +16,34 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Allows to retrieve a large numbers of results from a single search request. +// 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. package scroll import ( @@ -75,7 +100,32 @@ func NewScrollFunc(tp elastictransport.Interface) NewScroll { } } -// Allows to retrieve a large numbers of results from a single search request. +// Run a scrolling search. +// +// IMPORTANT: The scroll API is no longer recommend for deep pagination. If you +// need to preserve the index state while paging through more than 10,000 hits, +// use the `search_after` parameter with a point in time (PIT). +// +// The scroll API gets large sets of results from a single scrolling search +// request. +// To get the necessary scroll ID, submit a search API request that includes an +// argument for the `scroll` query parameter. +// The `scroll` parameter indicates how long Elasticsearch should retain the +// search context for the request. +// The search response returns a scroll ID in the `_scroll_id` response body +// parameter. +// You can then use the scroll ID with the scroll API to retrieve the next batch +// of results for the request. +// If the Elasticsearch security features are enabled, the access to the results +// of a specific scroll ID is restricted to the user or API key that submitted +// the search. +// +// You can also use the scroll API to specify a new scroll parameter that +// extends or shortens the retention period for the search context. +// +// IMPORTANT: Results from a scrolling search reflect the state of the index at +// the time of the initial search request. Subsequent indexing or document +// changes only affect later search and scroll requests. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-scroll func New(tp elastictransport.Interface) *Scroll { diff --git a/typedapi/core/search/request.go b/typedapi/core/search/request.go index 9bf0eae0c3..68368469a2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package search @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/SearchRequest.ts#L54-L530 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/SearchRequest.ts#L54-L531 type Request struct { // Aggregations Defines the aggregations that are run as part of the search request. diff --git a/typedapi/core/search/response.go b/typedapi/core/search/response.go index 25f2df5dce..cd599d8c8c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/SearchResponse.ts#L34-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/SearchResponse.ts#L34-L36 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` @@ -504,6 +504,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := types.NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := types.NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/core/search/search.go b/typedapi/core/search/search.go index 66a42628ff..4f9cec32a1 100644 --- a/typedapi/core/search/search.go +++ b/typedapi/core/search/search.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns search hits that match the query defined in the request. +// 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. @@ -86,7 +88,9 @@ func NewSearchFunc(tp elastictransport.Interface) NewSearch { } } -// Returns search hits that match the query defined in the request. +// 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. diff --git a/typedapi/core/searchmvt/request.go b/typedapi/core/searchmvt/request.go index addc12ae59..760df336f0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package searchmvt @@ -35,7 +35,7 @@ import ( // Request holds the request body struct for the package searchmvt // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search_mvt/SearchMvtRequest.ts#L33-L190 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search_mvt/SearchMvtRequest.ts#L33-L193 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 6d1eb9b20f..edfbddd8b9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package searchmvt // Response holds the response body struct for the package searchmvt // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search_mvt/SearchMvtResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 0e0a0ff712..e032b47c85 100644 --- a/typedapi/core/searchmvt/search_mvt.go +++ b/typedapi/core/searchmvt/search_mvt.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Search a vector tile. -// Searches a vector tile for geospatial values. +// +// Search a vector tile for geospatial values. package searchmvt import ( @@ -105,7 +106,8 @@ func NewSearchMvtFunc(tp elastictransport.Interface) NewSearchMvt { } // Search a vector tile. -// Searches a vector tile for geospatial values. +// +// Search a vector tile for geospatial values. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-vector-tile-api.html func New(tp elastictransport.Interface) *SearchMvt { diff --git a/typedapi/core/searchshards/response.go b/typedapi/core/searchshards/response.go index 071101ce2d..f6c7cd88a4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package searchshards @@ -26,18 +26,18 @@ import ( // Response holds the response body struct for the package searchshards // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search_shards/SearchShardsResponse.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search_shards/SearchShardsResponse.ts#L34-L40 type Response struct { - Indices map[string]types.ShardStoreIndex `json:"indices"` - Nodes map[string]types.NodeAttributes `json:"nodes"` - Shards [][]types.NodeShard `json:"shards"` + Indices map[string]types.ShardStoreIndex `json:"indices"` + Nodes map[string]types.SearchShardsNodeAttributes `json:"nodes"` + Shards [][]types.NodeShard `json:"shards"` } // NewResponse returns a Response func NewResponse() *Response { r := &Response{ Indices: make(map[string]types.ShardStoreIndex, 0), - Nodes: make(map[string]types.NodeAttributes, 0), + Nodes: make(map[string]types.SearchShardsNodeAttributes, 0), } return r } diff --git a/typedapi/core/searchshards/search_shards.go b/typedapi/core/searchshards/search_shards.go index e1c28bf09b..2309a833de 100644 --- a/typedapi/core/searchshards/search_shards.go +++ b/typedapi/core/searchshards/search_shards.go @@ -16,10 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns information about the indices and shards that a search request would -// be executed against. +// 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. package searchshards import ( @@ -76,8 +81,13 @@ func NewSearchShardsFunc(tp elastictransport.Interface) NewSearchShards { } } -// Returns information about the indices and shards that a search request would -// be executed against. +// 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html func New(tp elastictransport.Interface) *SearchShards { diff --git a/typedapi/core/searchtemplate/request.go b/typedapi/core/searchtemplate/request.go index 9892bd2a21..f747015f12 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package searchtemplate @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package searchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search_template/SearchTemplateRequest.ts#L32-L134 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search_template/SearchTemplateRequest.ts#L32-L136 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 f640edeaa2..81bc0e68ee 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package searchtemplate @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package searchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search_template/SearchTemplateResponse.ts#L30-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` @@ -504,6 +504,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := types.NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := types.NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/core/searchtemplate/search_template.go b/typedapi/core/searchtemplate/search_template.go index 85732c8416..74779971c9 100644 --- a/typedapi/core/searchtemplate/search_template.go +++ b/typedapi/core/searchtemplate/search_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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Runs a search with a search template. +// Run a search with a search template. package searchtemplate import ( @@ -81,7 +81,7 @@ func NewSearchTemplateFunc(tp elastictransport.Interface) NewSearchTemplate { } } -// Runs a search with a search template. +// Run a search with a search template. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html func New(tp elastictransport.Interface) *SearchTemplate { diff --git a/typedapi/core/termsenum/request.go b/typedapi/core/termsenum/request.go index 1c03ffe77b..fcbc4a6bdf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package termsenum @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package termsenum // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/terms_enum/TermsEnumRequest.ts#L26-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/terms_enum/TermsEnumRequest.ts#L26-L75 type Request struct { // CaseInsensitive When true the provided search string is matched against index terms without diff --git a/typedapi/core/termsenum/response.go b/typedapi/core/termsenum/response.go index 4b3edb4466..662d0e7541 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package termsenum @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package termsenum // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/terms_enum/TermsEnumResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/terms_enum/TermsEnumResponse.ts#L22-L28 type Response struct { Complete bool `json:"complete"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/core/termsenum/terms_enum.go b/typedapi/core/termsenum/terms_enum.go index b72e04377e..f26fd6ee93 100644 --- a/typedapi/core/termsenum/terms_enum.go +++ b/typedapi/core/termsenum/terms_enum.go @@ -16,11 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// The terms enum API can be used to discover terms in the index that begin -// with the provided string. It is designed for low-latency look-ups used in +// Get terms in an index. +// +// Discover terms that match a partial string in an index. +// This "terms enum" API is designed for low-latency look-ups used in // auto-complete scenarios. +// +// If the `complete` property in the response is false, the returned terms set +// may be incomplete and should be treated as approximate. +// This can occur due to a few reasons, such as a request timeout or a node +// error. +// +// NOTE: 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. package termsenum import ( @@ -83,10 +95,22 @@ func NewTermsEnumFunc(tp elastictransport.Interface) NewTermsEnum { } } -// The terms enum API can be used to discover terms in the index that begin -// with the provided string. It is designed for low-latency look-ups used in +// Get terms in an index. +// +// Discover terms that match a partial string in an index. +// This "terms enum" API is designed for low-latency look-ups used in // auto-complete scenarios. // +// If the `complete` property in the response is false, the returned terms set +// may be incomplete and should be treated as approximate. +// This can occur due to a few reasons, such as a request timeout or a node +// error. +// +// NOTE: The terms enum API may return terms from deleted documents. Deleted +// documents are initially only marked as deleted. It is not until their +// segments are merged that documents are actually deleted. Until that happens, +// the terms enum API will return terms from these documents. +// // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html func New(tp elastictransport.Interface) *TermsEnum { r := &TermsEnum{ diff --git a/typedapi/core/termvectors/request.go b/typedapi/core/termvectors/request.go index f99c3cfdb9..1813164960 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package termvectors @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package termvectors // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/termvectors/TermVectorsRequest.ts#L33-L120 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/termvectors/TermVectorsRequest.ts#L33-L122 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 3d42fc37ce..5bd20b6e30 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package termvectors @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package termvectors // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/termvectors/TermVectorsResponse.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 fc32c0057a..cdcf5a1dac 100644 --- a/typedapi/core/termvectors/termvectors.go +++ b/typedapi/core/termvectors/termvectors.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get term vector information. -// Returns information and statistics about terms in the fields of a particular +// +// Get information and statistics about terms in the fields of a particular // document. package termvectors @@ -88,7 +89,8 @@ func NewTermvectorsFunc(tp elastictransport.Interface) NewTermvectors { } // Get term vector information. -// Returns information and statistics about terms in the fields of a particular +// +// Get information and statistics about terms in the fields of a particular // document. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html diff --git a/typedapi/core/update/request.go b/typedapi/core/update/request.go index a14e59c9c0..8307e15b0d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package update @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/update/UpdateRequest.ts#L38-L153 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/update/UpdateRequest.ts#L38-L154 type Request struct { // DetectNoop Set to false to disable setting 'result' in the response diff --git a/typedapi/core/update/response.go b/typedapi/core/update/response.go index 467b8fba0f..45f6d8f92a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package update @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/update/UpdateResponse.ts#L27-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/update/UpdateResponse.ts#L27-L29 type Response struct { ForcedRefresh *bool `json:"forced_refresh,omitempty"` Get *types.InlineGet `json:"get,omitempty"` diff --git a/typedapi/core/update/update.go b/typedapi/core/update/update.go index 64432df232..0c195c0e17 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Update a document. // Updates a document by running a script or passing a partial document. diff --git a/typedapi/core/updatebyquery/request.go b/typedapi/core/updatebyquery/request.go index 9798f42605..7ea5dc9372 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatebyquery @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package updatebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/update_by_query/UpdateByQueryRequest.ts#L37-L222 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/update_by_query/UpdateByQueryRequest.ts#L37-L227 type Request struct { // Conflicts What to do if update by query hits version conflicts: `abort` or `proceed`. diff --git a/typedapi/core/updatebyquery/response.go b/typedapi/core/updatebyquery/response.go index 71f56d568a..05fdd3515a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatebyquery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/update_by_query/UpdateByQueryResponse.ts#L26-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/update_by_query/UpdateByQueryResponse.ts#L26-L45 type Response struct { Batches *int64 `json:"batches,omitempty"` Deleted *int64 `json:"deleted,omitempty"` diff --git a/typedapi/core/updatebyquery/update_by_query.go b/typedapi/core/updatebyquery/update_by_query.go index e4f65cafe8..7bd3345497 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Update documents. // Updates documents that match the specified query. @@ -435,6 +435,14 @@ func (r *UpdateByQuery) Preference(preference string) *UpdateByQuery { return r } +// Q Query in the Lucene query string syntax. +// API name: q +func (r *UpdateByQuery) Q(q string) *UpdateByQuery { + r.values.Set("q", q) + + return r +} + // Refresh If `true`, Elasticsearch refreshes affected shards to make the operation // visible to search. // API name: refresh diff --git a/typedapi/core/updatebyqueryrethrottle/response.go b/typedapi/core/updatebyqueryrethrottle/response.go index 2311c0fbc2..bb043f732e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatebyqueryrethrottle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatebyqueryrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 80293e8a26..f0bb8a4ac8 100644 --- a/typedapi/core/updatebyqueryrethrottle/update_by_query_rethrottle.go +++ b/typedapi/core/updatebyqueryrethrottle/update_by_query_rethrottle.go @@ -16,10 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Changes the number of requests per second for a particular Update By Query +// 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. package updatebyqueryrethrottle import ( @@ -77,8 +82,13 @@ func NewUpdateByQueryRethrottleFunc(tp elastictransport.Interface) NewUpdateByQu } } -// Changes the number of requests per second for a particular Update By Query +// Throttle an update by query operation. +// +// Change the number of requests per second for a particular update by query // operation. +// Rethrottling that speeds up the query takes effect immediately but +// rethrotting that slows down the query takes effect after completing the +// current batch to prevent scroll timeouts. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html func New(tp elastictransport.Interface) *UpdateByQueryRethrottle { diff --git a/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go b/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go index 0d6b48791d..93d50db710 100644 --- a/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go +++ b/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go @@ -16,9 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes the specified dangling index +// 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. package deletedanglingindex import ( @@ -76,7 +82,13 @@ func NewDeleteDanglingIndexFunc(tp elastictransport.Interface) NewDeleteDangling } } -// Deletes the specified dangling index +// Delete a dangling index. +// +// If Elasticsearch encounters index data that is absent from the current +// cluster state, those indices are considered to be dangling. +// For example, this can happen if you delete more than +// `cluster.indices.tombstones.size` indices while an Elasticsearch node is +// offline. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html func New(tp elastictransport.Interface) *DeleteDanglingIndex { @@ -288,7 +300,8 @@ func (r *DeleteDanglingIndex) Header(key, value string) *DeleteDanglingIndex { return r } -// IndexUuid The UUID of the dangling index +// IndexUuid The UUID of the index to delete. Use the get dangling indices API to find the +// UUID. // API Name: indexuuid func (r *DeleteDanglingIndex) _indexuuid(indexuuid string) *DeleteDanglingIndex { r.paramSet |= indexuuidMask @@ -297,7 +310,8 @@ func (r *DeleteDanglingIndex) _indexuuid(indexuuid string) *DeleteDanglingIndex return r } -// AcceptDataLoss Must be set to true in order to delete the dangling index +// AcceptDataLoss This parameter must be set to true to acknowledge that it will no longer be +// possible to recove data from the dangling index. // API name: accept_data_loss func (r *DeleteDanglingIndex) AcceptDataLoss(acceptdataloss bool) *DeleteDanglingIndex { r.values.Set("accept_data_loss", strconv.FormatBool(acceptdataloss)) diff --git a/typedapi/danglingindices/deletedanglingindex/response.go b/typedapi/danglingindices/deletedanglingindex/response.go index 7063cecc10..776be27af1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletedanglingindex // Response holds the response body struct for the package deletedanglingindex // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/dangling_indices/delete_dangling_index/DeleteDanglingIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/dangling_indices/delete_dangling_index/DeleteDanglingIndexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/danglingindices/importdanglingindex/import_dangling_index.go b/typedapi/danglingindices/importdanglingindex/import_dangling_index.go index d0a0f8b4ac..e5cdbfc2bc 100644 --- a/typedapi/danglingindices/importdanglingindex/import_dangling_index.go +++ b/typedapi/danglingindices/importdanglingindex/import_dangling_index.go @@ -16,9 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Imports the specified dangling index +// 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. package importdanglingindex import ( @@ -76,7 +82,13 @@ func NewImportDanglingIndexFunc(tp elastictransport.Interface) NewImportDangling } } -// Imports the specified dangling index +// Import a dangling index. +// +// If Elasticsearch encounters index data that is absent from the current +// cluster state, those indices are considered to be dangling. +// For example, this can happen if you delete more than +// `cluster.indices.tombstones.size` indices while an Elasticsearch node is +// offline. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html func New(tp elastictransport.Interface) *ImportDanglingIndex { @@ -288,7 +300,8 @@ func (r *ImportDanglingIndex) Header(key, value string) *ImportDanglingIndex { return r } -// IndexUuid The UUID of the dangling index +// IndexUuid The UUID of the index to import. Use the get dangling indices API to locate +// the UUID. // API Name: indexuuid func (r *ImportDanglingIndex) _indexuuid(indexuuid string) *ImportDanglingIndex { r.paramSet |= indexuuidMask @@ -297,7 +310,11 @@ func (r *ImportDanglingIndex) _indexuuid(indexuuid string) *ImportDanglingIndex return r } -// AcceptDataLoss Must be set to true in order to import the dangling index +// AcceptDataLoss This parameter must be set to true to import a dangling index. +// Because Elasticsearch cannot know where the dangling index data came from or +// determine which shard copies are fresh and which are stale, it cannot +// guarantee that the imported data represents the latest state of the index +// when it was last in the cluster. // API name: accept_data_loss func (r *ImportDanglingIndex) AcceptDataLoss(acceptdataloss bool) *ImportDanglingIndex { r.values.Set("accept_data_loss", strconv.FormatBool(acceptdataloss)) diff --git a/typedapi/danglingindices/importdanglingindex/response.go b/typedapi/danglingindices/importdanglingindex/response.go index e0bdc2bc50..df67b6cdf5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package importdanglingindex // Response holds the response body struct for the package importdanglingindex // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/dangling_indices/import_dangling_index/ImportDanglingIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/dangling_indices/import_dangling_index/ImportDanglingIndexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go b/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go index b01814a660..654de36fef 100644 --- a/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go +++ b/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go @@ -16,9 +16,17 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns all dangling indices. +// 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. package listdanglingindices import ( @@ -68,7 +76,15 @@ func NewListDanglingIndicesFunc(tp elastictransport.Interface) NewListDanglingIn } } -// Returns all dangling indices. +// Get the dangling indices. +// +// If Elasticsearch encounters index data that is absent from the current +// cluster state, those indices are considered to be dangling. +// For example, this can happen if you delete more than +// `cluster.indices.tombstones.size` indices while an Elasticsearch node is +// offline. +// +// Use this API to list dangling indices, which you can then import or delete. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html func New(tp elastictransport.Interface) *ListDanglingIndices { diff --git a/typedapi/danglingindices/listdanglingindices/response.go b/typedapi/danglingindices/listdanglingindices/response.go index f02ad3c28f..02a27664c8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package listdanglingindices @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package listdanglingindices // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f6279f635e..f8f64d6580 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete an enrich policy. // Deletes an existing enrich policy and its enrich index. diff --git a/typedapi/enrich/deletepolicy/response.go b/typedapi/enrich/deletepolicy/response.go index 4e9e9cdfc7..bebb54645b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletepolicy // Response holds the response body struct for the package deletepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/enrich/executepolicy/execute_policy.go b/typedapi/enrich/executepolicy/execute_policy.go index 5745e0cd09..e8be9bec00 100644 --- a/typedapi/enrich/executepolicy/execute_policy.go +++ b/typedapi/enrich/executepolicy/execute_policy.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates the enrich index for an existing enrich policy. +// Run an enrich policy. +// Create the enrich index for an existing enrich policy. package executepolicy import ( @@ -76,7 +77,8 @@ func NewExecutePolicyFunc(tp elastictransport.Interface) NewExecutePolicy { } } -// Creates the enrich index for an existing enrich policy. +// Run an enrich policy. +// Create the enrich index for an existing enrich policy. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html func New(tp elastictransport.Interface) *ExecutePolicy { diff --git a/typedapi/enrich/executepolicy/response.go b/typedapi/enrich/executepolicy/response.go index 0054ed1819..8f1f2647af 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package executepolicy @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package executepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28 type Response struct { Status *types.ExecuteEnrichPolicyStatus `json:"status,omitempty"` TaskId types.TaskId `json:"task_id,omitempty"` diff --git a/typedapi/enrich/getpolicy/get_policy.go b/typedapi/enrich/getpolicy/get_policy.go index 5fb660ad17..9263642685 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get an enrich policy. // Returns information about an enrich policy. diff --git a/typedapi/enrich/getpolicy/response.go b/typedapi/enrich/getpolicy/response.go index b6819e6a14..21ee8c6e42 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getpolicy @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/get_policy/GetEnrichPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 de4638ba44..8056841ae1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create an enrich policy. // Creates an enrich policy. diff --git a/typedapi/enrich/putpolicy/request.go b/typedapi/enrich/putpolicy/request.go index 7e77a4217d..f8dc204b0a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putpolicy @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/put_policy/PutEnrichPolicyRequest.ts#L24-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/enrich/put_policy/PutEnrichPolicyRequest.ts#L24-L53 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 a2efa39e76..78634bd158 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putpolicy // Response holds the response body struct for the package putpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/put_policy/PutEnrichPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/enrich/put_policy/PutEnrichPolicyResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/enrich/stats/response.go b/typedapi/enrich/stats/response.go index 39f98b3285..68dbb9109f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/stats/EnrichStatsResponse.ts#L22-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 8f151671fa..71963d089e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get enrich stats. // Returns enrich coordinator statistics and information about enrich policies diff --git a/typedapi/eql/delete/delete.go b/typedapi/eql/delete/delete.go index 5883882669..58c167dbcd 100644 --- a/typedapi/eql/delete/delete.go +++ b/typedapi/eql/delete/delete.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes an async EQL search or a stored synchronous EQL search. +// Delete an async EQL search. +// Delete an async EQL search or a stored synchronous EQL search. // The API also deletes results for the search. package delete @@ -77,7 +78,8 @@ func NewDeleteFunc(tp elastictransport.Interface) NewDelete { } } -// Deletes an async EQL search or a stored synchronous EQL search. +// 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/guide/en/elasticsearch/reference/current/eql-search-api.html diff --git a/typedapi/eql/delete/response.go b/typedapi/eql/delete/response.go index 0a6648e998..3e9a45df8d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/eql/delete/EqlDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/eql/delete/EqlDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/eql/get/get.go b/typedapi/eql/get/get.go index 88ebae449a..e71a7598de 100644 --- a/typedapi/eql/get/get.go +++ b/typedapi/eql/get/get.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns the current status and available results for an async EQL search or a +// Get async EQL search results. +// Get the current status and available results for an async EQL search or a // stored synchronous EQL search. package get @@ -77,7 +78,8 @@ func NewGetFunc(tp elastictransport.Interface) NewGet { } } -// Returns the current status and available results for an async EQL search or a +// Get async EQL search results. +// Get the current status and available results for an async EQL search or a // stored synchronous EQL search. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-search-api.html diff --git a/typedapi/eql/get/response.go b/typedapi/eql/get/response.go index bfc08c1828..b4a6c74b8a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/eql/get/EqlGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/eql/get/EqlGetResponse.ts#L22-L24 type Response struct { // Hits Contains matching events and sequences. Also contains related metadata. diff --git a/typedapi/eql/getstatus/get_status.go b/typedapi/eql/getstatus/get_status.go index 0895d44bc6..35bff293d4 100644 --- a/typedapi/eql/getstatus/get_status.go +++ b/typedapi/eql/getstatus/get_status.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns the current status for an async EQL search or a stored synchronous -// EQL search without returning results. +// Get the async EQL status. +// Get the current status for an async EQL search or a stored synchronous EQL +// search without returning results. package getstatus import ( @@ -77,8 +78,9 @@ func NewGetStatusFunc(tp elastictransport.Interface) NewGetStatus { } } -// Returns the current status for an async EQL search or a stored synchronous -// EQL search without returning results. +// Get the async EQL status. +// Get the current status for an async EQL search or a stored synchronous EQL +// search without returning results. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-status-api.html func New(tp elastictransport.Interface) *GetStatus { diff --git a/typedapi/eql/getstatus/response.go b/typedapi/eql/getstatus/response.go index ac90878a12..89400655bd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getstatus // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/eql/get_status/EqlGetStatusResponse.ts#L24-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 9d09714e6e..37a3ad68d9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package search @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/eql/search/EqlSearchRequest.ts#L28-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/eql/search/EqlSearchRequest.ts#L28-L122 type Request struct { CaseSensitive *bool `json:"case_sensitive,omitempty"` // EventCategoryField Field containing the event classification, such as process, file, or network. diff --git a/typedapi/eql/search/response.go b/typedapi/eql/search/response.go index 62a849fb97..9d527fc8d1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package search @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/eql/search/EqlSearchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/eql/search/EqlSearchResponse.ts#L22-L24 type Response struct { // Hits Contains matching events and sequences. Also contains related metadata. diff --git a/typedapi/eql/search/search.go b/typedapi/eql/search/search.go index ee52fcc9c0..e916a56912 100644 --- a/typedapi/eql/search/search.go +++ b/typedapi/eql/search/search.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns results matching a query expressed in Event Query Language (EQL) +// 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. package search import ( @@ -83,7 +85,9 @@ func NewSearchFunc(tp elastictransport.Interface) NewSearch { } } -// Returns results matching a query expressed in Event Query Language (EQL) +// Get EQL search results. +// Returns search results for an Event Query Language (EQL) query. +// EQL assumes each document in a data stream or index corresponds to an event. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html func New(tp elastictransport.Interface) *Search { diff --git a/typedapi/esql/asyncquery/async_query.go b/typedapi/esql/asyncquery/async_query.go index fd0dc9a824..563ef1baf4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Executes an ESQL request asynchronously package asyncquery diff --git a/typedapi/esql/query/helpers.go b/typedapi/esql/query/helpers.go index bde2cb2c4e..47db6ae65d 100644 --- a/typedapi/esql/query/helpers.go +++ b/typedapi/esql/query/helpers.go @@ -24,6 +24,8 @@ import ( "errors" "fmt" "io" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/esqlformat" ) type metadata struct { @@ -41,7 +43,7 @@ type esqlResponse struct { func Helper[T any](ctx context.Context, esqlQuery *Query) ([]T, error) { response, err := esqlQuery. Columnar(false). - Format("json"). + Format(esqlformat.Json). Header("x-elastic-client-meta", "h=qo"). Do(ctx) if err != nil { @@ -142,7 +144,7 @@ func (d iterator[T]) Next() (*T, error) { func NewIteratorHelper[T any](ctx context.Context, query *Query) (EsqlIterator[T], error) { response, err := query. Columnar(false). - Format("json"). + Format(esqlformat.Json). Header("x-elastic-client-meta", "h=qo"). Perform(ctx) if err != nil { diff --git a/typedapi/esql/query/query.go b/typedapi/esql/query/query.go index ea4a95d2a9..856a7537e5 100644 --- a/typedapi/esql/query/query.go +++ b/typedapi/esql/query/query.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Executes an ES|QL request +// Run an ES|QL query. +// Get search results for an ES|QL (Elasticsearch query language) query. package query import ( @@ -35,6 +36,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/esqlformat" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -73,7 +75,8 @@ func NewQueryFunc(tp elastictransport.Interface) NewQuery { } } -// Executes an ES|QL request +// Run an ES|QL query. +// Get search results for an ES|QL (Elasticsearch query language) query. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-rest.html func New(tp elastictransport.Interface) *Query { @@ -292,8 +295,8 @@ func (r *Query) Header(key, value string) *Query { // Format A short version of the Accept header, e.g. json, yaml. // API name: format -func (r *Query) Format(format string) *Query { - r.values.Set("format", format) +func (r *Query) Format(format esqlformat.EsqlFormat) *Query { + r.values.Set("format", format.String()) return r } diff --git a/typedapi/esql/query/request.go b/typedapi/esql/query/request.go index 39d82f4199..bf26c22651 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package query @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/esql/query/QueryRequest.ts#L26-L89 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/esql/query/QueryRequest.ts#L26-L91 type Request struct { // Columnar By default, ES|QL returns results as rows. For example, FROM returns each diff --git a/typedapi/esql/query/response.go b/typedapi/esql/query/response.go index b3a9a1b29f..20a2a1aed9 100644 --- a/typedapi/esql/query/response.go +++ b/typedapi/esql/query/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package query // Response holds the response body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/esql/query/QueryResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/esql/query/QueryResponse.ts#L22-L25 type Response = []byte diff --git a/typedapi/features/getfeatures/get_features.go b/typedapi/features/getfeatures/get_features.go index 496a114135..8720d127be 100644 --- a/typedapi/features/getfeatures/get_features.go +++ b/typedapi/features/getfeatures/get_features.go @@ -16,10 +16,26 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Gets a list of features which can be included in snapshots using the -// feature_states field when creating a snapshot +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package getfeatures import ( @@ -69,8 +85,24 @@ func NewGetFeaturesFunc(tp elastictransport.Interface) NewGetFeatures { } } -// Gets a list of features which can be included in snapshots using the -// feature_states field when creating a snapshot +// Get the features. +// Get a list of features that can be included in snapshots using the +// `feature_states` field when creating a snapshot. +// You can use this API to determine which feature states to include when taking +// a snapshot. +// By default, all feature states are included in a snapshot if that snapshot +// includes the global state, or none if it does not. +// +// A feature state includes one or more system indices necessary for a given +// feature to function. +// In order to ensure data integrity, all system indices that comprise a feature +// state are snapshotted and restored together. +// +// The features listed by this API are a combination of built-in features and +// features defined by plugins. +// In order for a feature state to be listed in this API and recognized as a +// valid feature state by the create snapshot API, the plugin that defines that +// feature must be installed on the master node. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-features-api.html func New(tp elastictransport.Interface) *GetFeatures { diff --git a/typedapi/features/getfeatures/response.go b/typedapi/features/getfeatures/response.go index 222f42313d..c8ed224a07 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getfeatures @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfeatures // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/features/get_features/GetFeaturesResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4b4b6ce029..b17abca1bc 100644 --- a/typedapi/features/resetfeatures/reset_features.go +++ b/typedapi/features/resetfeatures/reset_features.go @@ -16,9 +16,33 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Resets the internal state of features, usually by deleting system indices +// 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. package resetfeatures import ( @@ -68,7 +92,31 @@ func NewResetFeaturesFunc(tp elastictransport.Interface) NewResetFeatures { } } -// Resets the internal state of features, usually by deleting system indices +// Reset the features. +// Clear all of the state information stored in system indices by Elasticsearch +// features, including the security and machine learning indices. +// +// WARNING: Intended for development and testing use only. Do not reset features +// on a production cluster. +// +// Return a cluster to the same state as a new installation by resetting the +// feature state for all Elasticsearch features. +// This deletes all state information stored in system indices. +// +// The response code is HTTP 200 if the state is successfully reset for all +// features. +// It is HTTP 500 if the reset operation failed for any feature. +// +// Note that select features might provide a way to reset particular system +// indices. +// Using this API resets all features, both those that are built-in and +// implemented as plugins. +// +// To list the features that will be affected, use the get features API. +// +// IMPORTANT: The features installed on the node you submit this request to are +// the features that will be reset. Run on the master node if you have any +// doubts about which plugins are installed on individual nodes. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html func New(tp elastictransport.Interface) *ResetFeatures { diff --git a/typedapi/features/resetfeatures/response.go b/typedapi/features/resetfeatures/response.go index 470d90a062..0f3d080a84 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package resetfeatures @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resetfeatures // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/features/reset_features/ResetFeaturesResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 2851562b2d..5ab6bc134a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns the current global checkpoints for an index. This API is design for // internal use by the fleet server project. diff --git a/typedapi/fleet/globalcheckpoints/response.go b/typedapi/fleet/globalcheckpoints/response.go index 48e6c0b0e1..3139a5e563 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package globalcheckpoints // Response holds the response body struct for the package globalcheckpoints // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/fleet/global_checkpoints/GlobalCheckpointsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4c9b3508ca..e6e3839889 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Executes several [fleet // searches](https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-search.html) diff --git a/typedapi/fleet/msearch/request.go b/typedapi/fleet/msearch/request.go index 841a086197..f93db722d3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package msearch @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/fleet/msearch/MultiSearchRequest.ts#L32-L115 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/fleet/msearch/MultiSearchRequest.ts#L31-L114 type Request = []types.MsearchRequestItem diff --git a/typedapi/fleet/msearch/response.go b/typedapi/fleet/msearch/response.go index f9da10f850..8dc2df8c7d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package msearch @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/fleet/msearch/MultiSearchResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 7ab977cc6b..82e08116af 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Creates a secret stored by Fleet. package postsecret diff --git a/typedapi/fleet/search/request.go b/typedapi/fleet/search/request.go index da5be08569..e18afe597d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package search @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/fleet/search/SearchRequest.ts#L55-L260 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/fleet/search/SearchRequest.ts#L55-L260 type Request struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Collapse *types.FieldCollapse `json:"collapse,omitempty"` diff --git a/typedapi/fleet/search/response.go b/typedapi/fleet/search/response.go index b63d2273aa..9a2011f6f5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/fleet/search/SearchResponse.ts#L33-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/fleet/search/SearchResponse.ts#L33-L50 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` @@ -504,6 +504,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := types.NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := types.NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/fleet/search/search.go b/typedapi/fleet/search/search.go index 7f616c7f52..3bcce08681 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // The purpose of the fleet search api is to provide a search api where the // search will only be executed diff --git a/typedapi/graph/explore/explore.go b/typedapi/graph/explore/explore.go index 968bd9bdbe..90e9c7cf1b 100644 --- a/typedapi/graph/explore/explore.go +++ b/typedapi/graph/explore/explore.go @@ -16,10 +16,19 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Extracts and summarizes information about the documents and terms in an +// 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. package explore import ( @@ -82,8 +91,17 @@ func NewExploreFunc(tp elastictransport.Interface) NewExplore { } } -// Extracts and summarizes information about the documents and terms in an +// Explore graph analytics. +// Extract and summarize information about the documents and terms in an // Elasticsearch data stream or index. +// The easiest way to understand the behavior of this API is to use the Graph UI +// to explore connections. +// An initial request to the `_explore` API contains a seed query that +// identifies the documents of interest and specifies the fields that define the +// vertices and connections you want to include in the graph. +// Subsequent requests enable you to spider out from one more vertices of +// interest. +// You can exclude vertices that have already been returned. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html func New(tp elastictransport.Interface) *Explore { diff --git a/typedapi/graph/explore/request.go b/typedapi/graph/explore/request.go index f97875687b..0a1b8d6977 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package explore @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package explore // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/graph/explore/GraphExploreRequest.ts#L28-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/graph/explore/GraphExploreRequest.ts#L28-L78 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 97170a73ee..a9d35b9113 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package explore @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explore // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/graph/explore/GraphExploreResponse.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 baee0e06f7..4a5ca683f1 100644 --- a/typedapi/ilm/deletelifecycle/delete_lifecycle.go +++ b/typedapi/ilm/deletelifecycle/delete_lifecycle.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes the specified lifecycle policy definition. 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. +// 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. package deletelifecycle import ( @@ -78,9 +78,9 @@ func NewDeleteLifecycleFunc(tp elastictransport.Interface) NewDeleteLifecycle { } } -// Deletes the specified lifecycle policy definition. 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. +// Delete a lifecycle policy. +// You cannot delete policies that are currently in use. If the policy is being +// used to manage any indices, the request fails and returns an error. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html func New(tp elastictransport.Interface) *DeleteLifecycle { diff --git a/typedapi/ilm/deletelifecycle/response.go b/typedapi/ilm/deletelifecycle/response.go index 28fddc7437..937678a31b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletelifecycle // Response holds the response body struct for the package deletelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/delete_lifecycle/DeleteLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/delete_lifecycle/DeleteLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/explainlifecycle/explain_lifecycle.go b/typedapi/ilm/explainlifecycle/explain_lifecycle.go index 72566e8f14..c35e0901af 100644 --- a/typedapi/ilm/explainlifecycle/explain_lifecycle.go +++ b/typedapi/ilm/explainlifecycle/explain_lifecycle.go @@ -16,12 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves information about the index’s current lifecycle state, such as the -// currently executing phase, action, and step. Shows when the index entered -// each one, the definition of the running phase, and information about any -// failures. +// 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. package explainlifecycle import ( @@ -79,10 +82,13 @@ func NewExplainLifecycleFunc(tp elastictransport.Interface) NewExplainLifecycle } } -// Retrieves information about the index’s current lifecycle state, such as the -// currently executing phase, action, and step. Shows when the index entered -// each one, the definition of the running phase, and information about any -// failures. +// Explain the lifecycle state. +// Get the current lifecycle status for one or more indices. +// For data streams, the API retrieves the current lifecycle status for the +// stream's backing indices. +// +// The response indicates when the index entered each lifecycle state, provides +// the definition of the running phase, and information about any failures. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html func New(tp elastictransport.Interface) *ExplainLifecycle { diff --git a/typedapi/ilm/explainlifecycle/response.go b/typedapi/ilm/explainlifecycle/response.go index d1c2d7074b..0c2648aeec 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package explainlifecycle @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package explainlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/explain_lifecycle/ExplainLifecycleResponse.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 aebef1ce21..3fa646a41f 100644 --- a/typedapi/ilm/getlifecycle/get_lifecycle.go +++ b/typedapi/ilm/getlifecycle/get_lifecycle.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves a lifecycle policy. +// Get lifecycle policies. package getlifecycle import ( @@ -74,7 +74,7 @@ func NewGetLifecycleFunc(tp elastictransport.Interface) NewGetLifecycle { } } -// Retrieves a lifecycle policy. +// Get lifecycle policies. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html func New(tp elastictransport.Interface) *GetLifecycle { diff --git a/typedapi/ilm/getlifecycle/response.go b/typedapi/ilm/getlifecycle/response.go index 40b5439996..75e648a98d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getlifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/get_lifecycle/GetLifecycleResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f2a6f8ecb2..9c4579fab9 100644 --- a/typedapi/ilm/getstatus/get_status.go +++ b/typedapi/ilm/getstatus/get_status.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves the current index lifecycle management (ILM) status. +// Get the ILM status. +// Get the current index lifecycle management status. package getstatus import ( @@ -68,7 +69,8 @@ func NewGetStatusFunc(tp elastictransport.Interface) NewGetStatus { } } -// Retrieves the current index lifecycle management (ILM) status. +// Get the ILM status. +// Get the current index lifecycle management status. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html func New(tp elastictransport.Interface) *GetStatus { diff --git a/typedapi/ilm/getstatus/response.go b/typedapi/ilm/getstatus/response.go index 6eb05f8e9c..350ae5aa3a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getstatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/get_status/GetIlmStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f913549dfc..7e4de7ee7c 100644 --- a/typedapi/ilm/migratetodatatiers/migrate_to_data_tiers.go +++ b/typedapi/ilm/migratetodatatiers/migrate_to_data_tiers.go @@ -16,14 +16,28 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Switches the indices, ILM policies, and legacy, composable and component -// templates from using custom node attributes and -// attribute-based allocation filters to using data tiers, and optionally -// deletes one legacy index template.+ +// 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`. package migratetodatatiers import ( @@ -78,13 +92,27 @@ func NewMigrateToDataTiersFunc(tp elastictransport.Interface) NewMigrateToDataTi } } -// Switches the indices, ILM policies, and legacy, composable and component -// templates from using custom node attributes and -// attribute-based allocation filters to using data tiers, and optionally -// deletes one legacy index template.+ +// Migrate to data tiers routing. +// Switch the indices, ILM policies, and legacy, composable, and component +// templates from using custom node attributes and attribute-based allocation +// filters to using data tiers. +// Optionally, delete one legacy index template. // Using node roles enables ILM to automatically move the indices between data // tiers. // +// Migrating away from custom node attributes routing can be manually performed. +// This API provides an automated way of performing three out of the four manual +// steps listed in the migration guide: +// +// 1. Stop setting the custom hot attribute on new indices. +// 1. Remove custom allocation settings from existing ILM policies. +// 1. Replace custom allocation settings from existing indices with the +// corresponding tier preference. +// +// ILM must be stopped before performing the migration. +// Use the stop ILM and get ILM status APIs to wait until the reported operation +// mode is `STOPPED`. +// // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html func New(tp elastictransport.Interface) *MigrateToDataTiers { r := &MigrateToDataTiers{ diff --git a/typedapi/ilm/migratetodatatiers/request.go b/typedapi/ilm/migratetodatatiers/request.go index 017ca42339..12c8cce080 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package migratetodatatiers @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package migratetodatatiers // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/migrate_to_data_tiers/Request.ts#L22-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/migrate_to_data_tiers/Request.ts#L22-L54 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 bcbebb83f4..5a15decb6d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package migratetodatatiers @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package migratetodatatiers // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/migrate_to_data_tiers/Response.ts#L22-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/migrate_to_data_tiers/Response.ts#L22-L32 type Response struct { DryRun bool `json:"dry_run"` MigratedComponentTemplates []string `json:"migrated_component_templates"` diff --git a/typedapi/ilm/movetostep/move_to_step.go b/typedapi/ilm/movetostep/move_to_step.go index 0550f62072..b17587a9b0 100644 --- a/typedapi/ilm/movetostep/move_to_step.go +++ b/typedapi/ilm/movetostep/move_to_step.go @@ -16,9 +16,32 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Manually moves an index into the specified step and executes that step. +// 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. package movetostep import ( @@ -81,7 +104,30 @@ func NewMoveToStepFunc(tp elastictransport.Interface) NewMoveToStep { } } -// Manually moves an index into the specified step and executes that step. +// Move to a lifecycle step. +// Manually move an index into a specific step in the lifecycle policy and run +// that step. +// +// WARNING: This operation can result in the loss of data. Manually moving an +// index into a specific step runs that step even if it has already been +// performed. This is a potentially destructive action and this should be +// considered an expert level API. +// +// You must specify both the current step and the step to be executed in the +// body of the request. +// The request will fail if the current step does not match the step currently +// running for the index +// This is to prevent the index from being moved from an unexpected step into +// the next step. +// +// When specifying the target (`next_step`) to which the index will be moved, +// either the name or both the action and name fields are optional. +// If only the phase is specified, the index will move to the first step of the +// first action in the target phase. +// If the phase and action are specified, the index will move to the first step +// of the specified action in the specified phase. +// Only actions specified in the ILM policy are considered valid. +// An index cannot move to a step that is not part of its policy. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html func New(tp elastictransport.Interface) *MoveToStep { @@ -362,7 +408,7 @@ func (r *MoveToStep) Pretty(pretty bool) *MoveToStep { // API name: current_step func (r *MoveToStep) CurrentStep(currentstep *types.StepKey) *MoveToStep { - r.req.CurrentStep = currentstep + r.req.CurrentStep = *currentstep return r } @@ -370,7 +416,7 @@ func (r *MoveToStep) CurrentStep(currentstep *types.StepKey) *MoveToStep { // API name: next_step func (r *MoveToStep) NextStep(nextstep *types.StepKey) *MoveToStep { - r.req.NextStep = nextstep + r.req.NextStep = *nextstep return r } diff --git a/typedapi/ilm/movetostep/request.go b/typedapi/ilm/movetostep/request.go index 4dfa9577f6..fe7049e841 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package movetostep @@ -29,10 +29,10 @@ import ( // Request holds the request body struct for the package movetostep // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/move_to_step/MoveToStepRequest.ts#L24-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/move_to_step/MoveToStepRequest.ts#L24-L51 type Request struct { - CurrentStep *types.StepKey `json:"current_step,omitempty"` - NextStep *types.StepKey `json:"next_step,omitempty"` + CurrentStep types.StepKey `json:"current_step"` + NextStep types.StepKey `json:"next_step"` } // NewRequest returns a Request diff --git a/typedapi/ilm/movetostep/response.go b/typedapi/ilm/movetostep/response.go index 9359dbc8fb..7b7f67dafd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package movetostep // Response holds the response body struct for the package movetostep // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/move_to_step/MoveToStepResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/move_to_step/MoveToStepResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/putlifecycle/put_lifecycle.go b/typedapi/ilm/putlifecycle/put_lifecycle.go index 1a0693a923..a5edc03602 100644 --- a/typedapi/ilm/putlifecycle/put_lifecycle.go +++ b/typedapi/ilm/putlifecycle/put_lifecycle.go @@ -16,10 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a lifecycle policy. If the specified policy exists, the policy is -// replaced and the policy version is incremented. +// 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. package putlifecycle import ( @@ -82,8 +86,12 @@ func NewPutLifecycleFunc(tp elastictransport.Interface) NewPutLifecycle { } } -// Creates a lifecycle policy. If the specified policy exists, the policy is -// replaced and the policy version is incremented. +// Create or update a lifecycle policy. +// If the specified policy exists, it is replaced and the policy version is +// incremented. +// +// NOTE: Only the latest version of the policy is stored, you cannot revert to +// previous versions. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html func New(tp elastictransport.Interface) *PutLifecycle { diff --git a/typedapi/ilm/putlifecycle/request.go b/typedapi/ilm/putlifecycle/request.go index f28f91a99d..741296e1fb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putlifecycle @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/put_lifecycle/PutLifecycleRequest.ts#L25-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/put_lifecycle/PutLifecycleRequest.ts#L25-L59 type Request struct { Policy *types.IlmPolicy `json:"policy,omitempty"` } diff --git a/typedapi/ilm/putlifecycle/response.go b/typedapi/ilm/putlifecycle/response.go index 72049852c8..9795a03dc1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putlifecycle // Response holds the response body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/put_lifecycle/PutLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/put_lifecycle/PutLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/removepolicy/remove_policy.go b/typedapi/ilm/removepolicy/remove_policy.go index 5c04787210..17a593f454 100644 --- a/typedapi/ilm/removepolicy/remove_policy.go +++ b/typedapi/ilm/removepolicy/remove_policy.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Removes the assigned lifecycle policy and stops managing the specified index +// 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. package removepolicy import ( @@ -76,7 +79,10 @@ func NewRemovePolicyFunc(tp elastictransport.Interface) NewRemovePolicy { } } -// Removes the assigned lifecycle policy and stops managing the specified index +// Remove policies from an index. +// Remove the assigned lifecycle policies from an index or a data stream's +// backing indices. +// It also stops managing the indices. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html func New(tp elastictransport.Interface) *RemovePolicy { diff --git a/typedapi/ilm/removepolicy/response.go b/typedapi/ilm/removepolicy/response.go index f6bcb39224..93762137d0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package removepolicy // Response holds the response body struct for the package removepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/remove_policy/RemovePolicyResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 0e9a7061b6..137147d7e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package retry // Response holds the response body struct for the package retry // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/retry/RetryIlmResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/retry/RetryIlmResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/retry/retry.go b/typedapi/ilm/retry/retry.go index 6e9d0a6b2e..6baf308426 100644 --- a/typedapi/ilm/retry/retry.go +++ b/typedapi/ilm/retry/retry.go @@ -16,9 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Retries executing the policy for an index that is in the ERROR step. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package retry import ( @@ -76,7 +81,12 @@ func NewRetryFunc(tp elastictransport.Interface) NewRetry { } } -// Retries executing the policy for an index that is in the ERROR step. +// Retry a policy. +// Retry running the lifecycle policy for an index that is in the ERROR step. +// The API sets the policy back to the step where the error occurred and runs +// the step. +// Use the explain lifecycle state API to determine whether an index is in the +// ERROR step. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html func New(tp elastictransport.Interface) *Retry { diff --git a/typedapi/ilm/start/response.go b/typedapi/ilm/start/response.go index 91ff2af963..7b74cf2a60 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/start/StartIlmResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/start/StartIlmResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/start/start.go b/typedapi/ilm/start/start.go index 2d6ba513a1..6eee7a0895 100644 --- a/typedapi/ilm/start/start.go +++ b/typedapi/ilm/start/start.go @@ -16,9 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Start the index lifecycle management (ILM) plugin. +// 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. package start import ( @@ -68,7 +72,11 @@ func NewStartFunc(tp elastictransport.Interface) NewStart { } } -// Start the index lifecycle management (ILM) plugin. +// Start the ILM plugin. +// Start the index lifecycle management plugin if it is currently stopped. +// ILM is started automatically when the cluster is formed. +// Restarting ILM is necessary only when it has been stopped using the stop ILM +// API. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html func New(tp elastictransport.Interface) *Start { diff --git a/typedapi/ilm/stop/response.go b/typedapi/ilm/stop/response.go index 2c7c59b2a1..bcf57b4008 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/stop/StopIlmResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/stop/StopIlmResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/stop/stop.go b/typedapi/ilm/stop/stop.go index 69e04411c9..cc775ebc49 100644 --- a/typedapi/ilm/stop/stop.go +++ b/typedapi/ilm/stop/stop.go @@ -16,10 +16,18 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Halts all lifecycle management operations and stops the index lifecycle -// management (ILM) plugin +// 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. package stop import ( @@ -69,8 +77,16 @@ func NewStopFunc(tp elastictransport.Interface) NewStop { } } -// Halts all lifecycle management operations and stops the index lifecycle -// management (ILM) plugin +// Stop the ILM plugin. +// Halt all lifecycle management operations and stop the index lifecycle +// management plugin. +// This is useful when you are performing maintenance on the cluster and need to +// prevent ILM from performing any actions on your indices. +// +// The API returns as soon as the stop request has been acknowledged, but the +// plugin might continue to run until in-progress operations complete and the +// plugin can be safely stopped. +// Use the get ILM status API to check whether ILM is running. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html func New(tp elastictransport.Interface) *Stop { diff --git a/typedapi/indices/addblock/add_block.go b/typedapi/indices/addblock/add_block.go index 2977729907..b8d0ed837b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Add an index block. // Limits the operations allowed on an index by blocking specific operation diff --git a/typedapi/indices/addblock/response.go b/typedapi/indices/addblock/response.go index 31bfd899d5..89009ab9a9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package addblock @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package addblock // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/add_block/IndicesAddBlockResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/add_block/IndicesAddBlockResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Indices []types.IndicesBlockStatus `json:"indices"` diff --git a/typedapi/indices/analyze/analyze.go b/typedapi/indices/analyze/analyze.go index 0b775961f0..8ee3acb1aa 100644 --- a/typedapi/indices/analyze/analyze.go +++ b/typedapi/indices/analyze/analyze.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Performs analysis on a text string and returns the resulting tokens. +// Get tokens from text analysis. +// The analyze API performs +// [analysis](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html) +// on a text string and returns the resulting tokens. package analyze import ( @@ -79,7 +82,10 @@ func NewAnalyzeFunc(tp elastictransport.Interface) NewAnalyze { } } -// Performs analysis on a text string and returns the resulting tokens. +// Get tokens from text analysis. +// The analyze API performs +// [analysis](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html) +// on a text string and returns the resulting tokens. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html func New(tp elastictransport.Interface) *Analyze { diff --git a/typedapi/indices/analyze/request.go b/typedapi/indices/analyze/request.go index b3d1adedd3..a03c889dc3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package analyze @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package analyze // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/analyze/IndicesAnalyzeRequest.ts#L27-L92 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/analyze/IndicesAnalyzeRequest.ts#L27-L93 type Request struct { // Analyzer The name of the analyzer that should be applied to the provided `text`. @@ -536,6 +536,12 @@ func (s *Request) UnmarshalJSON(data []byte) error { return err } s.Tokenizer = *o + case "classic": + o := types.NewClassicTokenizer() + if err := localDec.Decode(&o); err != nil { + return err + } + s.Tokenizer = *o case "edge_ngram": o := types.NewEdgeNGramTokenizer() if err := localDec.Decode(&o); err != nil { @@ -566,14 +572,26 @@ func (s *Request) UnmarshalJSON(data []byte) error { return err } s.Tokenizer = *o - case "nori_tokenizer": - o := types.NewNoriTokenizer() + case "path_hierarchy": + o := types.NewPathHierarchyTokenizer() if err := localDec.Decode(&o); err != nil { return err } s.Tokenizer = *o - case "path_hierarchy": - o := types.NewPathHierarchyTokenizer() + case "pattern": + o := types.NewPatternTokenizer() + if err := localDec.Decode(&o); err != nil { + return err + } + s.Tokenizer = *o + case "simple_pattern": + o := types.NewSimplePatternTokenizer() + if err := localDec.Decode(&o); err != nil { + return err + } + s.Tokenizer = *o + case "simple_pattern_split": + o := types.NewSimplePatternSplitTokenizer() if err := localDec.Decode(&o); err != nil { return err } @@ -584,6 +602,12 @@ func (s *Request) UnmarshalJSON(data []byte) error { return err } s.Tokenizer = *o + case "thai": + o := types.NewThaiTokenizer() + if err := localDec.Decode(&o); err != nil { + return err + } + s.Tokenizer = *o case "uax_url_email": o := types.NewUaxEmailUrlTokenizer() if err := localDec.Decode(&o); err != nil { @@ -596,20 +620,20 @@ func (s *Request) UnmarshalJSON(data []byte) error { return err } s.Tokenizer = *o - case "kuromoji_tokenizer": - o := types.NewKuromojiTokenizer() + case "icu_tokenizer": + o := types.NewIcuTokenizer() if err := localDec.Decode(&o); err != nil { return err } s.Tokenizer = *o - case "pattern": - o := types.NewPatternTokenizer() + case "kuromoji_tokenizer": + o := types.NewKuromojiTokenizer() if err := localDec.Decode(&o); err != nil { return err } s.Tokenizer = *o - case "icu_tokenizer": - o := types.NewIcuTokenizer() + case "nori_tokenizer": + o := types.NewNoriTokenizer() if err := localDec.Decode(&o); err != nil { return err } diff --git a/typedapi/indices/analyze/response.go b/typedapi/indices/analyze/response.go index 3b9a354295..bc73b5a6ef 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package analyze @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package analyze // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/analyze/IndicesAnalyzeResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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/clearcache/clear_cache.go b/typedapi/indices/clearcache/clear_cache.go index 6a66336e31..8c2036a2d8 100644 --- a/typedapi/indices/clearcache/clear_cache.go +++ b/typedapi/indices/clearcache/clear_cache.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Clears the caches of one or more indices. -// For data streams, the API clears the caches of the stream’s backing indices. +// 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. package clearcache import ( @@ -76,8 +77,9 @@ func NewClearCacheFunc(tp elastictransport.Interface) NewClearCache { } } -// Clears the caches of one or more indices. -// For data streams, the API clears the caches of the stream’s backing indices. +// 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html func New(tp elastictransport.Interface) *ClearCache { diff --git a/typedapi/indices/clearcache/response.go b/typedapi/indices/clearcache/response.go index c10caf0f3a..eabc276441 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearcache @@ -26,9 +26,9 @@ import ( // Response holds the response body struct for the package clearcache // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/clear_cache/IndicesClearCacheResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/clear_cache/IndicesClearCacheResponse.ts#L22-L24 type Response struct { - Shards_ types.ShardStatistics `json:"_shards"` + Shards_ *types.ShardStatistics `json:"_shards,omitempty"` } // NewResponse returns a Response diff --git a/typedapi/indices/clone/clone.go b/typedapi/indices/clone/clone.go index 63dfa89796..dfdde7cb2e 100644 --- a/typedapi/indices/clone/clone.go +++ b/typedapi/indices/clone/clone.go @@ -16,9 +16,45 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Clones an existing index. +// 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 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. package clone import ( @@ -86,7 +122,43 @@ func NewCloneFunc(tp elastictransport.Interface) NewClone { } } -// Clones an existing index. +// 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 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clone-index.html func New(tp elastictransport.Interface) *Clone { diff --git a/typedapi/indices/clone/request.go b/typedapi/indices/clone/request.go index e692bf1973..a8d7247fc0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clone @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/clone/IndicesCloneRequest.ts#L27-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/clone/IndicesCloneRequest.ts#L27-L98 type Request struct { // Aliases Aliases for the resulting index. diff --git a/typedapi/indices/clone/response.go b/typedapi/indices/clone/response.go index 1fd0cadf57..fb09326cef 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clone // Response holds the response body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/clone/IndicesCloneResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 861e94e7c7..3daa40b621 100644 --- a/typedapi/indices/close/close.go +++ b/typedapi/indices/close/close.go @@ -16,9 +16,37 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Closes an index. +// 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`. package close import ( @@ -77,7 +105,35 @@ func NewCloseFunc(tp elastictransport.Interface) NewClose { } } -// Closes an index. +// Close an index. +// A closed index is blocked for read or write operations and does not allow all +// operations that opened indices allow. +// It is not possible to index documents or to search for documents in a closed +// index. +// Closed indices do not have to maintain internal data structures for indexing +// or searching documents, which results in a smaller overhead on the cluster. +// +// When opening or closing an index, the master node is responsible for +// restarting the index shards to reflect the new state of the index. +// The shards will then go through the normal recovery process. +// The data of opened and closed indices is automatically replicated by the +// cluster to ensure that enough shard copies are safely kept around at all +// times. +// +// You can open and close multiple indices. +// An error is thrown if the request explicitly refers to a missing index. +// This behaviour can be turned off using the `ignore_unavailable=true` +// parameter. +// +// By default, you must explicitly name the indices you are opening or closing. +// To open or close indices with `_all`, `*`, or other wildcard expressions, +// change the` action.destructive_requires_name` setting to `false`. This +// setting can also be changed with the cluster update settings API. +// +// Closed indices consume a significant amount of disk-space which can cause +// problems in managed environments. +// Closing indices can be turned off with the cluster settings API by setting +// `cluster.indices.close.enable` to `false`. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-close.html func New(tp elastictransport.Interface) *Close { diff --git a/typedapi/indices/close/response.go b/typedapi/indices/close/response.go index c097a73618..361c812f95 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package close @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package close // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/close/CloseIndexResponse.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 381e2e97e1..80bc5f4ff8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create an index. // Creates a new index. diff --git a/typedapi/indices/create/request.go b/typedapi/indices/create/request.go index f9ed43dad6..db2472d428 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package create @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/create/IndicesCreateRequest.ts#L28-L82 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/create/IndicesCreateRequest.ts#L28-L82 type Request struct { // Aliases Aliases for the index. diff --git a/typedapi/indices/create/response.go b/typedapi/indices/create/response.go index 634dad9107..1734513935 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package create // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/create/IndicesCreateResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 3236f2c537..4cb2994707 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create a data stream. // Creates a data stream. @@ -308,6 +308,24 @@ func (r *CreateDataStream) _name(name string) *CreateDataStream { 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 *CreateDataStream) MasterTimeout(duration string) *CreateDataStream { + 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 *CreateDataStream) Timeout(duration string) *CreateDataStream { + 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 diff --git a/typedapi/indices/createdatastream/response.go b/typedapi/indices/createdatastream/response.go index 430115995f..9fe81e7e44 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package createdatastream // Response holds the response body struct for the package createdatastream // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/create_data_stream/IndicesCreateDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/create_data_stream/IndicesCreateDataStreamResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/datastreamsstats/data_streams_stats.go b/typedapi/indices/datastreamsstats/data_streams_stats.go index 7a1d9e498a..cbb3eb100a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get data stream stats. // Retrieves statistics for one or more data streams. diff --git a/typedapi/indices/datastreamsstats/response.go b/typedapi/indices/datastreamsstats/response.go index aa933fe880..21d648df1d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package datastreamsstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package datastreamsstats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L25-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 30fc37e6cb..9ec6c100de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete indices. // Deletes one or more indices. diff --git a/typedapi/indices/delete/response.go b/typedapi/indices/delete/response.go index 6f5fa7a0fa..a84d4bf909 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package delete @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/delete/IndicesDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/delete/IndicesDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/deletealias/delete_alias.go b/typedapi/indices/deletealias/delete_alias.go index def21f8d64..6ba17aad58 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete an alias. // Removes a data stream or index from an alias. diff --git a/typedapi/indices/deletealias/response.go b/typedapi/indices/deletealias/response.go index eef89e1885..1a14b744e1 100644 --- a/typedapi/indices/deletealias/response.go +++ b/typedapi/indices/deletealias/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletealias // Response holds the response body struct for the package deletealias // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/deletedatalifecycle/delete_data_lifecycle.go b/typedapi/indices/deletedatalifecycle/delete_data_lifecycle.go index e4903b8de6..b8d9612803 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete data stream lifecycles. // Removes the data stream lifecycle from a data stream, rendering it not diff --git a/typedapi/indices/deletedatalifecycle/response.go b/typedapi/indices/deletedatalifecycle/response.go index 5c6e881bf0..79ee03118f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletedatalifecycle // Response holds the response body struct for the package deletedatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/deletedatastream/delete_data_stream.go b/typedapi/indices/deletedatastream/delete_data_stream.go index 6e5a8f9e92..7f697e2f33 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete data streams. // Deletes one or more data streams and their backing indices. @@ -301,6 +301,15 @@ func (r *DeleteDataStream) _name(name string) *DeleteDataStream { 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 *DeleteDataStream) MasterTimeout(duration string) *DeleteDataStream { + r.values.Set("master_timeout", duration) + + return r +} + // ExpandWildcards Type of data stream that wildcard patterns can match. Supports // comma-separated values,such as `open,hidden`. // API name: expand_wildcards diff --git a/typedapi/indices/deletedatastream/response.go b/typedapi/indices/deletedatastream/response.go index f78cb5e1d8..2be3592fb3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletedatastream // Response holds the response body struct for the package deletedatastream // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/deleteindextemplate/delete_index_template.go b/typedapi/indices/deleteindextemplate/delete_index_template.go index a838886ab3..3f0d47825d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete an index template. // The provided may contain multiple template names separated diff --git a/typedapi/indices/deleteindextemplate/response.go b/typedapi/indices/deleteindextemplate/response.go index 3f1bf99da6..4c14941b58 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleteindextemplate // Response holds the response body struct for the package deleteindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/deletetemplate/delete_template.go b/typedapi/indices/deletetemplate/delete_template.go index 4e3e149d2e..6966694593 100644 --- a/typedapi/indices/deletetemplate/delete_template.go +++ b/typedapi/indices/deletetemplate/delete_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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Deletes a legacy index template. package deletetemplate diff --git a/typedapi/indices/deletetemplate/response.go b/typedapi/indices/deletetemplate/response.go index 46eddafd62..8ba93b11bd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletetemplate // Response holds the response body struct for the package deletetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/delete_template/IndicesDeleteTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/delete_template/IndicesDeleteTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/diskusage/disk_usage.go b/typedapi/indices/diskusage/disk_usage.go index edbac54cfb..f0c93d3054 100644 --- a/typedapi/indices/diskusage/disk_usage.go +++ b/typedapi/indices/diskusage/disk_usage.go @@ -16,9 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Analyzes the disk usage of each field of an index or data stream. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package diskusage import ( @@ -77,7 +82,12 @@ func NewDiskUsageFunc(tp elastictransport.Interface) NewDiskUsage { } } -// Analyzes the disk usage of each field of an index or data stream. +// 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-disk-usage.html func New(tp elastictransport.Interface) *DiskUsage { diff --git a/typedapi/indices/diskusage/response.go b/typedapi/indices/diskusage/response.go index 9b1ae4c481..7dcea47982 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package diskusage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package diskusage // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/disk_usage/IndicesDiskUsageResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 bf8d36ca2b..aa922278fe 100644 --- a/typedapi/indices/downsample/downsample.go +++ b/typedapi/indices/downsample/downsample.go @@ -16,11 +16,20 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Aggregates a time series (TSDS) index and stores pre-computed statistical +// 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`). package downsample import ( @@ -88,9 +97,18 @@ func NewDownsampleFunc(tp elastictransport.Interface) NewDownsample { } } -// Aggregates a time series (TSDS) index and stores pre-computed statistical +// Downsample an index. +// Aggregate a time series (TSDS) index and store pre-computed statistical // summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric // field grouped by a configured time interval. +// For example, a TSDS index that contains metrics sampled every 10 seconds can +// be downsampled to an hourly index. +// All documents within an hour interval are summarized and stored as a single +// document in the downsample index. +// +// NOTE: Only indices in a time series data stream are supported. +// Neither field nor document level security can be defined on the source index. +// The source index must be read only (`index.blocks.write: true`). // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-downsample-data-stream.html func New(tp elastictransport.Interface) *Downsample { diff --git a/typedapi/indices/downsample/request.go b/typedapi/indices/downsample/request.go index 62efde8531..35913afd98 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package downsample @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package downsample // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/downsample/Request.ts#L24-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/downsample/Request.ts#L24-L51 type Request = types.DownsampleConfig // NewRequest returns a Request diff --git a/typedapi/indices/downsample/response.go b/typedapi/indices/downsample/response.go index 570a6bc035..f673217f11 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package downsample @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package downsample // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/downsample/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 b3c7d6b7bb..7abc596ae3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Check indices. // Checks if one or more indices, index aliases, or data streams exist. diff --git a/typedapi/indices/existsalias/exists_alias.go b/typedapi/indices/existsalias/exists_alias.go index 00f2ae3eef..b057faecb5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Check aliases. // Checks if one or more data stream or index aliases exist. diff --git a/typedapi/indices/existsindextemplate/exists_index_template.go b/typedapi/indices/existsindextemplate/exists_index_template.go index fc34754241..fffc196f44 100644 --- a/typedapi/indices/existsindextemplate/exists_index_template.go +++ b/typedapi/indices/existsindextemplate/exists_index_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns information about whether a particular index template exists. +// Check index templates. +// Check whether index templates exist. package existsindextemplate import ( @@ -74,7 +75,8 @@ func NewExistsIndexTemplateFunc(tp elastictransport.Interface) NewExistsIndexTem } } -// Returns information about whether a particular index template exists. +// Check index templates. +// Check whether index templates exist. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html func New(tp elastictransport.Interface) *ExistsIndexTemplate { diff --git a/typedapi/indices/existstemplate/exists_template.go b/typedapi/indices/existstemplate/exists_template.go index be0696a70a..402e364cff 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Check existence of index templates. // Returns information about whether a particular index template exists. diff --git a/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go b/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go index 28bbd24606..06bedea87d 100644 --- a/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go +++ b/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get the status for a data stream lifecycle. -// Retrieves 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. +// 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. package explaindatalifecycle import ( @@ -81,10 +81,10 @@ func NewExplainDataLifecycleFunc(tp elastictransport.Interface) NewExplainDataLi } // Get the status for a data stream lifecycle. -// Retrieves 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. +// Get information about an index or data stream's current data stream lifecycle +// status, such as time since index creation, time since rollover, the lifecycle +// configuration managing the index, or any errors encountered during lifecycle +// execution. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html func New(tp elastictransport.Interface) *ExplainDataLifecycle { diff --git a/typedapi/indices/explaindatalifecycle/response.go b/typedapi/indices/explaindatalifecycle/response.go index 504b563864..0bba08fd9b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package explaindatalifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explaindatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 c1bb1a3303..d5c7a03ea8 100644 --- a/typedapi/indices/fieldusagestats/field_usage_stats.go +++ b/typedapi/indices/fieldusagestats/field_usage_stats.go @@ -16,9 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Returns field usage information for each shard and field of an index. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package fieldusagestats import ( @@ -77,7 +82,12 @@ func NewFieldUsageStatsFunc(tp elastictransport.Interface) NewFieldUsageStats { } } -// Returns field usage information for each shard and field of an 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/field-usage-stats.html func New(tp elastictransport.Interface) *FieldUsageStats { diff --git a/typedapi/indices/fieldusagestats/response.go b/typedapi/indices/fieldusagestats/response.go index 37931ae0f2..9247a1bbd4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package fieldusagestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package fieldusagestats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L28-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L28-L30 type Response struct { FieldsUsageBody map[string]types.UsageStatsIndex `json:"-"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/indices/flush/flush.go b/typedapi/indices/flush/flush.go index 96997fc66a..40ed51a1c1 100644 --- a/typedapi/indices/flush/flush.go +++ b/typedapi/indices/flush/flush.go @@ -16,9 +16,32 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Flushes one or more data streams or indices. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package flush import ( @@ -75,7 +98,30 @@ func NewFlushFunc(tp elastictransport.Interface) NewFlush { } } -// Flushes one or more data streams or indices. +// Flush data streams or indices. +// Flushing a data stream or index is the process of making sure that any data +// that is currently only stored in the transaction log is also permanently +// stored in the Lucene index. +// When restarting, Elasticsearch replays any unflushed operations from the +// transaction log into the Lucene index to bring it back into the state that it +// was in before the restart. +// Elasticsearch automatically triggers flushes as needed, using heuristics that +// trade off the size of the unflushed transaction log against the cost of +// performing each flush. +// +// After each operation has been flushed it is permanently stored in the Lucene +// index. +// This may mean that there is no need to maintain an additional copy of it in +// the transaction log. +// The transaction log is made up of multiple files, called generations, and +// Elasticsearch will delete any generation files when they are no longer +// needed, freeing up disk space. +// +// It is also possible to trigger a flush on one or more indices using the flush +// API, although it is rare for users to need to call this API directly. +// If you call the flush API after indexing some documents then a successful +// response indicates that Elasticsearch has flushed all the documents that were +// indexed before the flush API was called. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html func New(tp elastictransport.Interface) *Flush { diff --git a/typedapi/indices/flush/response.go b/typedapi/indices/flush/response.go index c196f9a5ae..96374e3895 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package flush @@ -26,9 +26,9 @@ import ( // Response holds the response body struct for the package flush // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/flush/IndicesFlushResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/flush/IndicesFlushResponse.ts#L22-L24 type Response struct { - Shards_ types.ShardStatistics `json:"_shards"` + Shards_ *types.ShardStatistics `json:"_shards,omitempty"` } // NewResponse returns a Response diff --git a/typedapi/indices/forcemerge/forcemerge.go b/typedapi/indices/forcemerge/forcemerge.go index 3f05ae06c8..3d415bbc38 100644 --- a/typedapi/indices/forcemerge/forcemerge.go +++ b/typedapi/indices/forcemerge/forcemerge.go @@ -16,9 +16,31 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Performs the force merge operation on one or more indices. +// 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. package forcemerge import ( @@ -75,7 +97,29 @@ func NewForcemergeFunc(tp elastictransport.Interface) NewForcemerge { } } -// Performs the force merge operation on one or more indices. +// 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html func New(tp elastictransport.Interface) *Forcemerge { diff --git a/typedapi/indices/forcemerge/response.go b/typedapi/indices/forcemerge/response.go index 227229c387..a82f4efef4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package forcemerge @@ -26,9 +26,9 @@ import ( // Response holds the response body struct for the package forcemerge // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/forcemerge/IndicesForceMergeResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/forcemerge/IndicesForceMergeResponse.ts#L22-L24 type Response struct { - Shards_ types.ShardStatistics `json:"_shards"` + Shards_ *types.ShardStatistics `json:"_shards,omitempty"` // Task task contains a task id returned when wait_for_completion=false, // you can use the task_id to get the status of the task at _tasks/ Task *string `json:"task,omitempty"` diff --git a/typedapi/indices/get/get.go b/typedapi/indices/get/get.go index c8fd4c10d9..79716fb490 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get index information. // Returns information about one or more indices. For data streams, the API diff --git a/typedapi/indices/get/response.go b/typedapi/indices/get/response.go index 2d4f33e7f2..91e6734258 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get/IndicesGetResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f76f209925..fd8516ae2f 100644 --- a/typedapi/indices/getalias/get_alias.go +++ b/typedapi/indices/getalias/get_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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get aliases. // Retrieves information for one or more data stream or index aliases. diff --git a/typedapi/indices/getalias/response.go b/typedapi/indices/getalias/response.go index ab79a8e3fb..58e22f0956 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getalias @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getalias // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_alias/IndicesGetAliasResponse.ts#L26-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get_alias/IndicesGetAliasResponse.ts#L26-L35 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 30b5eda574..3fe28f369c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get data stream lifecycles. // Retrieves the data stream lifecycle configuration of one or more data @@ -328,6 +328,15 @@ func (r *GetDataLifecycle) IncludeDefaults(includedefaults bool) *GetDataLifecyc 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 *GetDataLifecycle) MasterTimeout(duration string) *GetDataLifecycle { + r.values.Set("master_timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/indices/getdatalifecycle/response.go b/typedapi/indices/getdatalifecycle/response.go index b2e25680cb..e4efbe9439 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getdatalifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25 type Response struct { DataStreams []types.DataStreamWithLifecycle `json:"data_streams"` } diff --git a/typedapi/indices/getdatastream/get_data_stream.go b/typedapi/indices/getdatastream/get_data_stream.go index bfc4a768d1..dea3a52163 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get data streams. // Retrieves information about one or more data streams. @@ -326,6 +326,24 @@ func (r *GetDataStream) IncludeDefaults(includedefaults bool) *GetDataStream { 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 *GetDataStream) MasterTimeout(duration string) *GetDataStream { + r.values.Set("master_timeout", duration) + + return r +} + +// Verbose Whether the maximum timestamp for each data stream should be calculated and +// returned. +// API name: verbose +func (r *GetDataStream) Verbose(verbose bool) *GetDataStream { + r.values.Set("verbose", strconv.FormatBool(verbose)) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/indices/getdatastream/response.go b/typedapi/indices/getdatastream/response.go index 53d3dae5ad..da06efe16d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getdatastream @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatastream // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24 type Response struct { DataStreams []types.DataStream `json:"data_streams"` } diff --git a/typedapi/indices/getfieldmapping/get_field_mapping.go b/typedapi/indices/getfieldmapping/get_field_mapping.go index 1d89bc7c54..995b572125 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get mapping definitions. // Retrieves mapping definitions for one or more fields. diff --git a/typedapi/indices/getfieldmapping/response.go b/typedapi/indices/getfieldmapping/response.go index 2a89ff546c..19e7bde15f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getfieldmapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfieldmapping // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_field_mapping/IndicesGetFieldMappingResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 599509007f..7e213c1bfa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get index templates. // Returns information about one or more index templates. diff --git a/typedapi/indices/getindextemplate/response.go b/typedapi/indices/getindextemplate/response.go index 5bedceb3ad..640cd4d2f7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getindextemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 6d3c842e59..a33e47adee 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get mapping definitions. // Retrieves mapping definitions for one or more indices. diff --git a/typedapi/indices/getmapping/response.go b/typedapi/indices/getmapping/response.go index fd2ba1a939..05b2f0dafe 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getmapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmapping // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L24-L27 type Response map[string]types.IndexMappingRecord diff --git a/typedapi/indices/getsettings/get_settings.go b/typedapi/indices/getsettings/get_settings.go index 4607e3f65d..1564b1c841 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get index settings. // Returns setting information for one or more indices. For data streams, diff --git a/typedapi/indices/getsettings/response.go b/typedapi/indices/getsettings/response.go index 84d6048db6..017863e17e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_settings/IndicesGetSettingsResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4a378ab19c..a61a870721 100644 --- a/typedapi/indices/gettemplate/get_template.go +++ b/typedapi/indices/gettemplate/get_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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get index templates. // Retrieves information about one or more index templates. diff --git a/typedapi/indices/gettemplate/response.go b/typedapi/indices/gettemplate/response.go index 7d746fca9c..b09b552c0d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package gettemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_template/IndicesGetTemplateResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get_template/IndicesGetTemplateResponse.ts#L23-L26 type Response map[string]types.TemplateMapping diff --git a/typedapi/indices/migratetodatastream/migrate_to_data_stream.go b/typedapi/indices/migratetodatastream/migrate_to_data_stream.go index 16681c8ea8..9b2bec6ff8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Convert an index alias to a data stream. // Converts an index alias to a data stream. @@ -323,6 +323,24 @@ func (r *MigrateToDataStream) _name(name string) *MigrateToDataStream { 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 *MigrateToDataStream) MasterTimeout(duration string) *MigrateToDataStream { + 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 *MigrateToDataStream) Timeout(duration string) *MigrateToDataStream { + 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 diff --git a/typedapi/indices/migratetodatastream/response.go b/typedapi/indices/migratetodatastream/response.go index 17566640b4..8def72657b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package migratetodatastream // Response holds the response body struct for the package migratetodatastream // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/migrate_to_data_stream/IndicesMigrateToDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/migrate_to_data_stream/IndicesMigrateToDataStreamResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/modifydatastream/modify_data_stream.go b/typedapi/indices/modifydatastream/modify_data_stream.go index 0c39aef484..b1ad587b10 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Update data streams. // Performs one or more data stream modification actions in a single atomic diff --git a/typedapi/indices/modifydatastream/request.go b/typedapi/indices/modifydatastream/request.go index 63902f67c0..e671349730 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package modifydatastream @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package modifydatastream // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L23-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L23-L38 type Request struct { // Actions Actions to perform. diff --git a/typedapi/indices/modifydatastream/response.go b/typedapi/indices/modifydatastream/response.go index 72663a283b..311314adf3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package modifydatastream // Response holds the response body struct for the package modifydatastream // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/modify_data_stream/IndicesModifyDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/modify_data_stream/IndicesModifyDataStreamResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/open/open.go b/typedapi/indices/open/open.go index c2b62816b4..22aac37145 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Opens a closed index. // For data streams, the API opens any closed backing indices. diff --git a/typedapi/indices/open/response.go b/typedapi/indices/open/response.go index d3609b27c6..15b845d3d4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package open // Response holds the response body struct for the package open // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/open/IndicesOpenResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 92c06181b8..45ef249534 100644 --- a/typedapi/indices/promotedatastream/promote_data_stream.go +++ b/typedapi/indices/promotedatastream/promote_data_stream.go @@ -16,10 +16,27 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Promotes a data stream from a replicated data stream managed by CCR to a -// regular data stream +// 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. package promotedatastream import ( @@ -77,8 +94,25 @@ func NewPromoteDataStreamFunc(tp elastictransport.Interface) NewPromoteDataStrea } } -// Promotes a data stream from a replicated data stream managed by CCR to a -// regular data stream +// 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/guide/en/elasticsearch/reference/current/data-streams.html func New(tp elastictransport.Interface) *PromoteDataStream { @@ -301,6 +335,15 @@ func (r *PromoteDataStream) _name(name string) *PromoteDataStream { 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 *PromoteDataStream) MasterTimeout(duration string) *PromoteDataStream { + r.values.Set("master_timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/indices/promotedatastream/response.go b/typedapi/indices/promotedatastream/response.go index f7e26e1d0b..eab0b25e4f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package promotedatastream @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package promotedatastream // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/promote_data_stream/IndicesPromoteDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 888ea7499f..449e6b8f78 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create or update an alias. // Adds a data stream or index to an alias. diff --git a/typedapi/indices/putalias/request.go b/typedapi/indices/putalias/request.go index c3bc4b9cfe..6b3aec8fa9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putalias @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putalias // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_alias/IndicesPutAliasRequest.ts#L25-L92 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_alias/IndicesPutAliasRequest.ts#L25-L92 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 2527661e49..e7c02424b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putalias // Response holds the response body struct for the package putalias // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_alias/IndicesPutAliasResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_alias/IndicesPutAliasResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/putdatalifecycle/put_data_lifecycle.go b/typedapi/indices/putdatalifecycle/put_data_lifecycle.go index 9ecc2064ac..0b2b29e8dd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Update data stream lifecycles. // Update the data stream lifecycle of the specified data streams. @@ -189,6 +189,12 @@ func (r *PutDataLifecycle) HttpRequest(ctx context.Context) (*http.Request, erro req.Header = r.headers.Clone() + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=8") + } + } + if req.Header.Get("Accept") == "" { req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") } diff --git a/typedapi/indices/putdatalifecycle/request.go b/typedapi/indices/putdatalifecycle/request.go index 27e0d3fd28..ff56b653f3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putdatalifecycle @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package putdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L76 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L76 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 aa065ec32e..212aaa1aa9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putdatalifecycle // Response holds the response body struct for the package putdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/putindextemplate/put_index_template.go b/typedapi/indices/putindextemplate/put_index_template.go index 4d01968bed..93c9ac4418 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create or update an index template. // Index templates define settings, mappings, and aliases that can be applied diff --git a/typedapi/indices/putindextemplate/request.go b/typedapi/indices/putindextemplate/request.go index 05cc171395..74d1b02c27 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putindextemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L37-L119 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L37-L119 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 698dab2bcc..a78ad5f596 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putindextemplate // Response holds the response body struct for the package putindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/putmapping/put_mapping.go b/typedapi/indices/putmapping/put_mapping.go index d4a8332388..66bf4080ed 100644 --- a/typedapi/indices/putmapping/put_mapping.go +++ b/typedapi/indices/putmapping/put_mapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Update field mappings. // Adds new fields to an existing data stream or index. diff --git a/typedapi/indices/putmapping/request.go b/typedapi/indices/putmapping/request.go index b17ff3bdcb..ebfbc5e7cb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putmapping @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package putmapping // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_mapping/IndicesPutMappingRequest.ts#L42-L150 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_mapping/IndicesPutMappingRequest.ts#L41-L149 type Request struct { // DateDetection Controls whether dynamic date detection is enabled. diff --git a/typedapi/indices/putmapping/response.go b/typedapi/indices/putmapping/response.go index ed1de3ee58..d8a92f3725 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putmapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putmapping // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_mapping/IndicesPutMappingResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_mapping/IndicesPutMappingResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/putsettings/put_settings.go b/typedapi/indices/putsettings/put_settings.go index e92f23f151..963d0d1039 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Update index settings. // Changes dynamic index settings in real time. For data streams, index setting diff --git a/typedapi/indices/putsettings/request.go b/typedapi/indices/putsettings/request.go index d2c2c6ab05..6d88f2f958 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putsettings @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_settings/IndicesPutSettingsRequest.ts#L25-L93 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_settings/IndicesPutSettingsRequest.ts#L25-L93 type Request = types.IndexSettings // NewRequest returns a Request diff --git a/typedapi/indices/putsettings/response.go b/typedapi/indices/putsettings/response.go index c9d8200e5a..bdf98e2785 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putsettings // Response holds the response body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_settings/IndicesPutSettingsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_settings/IndicesPutSettingsResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/puttemplate/put_template.go b/typedapi/indices/puttemplate/put_template.go index 0c9600c6fb..38b6d8b876 100644 --- a/typedapi/indices/puttemplate/put_template.go +++ b/typedapi/indices/puttemplate/put_template.go @@ -16,11 +16,26 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // 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. package puttemplate import ( @@ -86,6 +101,21 @@ func NewPutTemplateFunc(tp elastictransport.Interface) NewPutTemplate { // 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html func New(tp elastictransport.Interface) *PutTemplate { diff --git a/typedapi/indices/puttemplate/request.go b/typedapi/indices/puttemplate/request.go index 75ccf3e114..c3aabc8502 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package puttemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package puttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_template/IndicesPutTemplateRequest.ts#L29-L95 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_template/IndicesPutTemplateRequest.ts#L29-L107 type Request struct { // Aliases Aliases for the index. diff --git a/typedapi/indices/puttemplate/response.go b/typedapi/indices/puttemplate/response.go index 08b0fbb03e..62d3f7efb0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package puttemplate // Response holds the response body struct for the package puttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_template/IndicesPutTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_template/IndicesPutTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/recovery/recovery.go b/typedapi/indices/recovery/recovery.go index 50d808dfd6..503f5a4a1c 100644 --- a/typedapi/indices/recovery/recovery.go +++ b/typedapi/indices/recovery/recovery.go @@ -16,12 +16,41 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns information about ongoing and completed shard recoveries for one or -// more indices. -// For data streams, the API returns information for the stream’s backing +// 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. +// +// 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. package recovery import ( @@ -77,10 +106,39 @@ func NewRecoveryFunc(tp elastictransport.Interface) NewRecovery { } } -// Returns information about ongoing and completed shard recoveries for one or -// more indices. -// For data streams, the API returns information for the stream’s backing +// 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. +// +// Shard recovery is the process of initializing a shard copy, such as restoring +// a primary shard from a snapshot or creating a replica shard from a primary +// shard. +// When a shard recovery completes, the recovered shard is available for search +// and indexing. +// +// Recovery automatically occurs during the following processes: +// +// * When creating an index for the first time. +// * When a node rejoins the cluster and starts up any missing primary shard +// copies using the data that it holds in its data path. +// * Creation of new replica shard copies from the primary. +// * Relocation of a shard copy to a different node in the same cluster. +// * A snapshot restore operation. +// * A clone, shrink, or split operation. +// +// You can determine the cause of a shard recovery using the recovery or cat +// recovery APIs. +// +// The index recovery API reports information about completed recoveries only +// for shard copies that currently exist in the cluster. +// It only reports the last recovery for each shard copy and does not report +// historical information about earlier recoveries, nor does it report +// information about the recoveries of shard copies that no longer exist. +// This means that if a shard copy completes a recovery and then Elasticsearch +// relocates it onto a different node then the information about the original +// recovery will not be shown in the recovery API. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html func New(tp elastictransport.Interface) *Recovery { diff --git a/typedapi/indices/recovery/response.go b/typedapi/indices/recovery/response.go index 4044aa6f18..29a70e6af2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package recovery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package recovery // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/recovery/IndicesRecoveryResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e8ddb164a2..89ce799620 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Refresh an index. // A refresh makes recent operations performed on one or more indices available diff --git a/typedapi/indices/refresh/response.go b/typedapi/indices/refresh/response.go index b833782434..19353f83f6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package refresh @@ -26,9 +26,9 @@ import ( // Response holds the response body struct for the package refresh // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/refresh/IndicesRefreshResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/refresh/IndicesRefreshResponse.ts#L22-L24 type Response struct { - Shards_ types.ShardStatistics `json:"_shards"` + Shards_ *types.ShardStatistics `json:"_shards,omitempty"` } // NewResponse returns a Response diff --git a/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go b/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go index 1535e72211..150270001e 100644 --- a/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go +++ b/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go @@ -16,9 +16,32 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Reloads an index's search analyzers and their resources. +// 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. package reloadsearchanalyzers import ( @@ -77,7 +100,30 @@ func NewReloadSearchAnalyzersFunc(tp elastictransport.Interface) NewReloadSearch } } -// Reloads an index's search analyzers and their resources. +// Reload search analyzers. +// Reload an index's search analyzers and their resources. +// For data streams, the API reloads search analyzers and resources for the +// stream's backing indices. +// +// IMPORTANT: After reloading the search analyzers you should clear the request +// cache to make sure it doesn't contain responses derived from the previous +// versions of the analyzer. +// +// You can use the reload search analyzers API to pick up changes to synonym +// files used in the `synonym_graph` or `synonym` token filter of a search +// analyzer. +// To be eligible, the token filter must have an `updateable` flag of `true` and +// only be used in search analyzers. +// +// NOTE: This API does not perform a reload for each shard of an index. +// Instead, it performs a reload for each node containing index shards. +// As a result, the total shard count returned by the API can differ from the +// number of index shards. +// Because reloading affects every node with an index shard, it is important to +// update the synonym file on every data node in the cluster--including nodes +// that don't contain a shard replica--before using this API. +// This ensures the synonym file is updated everywhere in the cluster in case +// shards are relocated in the future. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-reload-analyzers.html func New(tp elastictransport.Interface) *ReloadSearchAnalyzers { diff --git a/typedapi/indices/reloadsearchanalyzers/response.go b/typedapi/indices/reloadsearchanalyzers/response.go index bcd71db08f..4709bb8d02 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package reloadsearchanalyzers @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reloadsearchanalyzers // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersResponse.ts#L22-L24 type Response struct { ReloadDetails []types.ReloadDetails `json:"reload_details"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/indices/resolvecluster/resolve_cluster.go b/typedapi/indices/resolvecluster/resolve_cluster.go index 2678b3d6fd..fe230a8156 100644 --- a/typedapi/indices/resolvecluster/resolve_cluster.go +++ b/typedapi/indices/resolvecluster/resolve_cluster.go @@ -16,12 +16,32 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Resolves the specified index expressions to return information about each -// cluster, including -// the local cluster, if included. +// Resolve the cluster. +// Resolve the specified index expressions to return information about each +// cluster, including the local cluster, if included. // Multiple patterns and remote clusters are supported. +// +// 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 in the index expression scope. +// * 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. package resolvecluster import ( @@ -80,11 +100,31 @@ func NewResolveClusterFunc(tp elastictransport.Interface) NewResolveCluster { } } -// Resolves the specified index expressions to return information about each -// cluster, including -// the local cluster, if included. +// Resolve the cluster. +// Resolve the specified index expressions to return information about each +// cluster, including the local cluster, if included. // Multiple patterns and remote clusters are supported. // +// 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 in the index expression scope. +// * 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. +// // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-cluster-api.html func New(tp elastictransport.Interface) *ResolveCluster { r := &ResolveCluster{ diff --git a/typedapi/indices/resolvecluster/response.go b/typedapi/indices/resolvecluster/response.go index 132d161279..05202f2adc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package resolvecluster @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resolvecluster // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 463da8f5f4..20716b6fe3 100644 --- a/typedapi/indices/resolveindex/resolve_index.go +++ b/typedapi/indices/resolveindex/resolve_index.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Resolves the specified name(s) and/or index patterns for indices, aliases, -// and data streams. +// Resolve indices. +// Resolve the names and/or index patterns for indices, aliases, and data +// streams. // Multiple patterns and remote clusters are supported. package resolveindex @@ -79,8 +80,9 @@ func NewResolveIndexFunc(tp elastictransport.Interface) NewResolveIndex { } } -// Resolves the specified name(s) and/or index patterns for indices, aliases, -// and data streams. +// Resolve indices. +// Resolve the names and/or index patterns for indices, aliases, and data +// streams. // Multiple patterns and remote clusters are supported. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-index-api.html @@ -323,6 +325,27 @@ func (r *ResolveIndex) ExpandWildcards(expandwildcards ...expandwildcard.ExpandW return r } +// IgnoreUnavailable If `false`, the request returns an error if it targets a missing or closed +// index. +// API name: ignore_unavailable +func (r *ResolveIndex) IgnoreUnavailable(ignoreunavailable bool) *ResolveIndex { + r.values.Set("ignore_unavailable", strconv.FormatBool(ignoreunavailable)) + + 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 *ResolveIndex) AllowNoIndices(allownoindices bool) *ResolveIndex { + r.values.Set("allow_no_indices", strconv.FormatBool(allownoindices)) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/indices/resolveindex/response.go b/typedapi/indices/resolveindex/response.go index 70f49e82d9..df5629c9c1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package resolveindex @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resolveindex // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/resolve_index/ResolveIndexResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 7f28257146..c6654b302f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package rollover @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package rollover // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/rollover/IndicesRolloverRequest.ts#L29-L100 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/rollover/IndicesRolloverRequest.ts#L29-L100 type Request struct { // Aliases Aliases for the target index. diff --git a/typedapi/indices/rollover/response.go b/typedapi/indices/rollover/response.go index b6879e9d0a..c6f93d0797 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package rollover // Response holds the response body struct for the package rollover // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/rollover/IndicesRolloverResponse.ts#L22-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 faaa082b5a..783c5e90de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Roll over to a new index. // Creates a new index for a data stream or index alias. diff --git a/typedapi/indices/segments/response.go b/typedapi/indices/segments/response.go index b3e401eb75..838ac8e797 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package segments @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package segments // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/segments/IndicesSegmentsResponse.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 5cb4b68988..a764a95315 100644 --- a/typedapi/indices/segments/segments.go +++ b/typedapi/indices/segments/segments.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns low-level information about the Lucene segments in index shards. -// For data streams, the API returns information about the stream’s backing +// 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. package segments @@ -77,8 +78,9 @@ func NewSegmentsFunc(tp elastictransport.Interface) NewSegments { } } -// Returns low-level information about the Lucene segments in index shards. -// For data streams, the API returns information about the stream’s backing +// Get index segments. +// Get low-level information about the Lucene segments in index shards. +// For data streams, the API returns information about the stream's backing // indices. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html diff --git a/typedapi/indices/shardstores/response.go b/typedapi/indices/shardstores/response.go index 1a1511ae7b..790c7c28b1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package shardstores @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package shardstores // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/shard_stores/IndicesShardStoresResponse.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 6fff296c7f..b7693a4367 100644 --- a/typedapi/indices/shardstores/shard_stores.go +++ b/typedapi/indices/shardstores/shard_stores.go @@ -16,11 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves store information about replica shards in one or more indices. -// For data streams, the API retrieves store information for the stream’s +// 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. package shardstores import ( @@ -78,10 +90,22 @@ func NewShardStoresFunc(tp elastictransport.Interface) NewShardStores { } } -// Retrieves store information about replica shards in one or more indices. -// For data streams, the API retrieves store information for the stream’s +// Get index shard stores. +// Get store information about replica shards in one or more indices. +// For data streams, the API retrieves store information for the stream's // backing indices. // +// The index shard stores API returns the following information: +// +// * The node on which each replica shard exists. +// * The allocation ID for each replica shard. +// * A unique ID for each replica shard. +// * Any errors encountered while opening the shard index or from an earlier +// failure. +// +// By default, the API returns store information only for primary shards that +// are unassigned or have one or more unassigned replica shards. +// // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html func New(tp elastictransport.Interface) *ShardStores { r := &ShardStores{ diff --git a/typedapi/indices/shrink/request.go b/typedapi/indices/shrink/request.go index b3534c64a8..0d6b41430f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package shrink @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package shrink // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/shrink/IndicesShrinkRequest.ts#L27-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/shrink/IndicesShrinkRequest.ts#L27-L107 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 7dadb1b3ec..a318e39b22 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package shrink // Response holds the response body struct for the package shrink // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/shrink/IndicesShrinkResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1f7d859612..1e60a62fce 100644 --- a/typedapi/indices/shrink/shrink.go +++ b/typedapi/indices/shrink/shrink.go @@ -16,9 +16,64 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Shrinks an existing index into a new index with fewer primary shards. +// 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. package shrink import ( @@ -86,7 +141,62 @@ func NewShrinkFunc(tp elastictransport.Interface) NewShrink { } } -// Shrinks an existing index into a new index with fewer primary shards. +// Shrink an index. +// Shrink an index into a new index with fewer primary shards. +// +// Before you can shrink an index: +// +// * The index must be read-only. +// * A copy of every shard in the index must reside on the same node. +// * The index must have a green health status. +// +// To make shard allocation easier, we recommend you also remove the index's +// replica shards. +// You can later re-add replica shards as part of the shrink operation. +// +// The requested number of primary shards in the target index must be a factor +// of the number of shards in the source index. +// For example an index with 8 primary shards can be shrunk into 4, 2 or 1 +// primary shards or an index with 15 primary shards can be shrunk into 5, 3 or +// 1. +// If the number of shards in the index is a prime number it can only be shrunk +// into a single primary shard +// +// Before shrinking, a (primary or replica) copy of every shard in the index +// +// must be present on the same node. +// +// The current write index on a data stream cannot be shrunk. In order to shrink +// the current write index, the data stream must first be rolled over so that a +// new write index is created and then the previous write index can be shrunk. +// +// A shrink operation: +// +// * Creates a new target index with the same definition as the source index, +// but with a smaller number of primary shards. +// * Hard-links segments from the source index into the target index. If the +// file system does not support hard-linking, then all segments are copied into +// the new index, which is a much more time consuming process. Also if using +// multiple data paths, shards on different data paths require a full copy of +// segment files if they are not on the same disk since hardlinks do not work +// across disks. +// * Recovers the target index as though it were a closed index which had just +// been re-opened. Recovers shards to the +// `.routing.allocation.initial_recovery._id` index setting. +// +// IMPORTANT: Indices can only be shrunk if they satisfy the following +// requirements: +// +// * The target index must not exist. +// * The source index must have more primary shards than the target index. +// * The number of primary shards in the target index must be a factor of the +// number of primary shards in the source index. The source index must have more +// primary shards than the target index. +// * The index must not contain more than 2,147,483,519 documents in total +// across all shards that will be shrunk into a single shard on the target index +// as this is the maximum number of docs that can fit into a single shard. +// * The node handling the shrink process must have sufficient free disk space +// to accommodate a second copy of the existing index. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html func New(tp elastictransport.Interface) *Shrink { diff --git a/typedapi/indices/simulateindextemplate/response.go b/typedapi/indices/simulateindextemplate/response.go index 82824d46dd..4b99a6936d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package simulateindextemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package simulateindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/simulate_index_template/IndicesSimulateIndexTemplateResponse.ts#L25-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 47fd506b5f..afb990a0b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Simulate an index. // Returns the index configuration that would be applied to the specified index diff --git a/typedapi/indices/simulatetemplate/request.go b/typedapi/indices/simulatetemplate/request.go index 42f7828179..624fbe1853 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package simulatetemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package simulatetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L120 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L120 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 b954418c08..77d2f2fa3e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package simulatetemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package simulatetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L26-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 b5a23e83dc..fc3ceefae4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Simulate an index template. // Returns the index configuration that would be applied by a particular index diff --git a/typedapi/indices/split/request.go b/typedapi/indices/split/request.go index 86ba9e82d7..c5da8fa56e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package split @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package split // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/split/IndicesSplitRequest.ts#L27-L74 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/split/IndicesSplitRequest.ts#L27-L98 type Request struct { // Aliases Aliases for the resulting index. diff --git a/typedapi/indices/split/response.go b/typedapi/indices/split/response.go index d036373fee..e5e16c338c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package split // Response holds the response body struct for the package split // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/split/IndicesSplitResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 3289806a1f..56bcdfc677 100644 --- a/typedapi/indices/split/split.go +++ b/typedapi/indices/split/split.go @@ -16,9 +16,44 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Splits an existing index into a new index with more primary shards. +// 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. +// +// 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. package split import ( @@ -86,7 +121,42 @@ func NewSplitFunc(tp elastictransport.Interface) NewSplit { } } -// Splits an existing index into a new index with more primary shards. +// 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. +// +// The number of times the index can be split (and the number of shards that +// each original shard can be split into) is determined by the +// `index.number_of_routing_shards` setting. +// The number of routing shards specifies the hashing space that is used +// internally to distribute documents across shards with consistent hashing. +// For instance, a 5 shard index with `number_of_routing_shards` set to 30 (5 x +// 2 x 3) could be split by a factor of 2 or 3. +// +// A split operation: +// +// * Creates a new target index with the same definition as the source index, +// but with a larger number of primary shards. +// * Hard-links segments from the source index into the target index. If the +// file system doesn't support hard-linking, all segments are copied into the +// new index, which is a much more time consuming process. +// * Hashes all documents again, after low level files are created, to delete +// documents that belong to a different shard. +// * Recovers the target index as though it were a closed index which had just +// been re-opened. +// +// IMPORTANT: Indices can only be split if they satisfy the following +// requirements: +// +// * The target index must not exist. +// * The source index must have fewer primary shards than the target index. +// * The number of primary shards in the target index must be a multiple of the +// number of primary shards in the source index. +// * The node handling the split process must have sufficient free disk space to +// accommodate a second copy of the existing index. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-split-index.html func New(tp elastictransport.Interface) *Split { diff --git a/typedapi/indices/stats/response.go b/typedapi/indices/stats/response.go index 49cc49ea46..43fdcf4e7c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/IndicesStatsResponse.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 0b8e766799..87c96eb83e 100644 --- a/typedapi/indices/stats/stats.go +++ b/typedapi/indices/stats/stats.go @@ -16,11 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns statistics for one or more indices. -// For data streams, the API retrieves statistics for the stream’s backing +// 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. package stats import ( @@ -81,10 +93,22 @@ func NewStatsFunc(tp elastictransport.Interface) NewStats { } } -// Returns statistics for one or more indices. -// For data streams, the API retrieves statistics for the stream’s backing +// Get index statistics. +// For data streams, the API retrieves statistics for the stream's backing // indices. // +// By default, the returned statistics are index-level with `primaries` and +// `total` aggregations. +// `primaries` are the values for only the primary shards. +// `total` are the accumulated values for both primary and replica shards. +// +// To get shard-level statistics, set the `level` parameter to `shards`. +// +// NOTE: When moving to another node, the shard-level statistics for a shard are +// cleared. +// Although the shard is no longer part of the node, that node retains any +// node-level statistics to which the shard contributed. +// // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html func New(tp elastictransport.Interface) *Stats { r := &Stats{ diff --git a/typedapi/indices/unfreeze/response.go b/typedapi/indices/unfreeze/response.go index ab47c630a2..af865f9e87 100644 --- a/typedapi/indices/unfreeze/response.go +++ b/typedapi/indices/unfreeze/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package unfreeze // Response holds the response body struct for the package unfreeze // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/unfreeze/IndicesUnfreezeResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/unfreeze/IndicesUnfreezeResponse.ts#L20-L25 type Response struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` diff --git a/typedapi/indices/unfreeze/unfreeze.go b/typedapi/indices/unfreeze/unfreeze.go index e74de0c83e..8611e042ec 100644 --- a/typedapi/indices/unfreeze/unfreeze.go +++ b/typedapi/indices/unfreeze/unfreeze.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Unfreezes an index. +// Unfreeze an index. +// When a frozen index is unfrozen, the index goes through the normal recovery +// process and becomes writeable again. package unfreeze import ( @@ -77,7 +79,9 @@ func NewUnfreezeFunc(tp elastictransport.Interface) NewUnfreeze { } } -// Unfreezes an index. +// Unfreeze an index. +// When a frozen index is unfrozen, the index goes through the normal recovery +// process and becomes writeable again. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html func New(tp elastictransport.Interface) *Unfreeze { diff --git a/typedapi/indices/updatealiases/request.go b/typedapi/indices/updatealiases/request.go index 0eb788656d..42e9b9e28f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatealiases @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatealiases // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/update_aliases/IndicesUpdateAliasesRequest.ts#L24-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/update_aliases/IndicesUpdateAliasesRequest.ts#L24-L52 type Request struct { // Actions Actions to perform. diff --git a/typedapi/indices/updatealiases/response.go b/typedapi/indices/updatealiases/response.go index f9ee4bdd84..57da2d48d0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatealiases // Response holds the response body struct for the package updatealiases // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/update_aliases/IndicesUpdateAliasesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/update_aliases/IndicesUpdateAliasesResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/updatealiases/update_aliases.go b/typedapi/indices/updatealiases/update_aliases.go index 202bc8fbdd..c2d4203ddb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create or update an alias. // Adds a data stream or index to an alias. diff --git a/typedapi/indices/validatequery/request.go b/typedapi/indices/validatequery/request.go index eeaf1fc3e1..7332ba60ec 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package validatequery @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package validatequery // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/validate_query/IndicesValidateQueryRequest.ts#L25-L112 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/validate_query/IndicesValidateQueryRequest.ts#L25-L112 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 0f8c17af08..598b45d0c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package validatequery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package validatequery // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 fa5f0948d3..aab45997ef 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Validate a query. // Validates a query without running it. diff --git a/typedapi/inference/delete/delete.go b/typedapi/inference/delete/delete.go index 7170afc0b0..af0477c2de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete an inference endpoint package delete diff --git a/typedapi/inference/delete/response.go b/typedapi/inference/delete/response.go index 48e7a23325..d66ff5bdea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/delete/DeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/delete/DeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/inference/get/get.go b/typedapi/inference/get/get.go index 004d141a4f..98332837f5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get an inference endpoint package get diff --git a/typedapi/inference/get/response.go b/typedapi/inference/get/response.go index 52b5547969..1aa68fae35 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/get/GetResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 af27b4e0fd..1ef166f532 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Perform inference on the service package inference diff --git a/typedapi/inference/inference/request.go b/typedapi/inference/inference/request.go index 004248b704..d7885e2df8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package inference @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package inference // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/inference/InferenceRequest.ts#L26-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/inference/InferenceRequest.ts#L26-L66 type Request struct { // Input Inference input. diff --git a/typedapi/inference/inference/response.go b/typedapi/inference/inference/response.go index 9b9b1b1434..51bf640c14 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package inference @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package inference // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/inference/InferenceResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/inference/InferenceResponse.ts#L22-L24 type Response struct { Completion []types.CompletionResult `json:"completion,omitempty"` Rerank []types.RankedDocument `json:"rerank,omitempty"` diff --git a/typedapi/inference/put/put.go b/typedapi/inference/put/put.go index a8099b92e9..c486787c7b 100644 --- a/typedapi/inference/put/put.go +++ b/typedapi/inference/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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create an inference endpoint package put diff --git a/typedapi/inference/put/request.go b/typedapi/inference/put/request.go index 960035ca13..985909fd6a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package put @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/put/PutRequest.ts#L25-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/put/PutRequest.ts#L25-L44 type Request = types.InferenceEndpoint // NewRequest returns a Request diff --git a/typedapi/inference/put/response.go b/typedapi/inference/put/response.go index 2683c7c899..767e9ce1b0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package put @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/put/PutResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/put/PutResponse.ts#L22-L24 type Response struct { // InferenceId The inference Id @@ -38,7 +38,7 @@ type Response struct { // 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"` + TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type TaskType tasktype.TaskType `json:"task_type"` } diff --git a/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go b/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go new file mode 100644 index 0000000000..d9adf5eb08 --- /dev/null +++ b/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go @@ -0,0 +1,367 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Delete GeoIP database configurations. +// Delete one or more IP geolocation database configurations. +package deletegeoipdatabase + +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/v8/typedapi/types" +) + +const ( + idMask = 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 DeleteGeoipDatabase struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + id string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewDeleteGeoipDatabase type alias for index. +type NewDeleteGeoipDatabase func(id string) *DeleteGeoipDatabase + +// NewDeleteGeoipDatabaseFunc returns a new instance of DeleteGeoipDatabase with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewDeleteGeoipDatabaseFunc(tp elastictransport.Interface) NewDeleteGeoipDatabase { + return func(id string) *DeleteGeoipDatabase { + n := New(tp) + + n._id(id) + + return n + } +} + +// Delete GeoIP database configurations. +// Delete one or more IP geolocation database configurations. +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-geoip-database-api.html +func New(tp elastictransport.Interface) *DeleteGeoipDatabase { + r := &DeleteGeoipDatabase{ + 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 *DeleteGeoipDatabase) 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 == idMask: + path.WriteString("/") + path.WriteString("_ingest") + path.WriteString("/") + path.WriteString("geoip") + path.WriteString("/") + path.WriteString("database") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", r.id) + } + path.WriteString(r.id) + + 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=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r DeleteGeoipDatabase) 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, "ingest.delete_geoip_database") + 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, "ingest.delete_geoip_database") + if reader := instrument.RecordRequestBody(ctx, "ingest.delete_geoip_database", 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", "ingest.delete_geoip_database") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the DeleteGeoipDatabase 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 deletegeoipdatabase.Response +func (r DeleteGeoipDatabase) 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, "ingest.delete_geoip_database") + 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 DeleteGeoipDatabase) 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, "ingest.delete_geoip_database") + 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 DeleteGeoipDatabase 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 DeleteGeoipDatabase headers map. +func (r *DeleteGeoipDatabase) Header(key, value string) *DeleteGeoipDatabase { + r.headers.Set(key, value) + + return r +} + +// Id A comma-separated list of geoip database configurations to delete +// API Name: id +func (r *DeleteGeoipDatabase) _id(id string) *DeleteGeoipDatabase { + r.paramSet |= idMask + r.id = id + + 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 *DeleteGeoipDatabase) MasterTimeout(duration string) *DeleteGeoipDatabase { + 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 *DeleteGeoipDatabase) Timeout(duration string) *DeleteGeoipDatabase { + 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 *DeleteGeoipDatabase) ErrorTrace(errortrace bool) *DeleteGeoipDatabase { + 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 *DeleteGeoipDatabase) FilterPath(filterpaths ...string) *DeleteGeoipDatabase { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"eixsts_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *DeleteGeoipDatabase) Human(human bool) *DeleteGeoipDatabase { + 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 *DeleteGeoipDatabase) Pretty(pretty bool) *DeleteGeoipDatabase { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/ingest/deletegeoipdatabase/response.go b/typedapi/ingest/deletegeoipdatabase/response.go new file mode 100644 index 0000000000..5a3997cefc --- /dev/null +++ b/typedapi/ingest/deletegeoipdatabase/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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package deletegeoipdatabase + +// Response holds the response body struct for the package deletegeoipdatabase +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/delete_geoip_database/DeleteGeoipDatabaseResponse.ts#L22-L24 +type Response struct { + + // Acknowledged For a successful response, this value is always true. On failure, an + // exception is returned instead. + Acknowledged bool `json:"acknowledged"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/ingest/deletepipeline/delete_pipeline.go b/typedapi/ingest/deletepipeline/delete_pipeline.go index 412bc46de1..4177e992bf 100644 --- a/typedapi/ingest/deletepipeline/delete_pipeline.go +++ b/typedapi/ingest/deletepipeline/delete_pipeline.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes one or more existing ingest pipeline. +// Delete pipelines. +// Delete one or more ingest pipelines. package deletepipeline import ( @@ -76,7 +77,8 @@ func NewDeletePipelineFunc(tp elastictransport.Interface) NewDeletePipeline { } } -// Deletes one or more existing ingest pipeline. +// Delete pipelines. +// Delete one or more ingest pipelines. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-pipeline-api.html func New(tp elastictransport.Interface) *DeletePipeline { diff --git a/typedapi/ingest/deletepipeline/response.go b/typedapi/ingest/deletepipeline/response.go index 1465f59627..818df496cf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletepipeline // Response holds the response body struct for the package deletepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/delete_pipeline/DeletePipelineResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/delete_pipeline/DeletePipelineResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ingest/geoipstats/geo_ip_stats.go b/typedapi/ingest/geoipstats/geo_ip_stats.go index 52999cb393..5437e2232c 100644 --- a/typedapi/ingest/geoipstats/geo_ip_stats.go +++ b/typedapi/ingest/geoipstats/geo_ip_stats.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Gets download statistics for GeoIP2 databases used with the geoip processor. +// Get GeoIP statistics. +// Get download statistics for GeoIP2 databases that are used with the GeoIP +// processor. package geoipstats import ( @@ -68,7 +70,9 @@ func NewGeoIpStatsFunc(tp elastictransport.Interface) NewGeoIpStats { } } -// Gets download statistics for GeoIP2 databases used with the geoip processor. +// Get GeoIP statistics. +// Get download statistics for GeoIP2 databases that are used with the GeoIP +// processor. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-processor.html func New(tp elastictransport.Interface) *GeoIpStats { diff --git a/typedapi/ingest/geoipstats/response.go b/typedapi/ingest/geoipstats/response.go index 635edbd54b..30367740fd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package geoipstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package geoipstats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/geo_ip_stats/IngestGeoIpStatsResponse.ts#L24-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 new file mode 100644 index 0000000000..6d715742a5 --- /dev/null +++ b/typedapi/ingest/getgeoipdatabase/get_geoip_database.go @@ -0,0 +1,367 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Get GeoIP database configurations. +// Get information about one or more IP geolocation database configurations. +package getgeoipdatabase + +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/v8/typedapi/types" +) + +const ( + idMask = 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 GetGeoipDatabase struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + id string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewGetGeoipDatabase type alias for index. +type NewGetGeoipDatabase func() *GetGeoipDatabase + +// NewGetGeoipDatabaseFunc returns a new instance of GetGeoipDatabase with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewGetGeoipDatabaseFunc(tp elastictransport.Interface) NewGetGeoipDatabase { + return func() *GetGeoipDatabase { + n := New(tp) + + return n + } +} + +// Get GeoIP database configurations. +// Get information about one or more IP geolocation database configurations. +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/get-geoip-database-api.html +func New(tp elastictransport.Interface) *GetGeoipDatabase { + r := &GetGeoipDatabase{ + 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 *GetGeoipDatabase) 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("_ingest") + path.WriteString("/") + path.WriteString("geoip") + path.WriteString("/") + path.WriteString("database") + + method = http.MethodGet + case r.paramSet == idMask: + path.WriteString("/") + path.WriteString("_ingest") + path.WriteString("/") + path.WriteString("geoip") + path.WriteString("/") + path.WriteString("database") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", r.id) + } + path.WriteString(r.id) + + method = http.MethodGet + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r GetGeoipDatabase) 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, "ingest.get_geoip_database") + 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, "ingest.get_geoip_database") + if reader := instrument.RecordRequestBody(ctx, "ingest.get_geoip_database", 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", "ingest.get_geoip_database") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the GetGeoipDatabase 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 getgeoipdatabase.Response +func (r GetGeoipDatabase) 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, "ingest.get_geoip_database") + 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 GetGeoipDatabase) 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, "ingest.get_geoip_database") + 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 GetGeoipDatabase 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 GetGeoipDatabase headers map. +func (r *GetGeoipDatabase) Header(key, value string) *GetGeoipDatabase { + r.headers.Set(key, value) + + return r +} + +// Id Comma-separated list of database configuration IDs to retrieve. +// Wildcard (`*`) expressions are supported. +// To get all database configurations, omit this parameter or use `*`. +// API Name: id +func (r *GetGeoipDatabase) Id(id string) *GetGeoipDatabase { + r.paramSet |= idMask + r.id = id + + 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 *GetGeoipDatabase) MasterTimeout(duration string) *GetGeoipDatabase { + 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 *GetGeoipDatabase) ErrorTrace(errortrace bool) *GetGeoipDatabase { + 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 *GetGeoipDatabase) FilterPath(filterpaths ...string) *GetGeoipDatabase { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"eixsts_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *GetGeoipDatabase) Human(human bool) *GetGeoipDatabase { + 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 *GetGeoipDatabase) Pretty(pretty bool) *GetGeoipDatabase { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/ingest/getgeoipdatabase/response.go b/typedapi/ingest/getgeoipdatabase/response.go new file mode 100644 index 0000000000..35957c3c3d --- /dev/null +++ b/typedapi/ingest/getgeoipdatabase/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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package getgeoipdatabase + +import ( + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// Response holds the response body struct for the package getgeoipdatabase +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L25-L27 +type Response struct { + Databases []types.DatabaseConfigurationMetadata `json:"databases"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/ingest/getpipeline/get_pipeline.go b/typedapi/ingest/getpipeline/get_pipeline.go index 517159f9b0..42987f4abc 100644 --- a/typedapi/ingest/getpipeline/get_pipeline.go +++ b/typedapi/ingest/getpipeline/get_pipeline.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns information about one or more ingest pipelines. +// Get pipelines. +// Get information about one or more ingest pipelines. // This API returns a local reference of the pipeline. package getpipeline @@ -75,7 +76,8 @@ func NewGetPipelineFunc(tp elastictransport.Interface) NewGetPipeline { } } -// Returns information about one or more ingest pipelines. +// Get pipelines. +// Get information about one or more ingest pipelines. // This API returns a local reference of the pipeline. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-pipeline-api.html diff --git a/typedapi/ingest/getpipeline/response.go b/typedapi/ingest/getpipeline/response.go index 4398fb4529..177a6e782e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getpipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/get_pipeline/GetPipelineResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ba28bfd9cd..ad09291e23 100644 --- a/typedapi/ingest/processorgrok/processor_grok.go +++ b/typedapi/ingest/processorgrok/processor_grok.go @@ -16,11 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Extracts structured fields out of a single text field within a document. -// You choose which field to extract matched fields from, as well as the grok -// pattern you expect will match. +// 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. package processorgrok @@ -72,9 +73,10 @@ func NewProcessorGrokFunc(tp elastictransport.Interface) NewProcessorGrok { } } -// Extracts structured fields out of a single text field within a document. -// You choose which field to extract matched fields from, as well as the grok -// pattern you expect will match. +// 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. // diff --git a/typedapi/ingest/processorgrok/response.go b/typedapi/ingest/processorgrok/response.go index a6863db25b..50445f467b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package processorgrok // Response holds the response body struct for the package processorgrok // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/processor_grok/GrokProcessorPatternsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 new file mode 100644 index 0000000000..a4fd65b05e --- /dev/null +++ b/typedapi/ingest/putgeoipdatabase/put_geoip_database.go @@ -0,0 +1,404 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Create or update GeoIP database configurations. +// Create or update IP geolocation database configurations. +package putgeoipdatabase + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +const ( + idMask = 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 PutGeoipDatabase 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 + + id string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutGeoipDatabase type alias for index. +type NewPutGeoipDatabase func(id string) *PutGeoipDatabase + +// NewPutGeoipDatabaseFunc returns a new instance of PutGeoipDatabase with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutGeoipDatabaseFunc(tp elastictransport.Interface) NewPutGeoipDatabase { + return func(id string) *PutGeoipDatabase { + n := New(tp) + + n._id(id) + + return n + } +} + +// Create or update GeoIP database configurations. +// Create or update IP geolocation database configurations. +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/put-geoip-database-api.html +func New(tp elastictransport.Interface) *PutGeoipDatabase { + r := &PutGeoipDatabase{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + + req: NewRequest(), + } + + 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 *PutGeoipDatabase) Raw(raw io.Reader) *PutGeoipDatabase { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutGeoipDatabase) Request(req *Request) *PutGeoipDatabase { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutGeoipDatabase) 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 PutGeoipDatabase: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == idMask: + path.WriteString("/") + path.WriteString("_ingest") + path.WriteString("/") + path.WriteString("geoip") + path.WriteString("/") + path.WriteString("database") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", r.id) + } + path.WriteString(r.id) + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=8") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r PutGeoipDatabase) 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, "ingest.put_geoip_database") + 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, "ingest.put_geoip_database") + if reader := instrument.RecordRequestBody(ctx, "ingest.put_geoip_database", 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", "ingest.put_geoip_database") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutGeoipDatabase 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 putgeoipdatabase.Response +func (r PutGeoipDatabase) 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, "ingest.put_geoip_database") + 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 PutGeoipDatabase headers map. +func (r *PutGeoipDatabase) Header(key, value string) *PutGeoipDatabase { + r.headers.Set(key, value) + + return r +} + +// Id ID of the database configuration to create or update. +// API Name: id +func (r *PutGeoipDatabase) _id(id string) *PutGeoipDatabase { + r.paramSet |= idMask + r.id = id + + 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 *PutGeoipDatabase) MasterTimeout(duration string) *PutGeoipDatabase { + 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 *PutGeoipDatabase) Timeout(duration string) *PutGeoipDatabase { + 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 *PutGeoipDatabase) ErrorTrace(errortrace bool) *PutGeoipDatabase { + 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 *PutGeoipDatabase) FilterPath(filterpaths ...string) *PutGeoipDatabase { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"eixsts_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *PutGeoipDatabase) Human(human bool) *PutGeoipDatabase { + 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 *PutGeoipDatabase) Pretty(pretty bool) *PutGeoipDatabase { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// Maxmind The configuration necessary to identify which IP geolocation provider to use +// to download the database, as well as any provider-specific configuration +// necessary for such downloading. +// At present, the only supported provider is maxmind, and the maxmind provider +// requires that an account_id (string) is configured. +// API name: maxmind +func (r *PutGeoipDatabase) Maxmind(maxmind *types.Maxmind) *PutGeoipDatabase { + + r.req.Maxmind = *maxmind + + return r +} + +// Name The provider-assigned name of the IP geolocation database to download. +// API name: name +func (r *PutGeoipDatabase) Name(name string) *PutGeoipDatabase { + r.req.Name = name + + return r +} diff --git a/typedapi/ingest/putgeoipdatabase/request.go b/typedapi/ingest/putgeoipdatabase/request.go new file mode 100644 index 0000000000..03174a44bb --- /dev/null +++ b/typedapi/ingest/putgeoipdatabase/request.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package putgeoipdatabase + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// Request holds the request body struct for the package putgeoipdatabase +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/put_geoip_database/PutGeoipDatabaseRequest.ts#L25-L58 +type Request struct { + + // Maxmind The configuration necessary to identify which IP geolocation provider to use + // to download the database, as well as any provider-specific configuration + // necessary for such downloading. + // At present, the only supported provider is maxmind, and the maxmind provider + // requires that an account_id (string) is configured. + Maxmind types.Maxmind `json:"maxmind"` + // Name The provider-assigned name of the IP geolocation database to download. + Name string `json:"name"` +} + +// 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 Putgeoipdatabase request: %w", err) + } + + return &req, nil +} + +func (s *Request) 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 "maxmind": + if err := dec.Decode(&s.Maxmind); err != nil { + return fmt.Errorf("%s | %w", "Maxmind", err) + } + + case "name": + if err := dec.Decode(&s.Name); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + + } + } + return nil +} diff --git a/typedapi/ingest/putgeoipdatabase/response.go b/typedapi/ingest/putgeoipdatabase/response.go new file mode 100644 index 0000000000..efb806070c --- /dev/null +++ b/typedapi/ingest/putgeoipdatabase/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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package putgeoipdatabase + +// Response holds the response body struct for the package putgeoipdatabase +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/put_geoip_database/PutGeoipDatabaseResponse.ts#L22-L24 +type Response struct { + + // Acknowledged For a successful response, this value is always true. On failure, an + // exception is returned instead. + Acknowledged bool `json:"acknowledged"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/ingest/putpipeline/put_pipeline.go b/typedapi/ingest/putpipeline/put_pipeline.go index 26fb01f8a9..a15f1dfcd3 100644 --- a/typedapi/ingest/putpipeline/put_pipeline.go +++ b/typedapi/ingest/putpipeline/put_pipeline.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates or updates an ingest pipeline. +// Create or update a pipeline. // Changes made using this API take effect immediately. package putpipeline @@ -82,7 +82,7 @@ func NewPutPipelineFunc(tp elastictransport.Interface) NewPutPipeline { } } -// Creates or updates an ingest pipeline. +// Create or update a pipeline. // Changes made using this API take effect immediately. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html @@ -387,6 +387,17 @@ func (r *PutPipeline) Pretty(pretty bool) *PutPipeline { return r } +// Deprecated Marks this ingest pipeline as deprecated. +// When a deprecated ingest pipeline is referenced as the default or final +// pipeline when creating or updating a non-deprecated index template, +// Elasticsearch will emit a deprecation warning. +// API name: deprecated +func (r *PutPipeline) Deprecated(deprecated bool) *PutPipeline { + r.req.Deprecated = &deprecated + + return r +} + // Description Description of the ingest pipeline. // API name: description func (r *PutPipeline) Description(description string) *PutPipeline { diff --git a/typedapi/ingest/putpipeline/request.go b/typedapi/ingest/putpipeline/request.go index 66dba321c9..48b5e47c3d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putpipeline @@ -33,9 +33,14 @@ import ( // Request holds the request body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/put_pipeline/PutPipelineRequest.ts#L25-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/put_pipeline/PutPipelineRequest.ts#L25-L84 type Request struct { + // Deprecated Marks this ingest pipeline as deprecated. + // When a deprecated ingest pipeline is referenced as the default or final + // pipeline when creating or updating a non-deprecated index template, + // Elasticsearch will emit a deprecation warning. + Deprecated *bool `json:"deprecated,omitempty"` // Description Description of the ingest pipeline. Description *string `json:"description,omitempty"` // Meta_ Optional metadata about the ingest pipeline. May have any contents. This map @@ -90,6 +95,20 @@ func (s *Request) UnmarshalJSON(data []byte) error { switch t { + case "deprecated": + 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", "Deprecated", err) + } + s.Deprecated = &value + case bool: + s.Deprecated = &v + } + case "description": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/ingest/putpipeline/response.go b/typedapi/ingest/putpipeline/response.go index f24c02fe16..5772ccd47b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putpipeline // Response holds the response body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/put_pipeline/PutPipelineResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/put_pipeline/PutPipelineResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ingest/simulate/request.go b/typedapi/ingest/simulate/request.go index bef29c246a..10b0bb2c81 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package simulate @@ -29,11 +29,11 @@ import ( // Request holds the request body struct for the package simulate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/simulate/SimulatePipelineRequest.ts#L25-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/simulate/SimulatePipelineRequest.ts#L25-L59 type Request struct { // Docs Sample documents to test in the pipeline. - Docs []types.Document `json:"docs,omitempty"` + Docs []types.Document `json:"docs"` // Pipeline Pipeline to test. // If you don’t specify the `pipeline` request path parameter, this parameter is // required. diff --git a/typedapi/ingest/simulate/response.go b/typedapi/ingest/simulate/response.go index e09cb17fa8..3aee5027f8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package simulate @@ -26,9 +26,9 @@ import ( // Response holds the response body struct for the package simulate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/simulate/SimulatePipelineResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/simulate/SimulatePipelineResponse.ts#L22-L24 type Response struct { - Docs []types.PipelineSimulation `json:"docs"` + Docs []types.SimulateDocumentResult `json:"docs"` } // NewResponse returns a Response diff --git a/typedapi/ingest/simulate/simulate.go b/typedapi/ingest/simulate/simulate.go index 15dc9dbbde..0382ab8e3d 100644 --- a/typedapi/ingest/simulate/simulate.go +++ b/typedapi/ingest/simulate/simulate.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Executes an ingest pipeline against a set of provided documents. +// 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. package simulate import ( @@ -79,7 +82,10 @@ func NewSimulateFunc(tp elastictransport.Interface) NewSimulate { } } -// Executes an ingest pipeline against a set of provided documents. +// Simulate a pipeline. +// Run an ingest pipeline against a set of provided documents. +// You can either specify an existing pipeline to use with the provided +// documents or supply a pipeline definition in the body of the request. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-pipeline-api.html func New(tp elastictransport.Interface) *Simulate { diff --git a/typedapi/license/delete/delete.go b/typedapi/license/delete/delete.go index 6093a70024..a372d6eb4a 100644 --- a/typedapi/license/delete/delete.go +++ b/typedapi/license/delete/delete.go @@ -16,9 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes licensing information for the cluster +// 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. package delete import ( @@ -68,7 +72,11 @@ func NewDeleteFunc(tp elastictransport.Interface) NewDelete { } } -// Deletes licensing information for the cluster +// Delete the license. +// When the license expires, your subscription level reverts to Basic. +// +// If the operator privileges feature is enabled, only operator users can use +// this API. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-license.html func New(tp elastictransport.Interface) *Delete { diff --git a/typedapi/license/delete/response.go b/typedapi/license/delete/response.go index 9c2aa7096f..1d8d00ba01 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/delete/DeleteLicenseResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/license/delete/DeleteLicenseResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/license/get/get.go b/typedapi/license/get/get.go index d53b7c456f..e3b13fdc67 100644 --- a/typedapi/license/get/get.go +++ b/typedapi/license/get/get.go @@ -16,13 +16,16 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get license information. -// Returns information about your Elastic license, including its type, its -// status, when it was issued, and when it expires. -// For more information about the different types of licenses, refer to [Elastic -// Stack subscriptions](https://www.elastic.co/subscriptions). +// Get information about your Elastic license including its type, its status, +// when it was issued, and when it expires. +// +// NOTE: 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. package get import ( @@ -73,10 +76,13 @@ func NewGetFunc(tp elastictransport.Interface) NewGet { } // Get license information. -// Returns information about your Elastic license, including its type, its -// status, when it was issued, and when it expires. -// For more information about the different types of licenses, refer to [Elastic -// Stack subscriptions](https://www.elastic.co/subscriptions). +// Get information about your Elastic license including its type, its status, +// when it was issued, and when it expires. +// +// NOTE: If the master node is generating a new cluster state, the get license +// API may return a `404 Not Found` response. +// If you receive an unexpected 404 response after cluster startup, wait a short +// period and retry the request. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-license.html func New(tp elastictransport.Interface) *Get { diff --git a/typedapi/license/get/response.go b/typedapi/license/get/response.go index 9aef6eced9..764d5a6845 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/get/GetLicenseResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 996cba8869..76604b629e 100644 --- a/typedapi/license/getbasicstatus/get_basic_status.go +++ b/typedapi/license/getbasicstatus/get_basic_status.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves information about the status of the basic license. +// Get the basic license status. package getbasicstatus import ( @@ -68,7 +68,7 @@ func NewGetBasicStatusFunc(tp elastictransport.Interface) NewGetBasicStatus { } } -// Retrieves information about the status of the basic license. +// Get the basic license status. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html func New(tp elastictransport.Interface) *GetBasicStatus { diff --git a/typedapi/license/getbasicstatus/response.go b/typedapi/license/getbasicstatus/response.go index 688355aef5..21de7e087d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getbasicstatus // Response holds the response body struct for the package getbasicstatus // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/get_basic_status/GetBasicLicenseStatusResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e2f62eb026..9b5abc4fba 100644 --- a/typedapi/license/gettrialstatus/get_trial_status.go +++ b/typedapi/license/gettrialstatus/get_trial_status.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves information about the status of the trial license. +// Get the trial status. package gettrialstatus import ( @@ -68,7 +68,7 @@ func NewGetTrialStatusFunc(tp elastictransport.Interface) NewGetTrialStatus { } } -// Retrieves information about the status of the trial license. +// Get the trial status. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trial-status.html func New(tp elastictransport.Interface) *GetTrialStatus { diff --git a/typedapi/license/gettrialstatus/response.go b/typedapi/license/gettrialstatus/response.go index adc2e06036..5c03e63af9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package gettrialstatus // Response holds the response body struct for the package gettrialstatus // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/get_trial_status/GetTrialLicenseStatusResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d74347b295..567ab30d0a 100644 --- a/typedapi/license/post/post.go +++ b/typedapi/license/post/post.go @@ -16,9 +16,22 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Updates the license for the cluster. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package post import ( @@ -73,7 +86,20 @@ func NewPostFunc(tp elastictransport.Interface) NewPost { } } -// Updates the license for the cluster. +// 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/guide/en/elasticsearch/reference/current/update-license.html func New(tp elastictransport.Interface) *Post { diff --git a/typedapi/license/post/request.go b/typedapi/license/post/request.go index 716b42b932..b42440a54b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package post @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/post/PostLicenseRequest.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/license/post/PostLicenseRequest.ts#L23-L51 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 c8d90bea9e..c6b9294982 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package post @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/post/PostLicenseResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 5bcb17a539..ae85cccd96 100644 --- a/typedapi/license/poststartbasic/post_start_basic.go +++ b/typedapi/license/poststartbasic/post_start_basic.go @@ -16,15 +16,21 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// The start basic API enables you to initiate an indefinite basic license, -// which gives access to all the basic features. 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 following API: [Get basic -// status](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html). +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package poststartbasic import ( @@ -74,13 +80,19 @@ func NewPostStartBasicFunc(tp elastictransport.Interface) NewPostStartBasic { } } -// The start basic API enables you to initiate an indefinite basic license, -// which gives access to all the basic features. 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 following API: [Get basic -// status](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html). +// Start a basic license. +// Start an indefinite basic license, which gives access to all the basic +// features. +// +// NOTE: In order to start a basic license, you must not currently have a basic +// license. +// +// If the basic license does not support all of the features that are available +// with your current license, however, you are notified in the response. +// You must then re-submit the API request with the `acknowledge` parameter set +// to `true`. +// +// To check the status of your basic license, use the get basic license API. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-basic.html func New(tp elastictransport.Interface) *PostStartBasic { diff --git a/typedapi/license/poststartbasic/response.go b/typedapi/license/poststartbasic/response.go index 3526be0e48..8873b50f30 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package poststartbasic @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package poststartbasic // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/post_start_basic/StartBasicLicenseResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 2a7a1e1d93..e3a5ae164f 100644 --- a/typedapi/license/poststarttrial/post_start_trial.go +++ b/typedapi/license/poststarttrial/post_start_trial.go @@ -16,10 +16,18 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// The start trial API enables you to start a 30-day trial, which gives access -// to all subscription features. +// 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. package poststarttrial import ( @@ -69,8 +77,16 @@ func NewPostStartTrialFunc(tp elastictransport.Interface) NewPostStartTrial { } } -// The start trial API enables you to start a 30-day trial, which gives access -// to all subscription features. +// Start a trial. +// Start a 30-day trial, which gives access to all subscription features. +// +// NOTE: You are allowed to start a trial only if your cluster has not already +// activated a trial for the current major product version. +// For example, if you have already activated a trial for v8.0, you cannot start +// a new trial until v9.0. You can, however, request an extended trial at +// https://www.elastic.co/trialextension. +// +// To check the status of your trial, use the get trial status API. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trial.html func New(tp elastictransport.Interface) *PostStartTrial { diff --git a/typedapi/license/poststarttrial/response.go b/typedapi/license/poststarttrial/response.go index 9db4650f60..1ba304a26e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package poststarttrial @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package poststarttrial // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/post_start_trial/StartTrialLicenseResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e27169ab11..7441cc07ed 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Deletes a pipeline used for Logstash Central Management. package deletepipeline diff --git a/typedapi/logstash/getpipeline/get_pipeline.go b/typedapi/logstash/getpipeline/get_pipeline.go index 0ff6f9e5d1..719bed1f70 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieves pipelines used for Logstash Central Management. package getpipeline diff --git a/typedapi/logstash/getpipeline/response.go b/typedapi/logstash/getpipeline/response.go index 82ef7be116..a6b9bb93b8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getpipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/logstash/get_pipeline/LogstashGetPipelineResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 8b3a870375..b7c6a0545e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Creates or updates a pipeline used for Logstash Central Management. package putpipeline diff --git a/typedapi/logstash/putpipeline/request.go b/typedapi/logstash/putpipeline/request.go index 357b036d64..fdc3ee4a11 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putpipeline @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L39 type Request = types.LogstashPipeline // NewRequest returns a Request diff --git a/typedapi/migration/deprecations/deprecations.go b/typedapi/migration/deprecations/deprecations.go index acfc4e5fac..0f95c23ab1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieves information about different cluster, node, and index level settings // that use deprecated features that will be removed or changed in the next diff --git a/typedapi/migration/deprecations/response.go b/typedapi/migration/deprecations/response.go index 4f2db77814..2e2d726db3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deprecations @@ -26,9 +26,10 @@ import ( // Response holds the response body struct for the package deprecations // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/migration/deprecations/DeprecationInfoResponse.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/migration/deprecations/DeprecationInfoResponse.ts#L23-L31 type Response struct { ClusterSettings []types.Deprecation `json:"cluster_settings"` + DataStreams map[string][]types.Deprecation `json:"data_streams"` IndexSettings map[string][]types.Deprecation `json:"index_settings"` MlSettings []types.Deprecation `json:"ml_settings"` NodeSettings []types.Deprecation `json:"node_settings"` @@ -37,6 +38,7 @@ type Response struct { // NewResponse returns a Response func NewResponse() *Response { r := &Response{ + DataStreams: make(map[string][]types.Deprecation, 0), IndexSettings: make(map[string][]types.Deprecation, 0), } return r diff --git a/typedapi/migration/getfeatureupgradestatus/get_feature_upgrade_status.go b/typedapi/migration/getfeatureupgradestatus/get_feature_upgrade_status.go index 2cd52a7ff5..0a62d8597d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Find out whether system features need to be upgraded or not package getfeatureupgradestatus diff --git a/typedapi/migration/getfeatureupgradestatus/response.go b/typedapi/migration/getfeatureupgradestatus/response.go index 9f4a740a3b..ac6fb22ea1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getfeatureupgradestatus @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package getfeatureupgradestatus // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 b4d59f098a..83b37ebb9f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Begin upgrades for system features package postfeatureupgrade diff --git a/typedapi/migration/postfeatureupgrade/response.go b/typedapi/migration/postfeatureupgrade/response.go index a61acc4a1b..0b7853ccaf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package postfeatureupgrade @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package postfeatureupgrade // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L20-L25 type Response struct { Accepted bool `json:"accepted"` Features []types.PostMigrationFeature `json:"features"` diff --git a/typedapi/ml/cleartrainedmodeldeploymentcache/clear_trained_model_deployment_cache.go b/typedapi/ml/cleartrainedmodeldeploymentcache/clear_trained_model_deployment_cache.go index d5e8e4b4c0..0e4bd32ddf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Clear trained model deployment cache. // Cache will be cleared on all nodes where the trained model is assigned. diff --git a/typedapi/ml/cleartrainedmodeldeploymentcache/response.go b/typedapi/ml/cleartrainedmodeldeploymentcache/response.go index 2c52ecc988..bce2b49b6d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package cleartrainedmodeldeploymentcache // Response holds the response body struct for the package cleartrainedmodeldeploymentcache // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/clear_trained_model_deployment_cache/MlClearTrainedModelDeploymentCacheResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d16dd2d810..9e72d965cc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Close anomaly detection jobs. // A job can be opened and closed multiple times throughout its lifecycle. A diff --git a/typedapi/ml/closejob/request.go b/typedapi/ml/closejob/request.go index 1c5147a0e4..8f85f986e1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package closejob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package closejob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/close_job/MlCloseJobRequest.ts#L24-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/close_job/MlCloseJobRequest.ts#L24-L78 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 e54b0270e2..14a64a0d98 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package closejob // Response holds the response body struct for the package closejob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/close_job/MlCloseJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 57e9e5de43..c475c2518f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete a calendar. // Removes all scheduled events from a calendar, then deletes it. diff --git a/typedapi/ml/deletecalendar/response.go b/typedapi/ml/deletecalendar/response.go index 0a62addc76..4f2ebbdd3b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletecalendar // Response holds the response body struct for the package deletecalendar // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_calendar/MlDeleteCalendarResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/delete_calendar/MlDeleteCalendarResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletecalendarevent/delete_calendar_event.go b/typedapi/ml/deletecalendarevent/delete_calendar_event.go index 02d281d21f..5af73acafc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete events from a calendar. package deletecalendarevent diff --git a/typedapi/ml/deletecalendarevent/response.go b/typedapi/ml/deletecalendarevent/response.go index 0823f4d190..ca1eff7483 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletecalendarevent // Response holds the response body struct for the package deletecalendarevent // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_calendar_event/MlDeleteCalendarEventResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/delete_calendar_event/MlDeleteCalendarEventResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletecalendarjob/delete_calendar_job.go b/typedapi/ml/deletecalendarjob/delete_calendar_job.go index bfb414fcde..20c52e184d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete anomaly jobs from a calendar. package deletecalendarjob diff --git a/typedapi/ml/deletecalendarjob/response.go b/typedapi/ml/deletecalendarjob/response.go index 664d3b5527..010885156a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletecalendarjob @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package deletecalendarjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_calendar_job/MlDeleteCalendarJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 cec39d36ea..ff1a981774 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete a datafeed. package deletedatafeed diff --git a/typedapi/ml/deletedatafeed/response.go b/typedapi/ml/deletedatafeed/response.go index 3531b72f0f..26f24dc63d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletedatafeed // Response holds the response body struct for the package deletedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_datafeed/MlDeleteDatafeedResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/delete_datafeed/MlDeleteDatafeedResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletedataframeanalytics/delete_data_frame_analytics.go b/typedapi/ml/deletedataframeanalytics/delete_data_frame_analytics.go index d996302978..0bd1d005af 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete a data frame analytics job. package deletedataframeanalytics diff --git a/typedapi/ml/deletedataframeanalytics/response.go b/typedapi/ml/deletedataframeanalytics/response.go index 6ef7c8a6cf..d454245ef9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletedataframeanalytics // Response holds the response body struct for the package deletedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_data_frame_analytics/MlDeleteDataFrameAnalyticsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/delete_data_frame_analytics/MlDeleteDataFrameAnalyticsResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deleteexpireddata/delete_expired_data.go b/typedapi/ml/deleteexpireddata/delete_expired_data.go index b9ef8aa8ae..705da3d71d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete expired ML data. // Deletes all job results, model snapshots and forecast data that have exceeded diff --git a/typedapi/ml/deleteexpireddata/request.go b/typedapi/ml/deleteexpireddata/request.go index 3bfc650b3d..89bf6771b6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleteexpireddata @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package deleteexpireddata // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_expired_data/MlDeleteExpiredDataRequest.ts#L25-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/delete_expired_data/MlDeleteExpiredDataRequest.ts#L25-L73 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 bd9e7add95..e4b7b50c47 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleteexpireddata // Response holds the response body struct for the package deleteexpireddata // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_expired_data/MlDeleteExpiredDataResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4a8bdb4679..d47e36ee1e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete a filter. // If an anomaly detection job references the filter, you cannot delete the diff --git a/typedapi/ml/deletefilter/response.go b/typedapi/ml/deletefilter/response.go index ef4a154a9f..d0bd0cdbc9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletefilter // Response holds the response body struct for the package deletefilter // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_filter/MlDeleteFilterResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/delete_filter/MlDeleteFilterResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deleteforecast/delete_forecast.go b/typedapi/ml/deleteforecast/delete_forecast.go index 7666c550e4..eaa5472b67 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete forecasts from a job. // By default, forecasts are retained for 14 days. You can specify a diff --git a/typedapi/ml/deleteforecast/response.go b/typedapi/ml/deleteforecast/response.go index 9d31efad75..32d80ac558 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleteforecast // Response holds the response body struct for the package deleteforecast // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_forecast/MlDeleteForecastResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/delete_forecast/MlDeleteForecastResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletejob/delete_job.go b/typedapi/ml/deletejob/delete_job.go index b9324ec699..9f89690026 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete an anomaly detection job. // All job configuration, model state and results are deleted. diff --git a/typedapi/ml/deletejob/response.go b/typedapi/ml/deletejob/response.go index 5f6d22c0d2..25a5b9b968 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletejob // Response holds the response body struct for the package deletejob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_job/MlDeleteJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/delete_job/MlDeleteJobResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletemodelsnapshot/delete_model_snapshot.go b/typedapi/ml/deletemodelsnapshot/delete_model_snapshot.go index c53037a835..62930eda3d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete a model snapshot. // You cannot delete the active model snapshot. To delete that snapshot, first diff --git a/typedapi/ml/deletemodelsnapshot/response.go b/typedapi/ml/deletemodelsnapshot/response.go index b23fba44de..f9222093cc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletemodelsnapshot // Response holds the response body struct for the package deletemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_model_snapshot/MlDeleteModelSnapshotResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/delete_model_snapshot/MlDeleteModelSnapshotResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletetrainedmodel/delete_trained_model.go b/typedapi/ml/deletetrainedmodel/delete_trained_model.go index f8dfe76612..00462e07c2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete an unreferenced trained model. // The request deletes a trained inference model that is not referenced by an diff --git a/typedapi/ml/deletetrainedmodel/response.go b/typedapi/ml/deletetrainedmodel/response.go index 3bbaa3e137..a06bb949a1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletetrainedmodel // Response holds the response body struct for the package deletetrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_trained_model/MlDeleteTrainedModelResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/delete_trained_model/MlDeleteTrainedModelResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletetrainedmodelalias/delete_trained_model_alias.go b/typedapi/ml/deletetrainedmodelalias/delete_trained_model_alias.go index 87ef1a70c3..48b3d994a5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete a trained model alias. // This API deletes an existing model alias that refers to a trained model. If diff --git a/typedapi/ml/deletetrainedmodelalias/response.go b/typedapi/ml/deletetrainedmodelalias/response.go index 556f94fe7d..a2af999792 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletetrainedmodelalias // Response holds the response body struct for the package deletetrainedmodelalias // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/delete_trained_model_alias/MlDeleteTrainedModelAliasResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/delete_trained_model_alias/MlDeleteTrainedModelAliasResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/estimatemodelmemory/estimate_model_memory.go b/typedapi/ml/estimatemodelmemory/estimate_model_memory.go index f2035b73a0..aabf459671 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Estimate job model memory usage. // Makes an estimation of the memory usage for an anomaly detection job model. diff --git a/typedapi/ml/estimatemodelmemory/request.go b/typedapi/ml/estimatemodelmemory/request.go index 02d8771928..de7c16cd8c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package estimatemodelmemory @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package estimatemodelmemory // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L63 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 ffdb6ebf7d..3067770b35 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package estimatemodelmemory // Response holds the response body struct for the package estimatemodelmemory // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/estimate_model_memory/MlEstimateModelMemoryResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 2a5a873d35..09ee3aab38 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Evaluate data frame analytics. // The API packages together commonly used evaluation metrics for various types diff --git a/typedapi/ml/evaluatedataframe/request.go b/typedapi/ml/evaluatedataframe/request.go index 631c9c38e1..326b4977f0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package evaluatedataframe @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package evaluatedataframe // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequest.ts#L25-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequest.ts#L25-L53 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 79a1205efa..592fd8087a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package evaluatedataframe @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package evaluatedataframe // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts#L26-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts#L26-L33 type Response struct { Classification *types.DataframeClassificationSummary `json:"classification,omitempty"` OutlierDetection *types.DataframeOutlierDetectionSummary `json:"outlier_detection,omitempty"` diff --git a/typedapi/ml/explaindataframeanalytics/explain_data_frame_analytics.go b/typedapi/ml/explaindataframeanalytics/explain_data_frame_analytics.go index 8bcaa2f27f..65976e0f3c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Explain data frame analytics config. // This API provides explanations for a data frame analytics config that either diff --git a/typedapi/ml/explaindataframeanalytics/request.go b/typedapi/ml/explaindataframeanalytics/request.go index d81279d591..e98ff4c381 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package explaindataframeanalytics @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package explaindataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsRequest.ts#L30-L107 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsRequest.ts#L30-L108 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 9ad2497b76..ae747fbf46 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package explaindataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explaindataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 8ad2f499e0..2b5d1d429a 100644 --- a/typedapi/ml/flushjob/flush_job.go +++ b/typedapi/ml/flushjob/flush_job.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Forces any buffered data to be processed by the job. +// 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 @@ -89,7 +89,7 @@ func NewFlushJobFunc(tp elastictransport.Interface) NewFlushJob { } } -// Forces any buffered data to be processed by the job. +// 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 diff --git a/typedapi/ml/flushjob/request.go b/typedapi/ml/flushjob/request.go index 9dbdafaa2d..95b9d8065c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package flushjob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package flushjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/flush_job/MlFlushJobRequest.ts#L24-L99 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/flush_job/MlFlushJobRequest.ts#L24-L100 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 97c257a9e5..59c8af6835 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package flushjob // Response holds the response body struct for the package flushjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/flush_job/MlFlushJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 edcd08b518..48d4828a0c 100644 --- a/typedapi/ml/forecast/forecast.go +++ b/typedapi/ml/forecast/forecast.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Predicts the future behavior of a time series by using its historical -// behavior. +// 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. +// `over_field_name` in its configuration. Forcasts predict future behavior +// based on historical data. package forecast import ( @@ -86,12 +86,12 @@ func NewForecastFunc(tp elastictransport.Interface) NewForecast { } } -// Predicts the future behavior of a time series by using its historical -// behavior. +// 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. +// `over_field_name` in its configuration. Forcasts predict future behavior +// based on historical data. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html func New(tp elastictransport.Interface) *Forecast { diff --git a/typedapi/ml/forecast/request.go b/typedapi/ml/forecast/request.go index 2432a524cf..bc65590a7b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package forecast @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package forecast // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/forecast/MlForecastJobRequest.ts#L24-L87 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/forecast/MlForecastJobRequest.ts#L24-L88 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 d537ff8271..fda23a63d7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package forecast // Response holds the response body struct for the package forecast // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/forecast/MlForecastJobResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 0a96d8cc9f..7f6e5dc5c9 100644 --- a/typedapi/ml/getbuckets/get_buckets.go +++ b/typedapi/ml/getbuckets/get_buckets.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves anomaly detection job results for one or more buckets. +// Get anomaly detection job results for buckets. // The API presents a chronological view of the records, grouped by bucket. package getbuckets @@ -85,7 +85,7 @@ func NewGetBucketsFunc(tp elastictransport.Interface) NewGetBuckets { } } -// Retrieves anomaly detection job results for one or more buckets. +// Get anomaly detection job results for buckets. // The API presents a chronological view of the records, grouped by bucket. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html diff --git a/typedapi/ml/getbuckets/request.go b/typedapi/ml/getbuckets/request.go index 17ba34d220..6656c59d0a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getbuckets @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_buckets/MlGetBucketsRequest.ts#L26-L133 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/get_buckets/MlGetBucketsRequest.ts#L26-L134 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 de8d396b39..755d1e2682 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getbuckets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_buckets/MlGetBucketsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 198aaf8162..cd00a90fa3 100644 --- a/typedapi/ml/getcalendarevents/get_calendar_events.go +++ b/typedapi/ml/getcalendarevents/get_calendar_events.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves information about the scheduled events in calendars. +// Get info about events in calendars. package getcalendarevents import ( @@ -76,7 +76,7 @@ func NewGetCalendarEventsFunc(tp elastictransport.Interface) NewGetCalendarEvent } } -// Retrieves information about the scheduled events in calendars. +// Get info about events in calendars. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html func New(tp elastictransport.Interface) *GetCalendarEvents { diff --git a/typedapi/ml/getcalendarevents/response.go b/typedapi/ml/getcalendarevents/response.go index 83015fb855..2585618182 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getcalendarevents @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_calendar_events/MlGetCalendarEventsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 8615f554e0..f1ca048307 100644 --- a/typedapi/ml/getcalendars/get_calendars.go +++ b/typedapi/ml/getcalendars/get_calendars.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves configuration information for calendars. +// Get calendar configuration info. package getcalendars import ( @@ -79,7 +79,7 @@ func NewGetCalendarsFunc(tp elastictransport.Interface) NewGetCalendars { } } -// Retrieves configuration information for calendars. +// Get calendar configuration info. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html func New(tp elastictransport.Interface) *GetCalendars { diff --git a/typedapi/ml/getcalendars/request.go b/typedapi/ml/getcalendars/request.go index 6f6f78800c..bb28988d72 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getcalendars @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package getcalendars // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_calendars/MlGetCalendarsRequest.ts#L25-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/get_calendars/MlGetCalendarsRequest.ts#L25-L52 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 b196d05a69..80cfce4190 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getcalendars @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcalendars // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_calendars/MlGetCalendarsResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 cb0e34e72e..81a129309b 100644 --- a/typedapi/ml/getcategories/get_categories.go +++ b/typedapi/ml/getcategories/get_categories.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves anomaly detection job results for one or more categories. +// Get anomaly detection job results for categories. package getcategories import ( @@ -84,7 +84,7 @@ func NewGetCategoriesFunc(tp elastictransport.Interface) NewGetCategories { } } -// Retrieves anomaly detection job results for one or more categories. +// Get anomaly detection job results for categories. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html func New(tp elastictransport.Interface) *GetCategories { diff --git a/typedapi/ml/getcategories/request.go b/typedapi/ml/getcategories/request.go index dfe06da10d..c1a856b8fd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getcategories @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package getcategories // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_categories/MlGetCategoriesRequest.ts#L25-L70 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/get_categories/MlGetCategoriesRequest.ts#L25-L71 type Request struct { // Page Configures pagination. diff --git a/typedapi/ml/getcategories/response.go b/typedapi/ml/getcategories/response.go index 7f44e61e83..d98da1bb86 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getcategories @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcategories // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_categories/MlGetCategoriesResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 6fcef44844..9f513f8ec7 100644 --- a/typedapi/ml/getdatafeeds/get_datafeeds.go +++ b/typedapi/ml/getdatafeeds/get_datafeeds.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves configuration information for datafeeds. +// 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 @@ -79,7 +79,7 @@ func NewGetDatafeedsFunc(tp elastictransport.Interface) NewGetDatafeeds { } } -// Retrieves configuration information for datafeeds. +// 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 diff --git a/typedapi/ml/getdatafeeds/response.go b/typedapi/ml/getdatafeeds/response.go index 3223a4e031..e5df3d087a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getdatafeeds @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatafeeds // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_datafeeds/MlGetDatafeedsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 a2e8930fcb..6263bfa8d5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves usage information for datafeeds. +// 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 @@ -80,7 +80,7 @@ func NewGetDatafeedStatsFunc(tp elastictransport.Interface) NewGetDatafeedStats } } -// Retrieves usage information for datafeeds. +// 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 diff --git a/typedapi/ml/getdatafeedstats/response.go b/typedapi/ml/getdatafeedstats/response.go index 32eb425527..56b6f62d38 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getdatafeedstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatafeedstats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_datafeed_stats/MlGetDatafeedStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 104a13789f..4da2667702 100644 --- a/typedapi/ml/getdataframeanalytics/get_data_frame_analytics.go +++ b/typedapi/ml/getdataframeanalytics/get_data_frame_analytics.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves configuration information for data frame analytics jobs. +// 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. @@ -77,7 +77,7 @@ func NewGetDataFrameAnalyticsFunc(tp elastictransport.Interface) NewGetDataFrame } } -// Retrieves configuration information for data frame analytics jobs. +// 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. diff --git a/typedapi/ml/getdataframeanalytics/response.go b/typedapi/ml/getdataframeanalytics/response.go index 0347b027c8..96ebcee362 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getdataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_data_frame_analytics/MlGetDataFrameAnalyticsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 929c390be3..445a62d112 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves usage information for data frame analytics jobs. +// Get data frame analytics jobs usage info. package getdataframeanalyticsstats import ( @@ -74,7 +74,7 @@ func NewGetDataFrameAnalyticsStatsFunc(tp elastictransport.Interface) NewGetData } } -// Retrieves usage information for data frame analytics jobs. +// Get data frame analytics jobs usage info. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html func New(tp elastictransport.Interface) *GetDataFrameAnalyticsStats { diff --git a/typedapi/ml/getdataframeanalyticsstats/response.go b/typedapi/ml/getdataframeanalyticsstats/response.go index 8feb5b974f..5fd4e75586 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getdataframeanalyticsstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdataframeanalyticsstats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_data_frame_analytics_stats/MlGetDataFrameAnalyticsStatsResponse.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d26fd22644..e82ad0974a 100644 --- a/typedapi/ml/getfilters/get_filters.go +++ b/typedapi/ml/getfilters/get_filters.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves filters. +// Get filters. // You can get a single filter or all filters. package getfilters @@ -75,7 +75,7 @@ func NewGetFiltersFunc(tp elastictransport.Interface) NewGetFilters { } } -// Retrieves filters. +// Get filters. // You can get a single filter or all filters. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html diff --git a/typedapi/ml/getfilters/response.go b/typedapi/ml/getfilters/response.go index e2d71672c5..bfe6c827d0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getfilters @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfilters // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_filters/MlGetFiltersResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e00607e4cb..5175acf981 100644 --- a/typedapi/ml/getinfluencers/get_influencers.go +++ b/typedapi/ml/getinfluencers/get_influencers.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves anomaly detection job results for one or more influencers. +// 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. @@ -84,7 +84,7 @@ func NewGetInfluencersFunc(tp elastictransport.Interface) NewGetInfluencers { } } -// Retrieves anomaly detection job results for one or more influencers. +// 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. diff --git a/typedapi/ml/getinfluencers/request.go b/typedapi/ml/getinfluencers/request.go index 1a5ad20ea5..03b5a2cbed 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getinfluencers @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package getinfluencers // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_influencers/MlGetInfluencersRequest.ts#L26-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/get_influencers/MlGetInfluencersRequest.ts#L26-L98 type Request struct { // Page Configures pagination. diff --git a/typedapi/ml/getinfluencers/response.go b/typedapi/ml/getinfluencers/response.go index 7960c6cab8..33bf36f572 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getinfluencers @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getinfluencers // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_influencers/MlGetInfluencersResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 49bcd1e40b..0e41ba7c9c 100644 --- a/typedapi/ml/getjobs/get_jobs.go +++ b/typedapi/ml/getjobs/get_jobs.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves configuration information for anomaly detection jobs. +// 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 @@ -78,7 +78,7 @@ func NewGetJobsFunc(tp elastictransport.Interface) NewGetJobs { } } -// Retrieves configuration information for anomaly detection jobs. +// 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 diff --git a/typedapi/ml/getjobs/response.go b/typedapi/ml/getjobs/response.go index 4a574309f2..b306890ea5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getjobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobs // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_jobs/MlGetJobsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e225ff0c69..39b898274c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves usage information for anomaly detection jobs. +// Get anomaly detection jobs usage info. package getjobstats import ( @@ -74,7 +74,7 @@ func NewGetJobStatsFunc(tp elastictransport.Interface) NewGetJobStats { } } -// Retrieves usage information for anomaly detection jobs. +// Get anomaly detection jobs usage info. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html func New(tp elastictransport.Interface) *GetJobStats { diff --git a/typedapi/ml/getjobstats/response.go b/typedapi/ml/getjobstats/response.go index 350e884adf..991bed091a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getjobstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobstats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_job_stats/MlGetJobStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 70abd85868..e69c9df65c 100644 --- a/typedapi/ml/getmemorystats/get_memory_stats.go +++ b/typedapi/ml/getmemorystats/get_memory_stats.go @@ -16,8 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// 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. @@ -76,6 +77,7 @@ func NewGetMemoryStatsFunc(tp elastictransport.Interface) NewGetMemoryStats { } } +// 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. diff --git a/typedapi/ml/getmemorystats/response.go b/typedapi/ml/getmemorystats/response.go index 29ddfea72b..b2ca6f98e2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getmemorystats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmemorystats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_memory_stats/MlGetMemoryStatsResponse.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4c0c685f41..6704748ed1 100644 --- a/typedapi/ml/getmodelsnapshots/get_model_snapshots.go +++ b/typedapi/ml/getmodelsnapshots/get_model_snapshots.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves information about model snapshots. +// Get model snapshots info. package getmodelsnapshots import ( @@ -84,7 +84,7 @@ func NewGetModelSnapshotsFunc(tp elastictransport.Interface) NewGetModelSnapshot } } -// Retrieves information about model snapshots. +// Get model snapshots info. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html func New(tp elastictransport.Interface) *GetModelSnapshots { diff --git a/typedapi/ml/getmodelsnapshots/request.go b/typedapi/ml/getmodelsnapshots/request.go index 82df599e48..a2be99a04c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getmodelsnapshots @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getmodelsnapshots // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts#L26-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts#L26-L97 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 68316a4304..8a26a89d15 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getmodelsnapshots @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmodelsnapshots // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_model_snapshots/MlGetModelSnapshotsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e44e117938..998bd44346 100644 --- a/typedapi/ml/getmodelsnapshotupgradestats/get_model_snapshot_upgrade_stats.go +++ b/typedapi/ml/getmodelsnapshotupgradestats/get_model_snapshot_upgrade_stats.go @@ -16,10 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves usage information for anomaly detection job model snapshot -// upgrades. +// Get anomaly detection job model snapshot upgrade usage info. package getmodelsnapshotupgradestats import ( @@ -82,8 +81,7 @@ func NewGetModelSnapshotUpgradeStatsFunc(tp elastictransport.Interface) NewGetMo } } -// Retrieves usage information for anomaly detection job model snapshot -// upgrades. +// Get anomaly detection job model snapshot upgrade usage info. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html func New(tp elastictransport.Interface) *GetModelSnapshotUpgradeStats { diff --git a/typedapi/ml/getmodelsnapshotupgradestats/response.go b/typedapi/ml/getmodelsnapshotupgradestats/response.go index e3288bd45e..f4772f3876 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getmodelsnapshotupgradestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmodelsnapshotupgradestats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_model_snapshot_upgrade_stats/MlGetModelSnapshotUpgradeStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 a221f531fe..e08c2437c8 100644 --- a/typedapi/ml/getoverallbuckets/get_overall_buckets.go +++ b/typedapi/ml/getoverallbuckets/get_overall_buckets.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves overall bucket results that summarize the bucket results of +// 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 @@ -97,7 +99,9 @@ func NewGetOverallBucketsFunc(tp elastictransport.Interface) NewGetOverallBucket } } -// Retrieves overall bucket results that summarize the bucket results of +// 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 diff --git a/typedapi/ml/getoverallbuckets/request.go b/typedapi/ml/getoverallbuckets/request.go index b2f2eb191f..a13241a318 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getoverallbuckets @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getoverallbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L143 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L146 type Request struct { // AllowNoMatch Refer to the description for the `allow_no_match` query parameter. diff --git a/typedapi/ml/getoverallbuckets/response.go b/typedapi/ml/getoverallbuckets/response.go index f874addb1f..5ce232fbaf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getoverallbuckets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getoverallbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_overall_buckets/MlGetOverallBucketsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 9a5449773a..46802c148e 100644 --- a/typedapi/ml/getrecords/get_records.go +++ b/typedapi/ml/getrecords/get_records.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves anomaly records for an anomaly detection job. +// 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. @@ -91,7 +91,7 @@ func NewGetRecordsFunc(tp elastictransport.Interface) NewGetRecords { } } -// Retrieves anomaly records for an anomaly detection job. +// 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. diff --git a/typedapi/ml/getrecords/request.go b/typedapi/ml/getrecords/request.go index 832c40e4ff..3ae8149ccd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getrecords @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getrecords // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts#L26-L127 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts#L26-L128 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 e749b501a9..2eedea3b25 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getrecords @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrecords // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_records/MlGetAnomalyRecordsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 a6a8748c89..ce282b8b37 100644 --- a/typedapi/ml/gettrainedmodels/get_trained_models.go +++ b/typedapi/ml/gettrainedmodels/get_trained_models.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves configuration information for a trained model. +// Get trained model configuration info. package gettrainedmodels import ( @@ -75,7 +75,7 @@ func NewGetTrainedModelsFunc(tp elastictransport.Interface) NewGetTrainedModels } } -// Retrieves configuration information for a trained model. +// Get trained model configuration info. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html func New(tp elastictransport.Interface) *GetTrainedModels { @@ -360,6 +360,14 @@ func (r *GetTrainedModels) Include(include include.Include) *GetTrainedModels { return r } +// IncludeModelDefinition parameter is deprecated! Use [include=definition] instead +// API name: include_model_definition +func (r *GetTrainedModels) IncludeModelDefinition(includemodeldefinition bool) *GetTrainedModels { + r.values.Set("include_model_definition", strconv.FormatBool(includemodeldefinition)) + + return r +} + // Size Specifies the maximum number of models to obtain. // API name: size func (r *GetTrainedModels) Size(size int) *GetTrainedModels { diff --git a/typedapi/ml/gettrainedmodels/response.go b/typedapi/ml/gettrainedmodels/response.go index 888316ebc1..eeb897e81d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package gettrainedmodels @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettrainedmodels // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_trained_models/MlGetTrainedModelResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ee74ab5aaf..e922d4b186 100644 --- a/typedapi/ml/gettrainedmodelsstats/get_trained_models_stats.go +++ b/typedapi/ml/gettrainedmodelsstats/get_trained_models_stats.go @@ -16,10 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves usage information for trained models. You can get usage information -// for multiple trained +// 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. package gettrainedmodelsstats @@ -77,8 +77,8 @@ func NewGetTrainedModelsStatsFunc(tp elastictransport.Interface) NewGetTrainedMo } } -// Retrieves usage information for trained models. You can get usage information -// for multiple trained +// 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. // diff --git a/typedapi/ml/gettrainedmodelsstats/response.go b/typedapi/ml/gettrainedmodelsstats/response.go index 207aa6a933..335782c895 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package gettrainedmodelsstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettrainedmodelsstats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_trained_models_stats/MlGetTrainedModelStatsResponse.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 53b41dc133..fbfb7ae3d8 100644 --- a/typedapi/ml/infertrainedmodel/infer_trained_model.go +++ b/typedapi/ml/infertrainedmodel/infer_trained_model.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Evaluates a trained model. +// Evaluate a trained model. package infertrainedmodel import ( @@ -81,7 +81,7 @@ func NewInferTrainedModelFunc(tp elastictransport.Interface) NewInferTrainedMode } } -// Evaluates a trained model. +// Evaluate a trained model. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-trained-model.html func New(tp elastictransport.Interface) *InferTrainedModel { diff --git a/typedapi/ml/infertrainedmodel/request.go b/typedapi/ml/infertrainedmodel/request.go index b6d0e35feb..01d31d4b1c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package infertrainedmodel @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package infertrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/infer_trained_model/MlInferTrainedModelRequest.ts#L27-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/infer_trained_model/MlInferTrainedModelRequest.ts#L27-L60 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 d8e11f7b30..37b878d3fb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package infertrainedmodel @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package infertrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/infer_trained_model/MlInferTrainedModelResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4a5483fe20..48351e2abc 100644 --- a/typedapi/ml/info/info.go +++ b/typedapi/ml/info/info.go @@ -16,8 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Return ML defaults and limits. // Returns 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 @@ -74,6 +75,7 @@ func NewInfoFunc(tp elastictransport.Interface) NewInfo { } } +// Return ML defaults and limits. // Returns 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 diff --git a/typedapi/ml/info/response.go b/typedapi/ml/info/response.go index 550838a6c6..1c1096eae8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/info/MlInfoResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 259b2917df..be10a073fb 100644 --- a/typedapi/ml/openjob/open_job.go +++ b/typedapi/ml/openjob/open_job.go @@ -16,12 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Open anomaly detection jobs. -// An anomaly detection job must be opened in order for it to be ready to -// receive and analyze data. It can be opened and closed multiple times -// throughout its lifecycle. +// 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 @@ -89,9 +88,8 @@ func NewOpenJobFunc(tp elastictransport.Interface) NewOpenJob { } // Open anomaly detection jobs. -// An anomaly detection job must be opened in order for it to be ready to -// receive and analyze data. It can be opened and closed multiple times -// throughout its lifecycle. +// 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 diff --git a/typedapi/ml/openjob/request.go b/typedapi/ml/openjob/request.go index 4268a11a2f..1a021b9147 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package openjob @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package openjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/open_job/MlOpenJobRequest.ts#L24-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/open_job/MlOpenJobRequest.ts#L24-L59 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 e34bef89ec..0d1109dc2d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package openjob // Response holds the response body struct for the package openjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/open_job/MlOpenJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1eafb0f8f6..fcc4ad238c 100644 --- a/typedapi/ml/postcalendarevents/post_calendar_events.go +++ b/typedapi/ml/postcalendarevents/post_calendar_events.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Adds scheduled events to a calendar. +// Add scheduled events to the calendar. package postcalendarevents import ( @@ -81,7 +81,7 @@ func NewPostCalendarEventsFunc(tp elastictransport.Interface) NewPostCalendarEve } } -// Adds scheduled events to a calendar. +// Add scheduled events to the calendar. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html func New(tp elastictransport.Interface) *PostCalendarEvents { diff --git a/typedapi/ml/postcalendarevents/request.go b/typedapi/ml/postcalendarevents/request.go index 6a6b697cd6..0f5febc78b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package postcalendarevents @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package postcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/post_calendar_events/MlPostCalendarEventsRequest.ts#L24-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/post_calendar_events/MlPostCalendarEventsRequest.ts#L24-L41 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 0985aa767a..4b0d0c284c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package postcalendarevents @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package postcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/post_calendar_events/MlPostCalendarEventsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 b8c863720d..1d90e82ca3 100644 --- a/typedapi/ml/postdata/post_data.go +++ b/typedapi/ml/postdata/post_data.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Sends data to an anomaly detection job for analysis. +// 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. @@ -86,7 +86,7 @@ func NewPostDataFunc(tp elastictransport.Interface) NewPostData { } } -// Sends data to an anomaly detection job for analysis. +// 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. diff --git a/typedapi/ml/postdata/request.go b/typedapi/ml/postdata/request.go index de81356792..1fa370f7de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package postdata @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package postdata // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/post_data/MlPostJobDataRequest.ts#L24-L68 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/post_data/MlPostJobDataRequest.ts#L24-L69 type Request = []json.RawMessage // NewRequest returns a Request diff --git a/typedapi/ml/postdata/response.go b/typedapi/ml/postdata/response.go index 65dad48f89..ffd3db1999 100644 --- a/typedapi/ml/postdata/response.go +++ b/typedapi/ml/postdata/response.go @@ -16,29 +16,32 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package postdata // Response holds the response body struct for the package postdata // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/post_data/MlPostJobDataResponse.ts#L23-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/post_data/MlPostJobDataResponse.ts#L24-L45 type Response struct { - BucketCount int64 `json:"bucket_count"` - EarliestRecordTimestamp int64 `json:"earliest_record_timestamp"` - EmptyBucketCount int64 `json:"empty_bucket_count"` - InputBytes int64 `json:"input_bytes"` - InputFieldCount int64 `json:"input_field_count"` - InputRecordCount int64 `json:"input_record_count"` - InvalidDateCount int64 `json:"invalid_date_count"` - JobId string `json:"job_id"` - LastDataTime int `json:"last_data_time"` - LatestRecordTimestamp int64 `json:"latest_record_timestamp"` - MissingFieldCount int64 `json:"missing_field_count"` - OutOfOrderTimestampCount int64 `json:"out_of_order_timestamp_count"` - ProcessedFieldCount int64 `json:"processed_field_count"` - ProcessedRecordCount int64 `json:"processed_record_count"` - SparseBucketCount int64 `json:"sparse_bucket_count"` + BucketCount int64 `json:"bucket_count"` + EarliestRecordTimestamp *int64 `json:"earliest_record_timestamp,omitempty"` + EmptyBucketCount int64 `json:"empty_bucket_count"` + InputBytes int64 `json:"input_bytes"` + InputFieldCount int64 `json:"input_field_count"` + InputRecordCount int64 `json:"input_record_count"` + InvalidDateCount int64 `json:"invalid_date_count"` + JobId string `json:"job_id"` + LastDataTime *int64 `json:"last_data_time,omitempty"` + LatestEmptyBucketTimestamp *int64 `json:"latest_empty_bucket_timestamp,omitempty"` + LatestRecordTimestamp *int64 `json:"latest_record_timestamp,omitempty"` + LatestSparseBucketTimestamp *int64 `json:"latest_sparse_bucket_timestamp,omitempty"` + LogTime *int64 `json:"log_time,omitempty"` + MissingFieldCount int64 `json:"missing_field_count"` + OutOfOrderTimestampCount int64 `json:"out_of_order_timestamp_count"` + ProcessedFieldCount int64 `json:"processed_field_count"` + ProcessedRecordCount int64 `json:"processed_record_count"` + SparseBucketCount int64 `json:"sparse_bucket_count"` } // NewResponse returns a Response diff --git a/typedapi/ml/previewdatafeed/preview_datafeed.go b/typedapi/ml/previewdatafeed/preview_datafeed.go index 932f4b92e6..5477dc6f78 100644 --- a/typedapi/ml/previewdatafeed/preview_datafeed.go +++ b/typedapi/ml/previewdatafeed/preview_datafeed.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Previews a datafeed. +// 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 @@ -92,7 +92,7 @@ func NewPreviewDatafeedFunc(tp elastictransport.Interface) NewPreviewDatafeed { } } -// Previews a datafeed. +// 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 diff --git a/typedapi/ml/previewdatafeed/request.go b/typedapi/ml/previewdatafeed/request.go index 4dfe22b61b..a1705a55d3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package previewdatafeed @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package previewdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/preview_datafeed/MlPreviewDatafeedRequest.ts#L26-L69 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/preview_datafeed/MlPreviewDatafeedRequest.ts#L26-L70 type Request struct { // DatafeedConfig The datafeed definition to preview. diff --git a/typedapi/ml/previewdatafeed/response.go b/typedapi/ml/previewdatafeed/response.go index cbef6ade46..993f904682 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package previewdatafeed @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package previewdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/preview_datafeed/MlPreviewDatafeedResponse.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 7dd90baf7b..4ecd75c1af 100644 --- a/typedapi/ml/previewdataframeanalytics/preview_data_frame_analytics.go +++ b/typedapi/ml/previewdataframeanalytics/preview_data_frame_analytics.go @@ -16,8 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Preview features used by data frame analytics. // Previews the extracted features used by a data frame analytics config. package previewdataframeanalytics @@ -79,6 +80,7 @@ func NewPreviewDataFrameAnalyticsFunc(tp elastictransport.Interface) NewPreviewD } } +// Preview features used by data frame analytics. // Previews the extracted features used by a data frame analytics config. // // http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html diff --git a/typedapi/ml/previewdataframeanalytics/request.go b/typedapi/ml/previewdataframeanalytics/request.go index 2faac85d1b..558641c400 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package previewdataframeanalytics @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package previewdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsRequest.ts#L24-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsRequest.ts#L24-L49 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 c1ed86cbad..f9c5076cd0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package previewdataframeanalytics // Response holds the response body struct for the package previewdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d5128e2340..c882553cc7 100644 --- a/typedapi/ml/putcalendar/put_calendar.go +++ b/typedapi/ml/putcalendar/put_calendar.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a calendar. +// Create a calendar. package putcalendar import ( @@ -81,7 +81,7 @@ func NewPutCalendarFunc(tp elastictransport.Interface) NewPutCalendar { } } -// Creates a calendar. +// Create a calendar. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html func New(tp elastictransport.Interface) *PutCalendar { diff --git a/typedapi/ml/putcalendar/request.go b/typedapi/ml/putcalendar/request.go index 78d55e6c56..ef57dafb19 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putcalendar @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package putcalendar // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_calendar/MlPutCalendarRequest.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_calendar/MlPutCalendarRequest.ts#L23-L44 type Request struct { // Description A description of the calendar. diff --git a/typedapi/ml/putcalendar/response.go b/typedapi/ml/putcalendar/response.go index 21c3266414..4508be36aa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putcalendar @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package putcalendar // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_calendar/MlPutCalendarResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 57102e7533..369a45825b 100644 --- a/typedapi/ml/putcalendarjob/put_calendar_job.go +++ b/typedapi/ml/putcalendarjob/put_calendar_job.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Adds an anomaly detection job to a calendar. +// Add anomaly detection job to calendar. package putcalendarjob import ( @@ -81,7 +81,7 @@ func NewPutCalendarJobFunc(tp elastictransport.Interface) NewPutCalendarJob { } } -// Adds an anomaly detection job to a calendar. +// Add anomaly detection job to calendar. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html func New(tp elastictransport.Interface) *PutCalendarJob { diff --git a/typedapi/ml/putcalendarjob/response.go b/typedapi/ml/putcalendarjob/response.go index 5940c9660e..1b53ad28f4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putcalendarjob @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package putcalendarjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_calendar_job/MlPutCalendarJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 62a148f47f..379b673f37 100644 --- a/typedapi/ml/putdatafeed/put_datafeed.go +++ b/typedapi/ml/putdatafeed/put_datafeed.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Instantiates a datafeed. +// 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. @@ -97,7 +97,7 @@ func NewPutDatafeedFunc(tp elastictransport.Interface) NewPutDatafeed { } } -// Instantiates a datafeed. +// 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. diff --git a/typedapi/ml/putdatafeed/request.go b/typedapi/ml/putdatafeed/request.go index 2f1dce132f..e0041c1364 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putdatafeed @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_datafeed/MlPutDatafeedRequest.ts#L37-L172 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_datafeed/MlPutDatafeedRequest.ts#L37-L175 type Request struct { // Aggregations If set, the datafeed performs aggregation searches. @@ -151,7 +151,7 @@ func (s *Request) UnmarshalJSON(data []byte) error { switch t { - case "aggregations": + case "aggregations", "aggs": if s.Aggregations == nil { s.Aggregations = make(map[string]types.Aggregations, 0) } diff --git a/typedapi/ml/putdatafeed/response.go b/typedapi/ml/putdatafeed/response.go index 214039fb7d..413b39ace4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putdatafeed @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_datafeed/MlPutDatafeedResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 9315a62e70..43fa21eebb 100644 --- a/typedapi/ml/putdataframeanalytics/put_data_frame_analytics.go +++ b/typedapi/ml/putdataframeanalytics/put_data_frame_analytics.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Instantiates a data frame analytics job. +// 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. package putdataframeanalytics @@ -83,7 +83,7 @@ func NewPutDataFrameAnalyticsFunc(tp elastictransport.Interface) NewPutDataFrame } } -// Instantiates a data frame analytics job. +// 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. // @@ -465,6 +465,13 @@ func (r *PutDataFrameAnalytics) MaxNumThreads(maxnumthreads int) *PutDataFrameAn return r } +// API name: _meta +func (r *PutDataFrameAnalytics) Meta_(metadata types.Metadata) *PutDataFrameAnalytics { + r.req.Meta_ = metadata + + return r +} + // ModelMemoryLimit The approximate maximum amount of memory resources that are permitted for // analytical processing. If your `elasticsearch.yml` file contains an // `xpack.ml.max_model_memory_limit` setting, an error occurs when you try diff --git a/typedapi/ml/putdataframeanalytics/request.go b/typedapi/ml/putdataframeanalytics/request.go index d9e23d5bf1..0b58bbfd6d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putdataframeanalytics @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsRequest.ts#L30-L141 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsRequest.ts#L30-L144 type Request struct { // AllowLazyStart Specifies whether this job can start when there is insufficient machine @@ -87,7 +87,8 @@ type Request struct { // threads may decrease the time necessary to complete the analysis at the // cost of using more CPU. Note that the process may use additional threads // for operational functionality other than the analysis itself. - MaxNumThreads *int `json:"max_num_threads,omitempty"` + MaxNumThreads *int `json:"max_num_threads,omitempty"` + Meta_ types.Metadata `json:"_meta,omitempty"` // ModelMemoryLimit The approximate maximum amount of memory resources that are permitted for // analytical processing. If your `elasticsearch.yml` file contains an // `xpack.ml.max_model_memory_limit` setting, an error occurs when you try @@ -194,6 +195,11 @@ func (s *Request) UnmarshalJSON(data []byte) error { s.MaxNumThreads = &f } + case "_meta": + if err := dec.Decode(&s.Meta_); err != nil { + return fmt.Errorf("%s | %w", "Meta_", err) + } + case "model_memory_limit": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/ml/putdataframeanalytics/response.go b/typedapi/ml/putdataframeanalytics/response.go index 12dd2b43a2..a8c66e90b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putdataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsResponse.ts#L31-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsResponse.ts#L31-L47 type Response struct { AllowLazyStart bool `json:"allow_lazy_start"` Analysis types.DataframeAnalysisContainer `json:"analysis"` @@ -37,6 +37,7 @@ type Response struct { Dest types.DataframeAnalyticsDestination `json:"dest"` Id string `json:"id"` MaxNumThreads int `json:"max_num_threads"` + Meta_ types.Metadata `json:"_meta,omitempty"` ModelMemoryLimit string `json:"model_memory_limit"` Source types.DataframeAnalyticsSource `json:"source"` Version string `json:"version"` diff --git a/typedapi/ml/putfilter/put_filter.go b/typedapi/ml/putfilter/put_filter.go index 64808ec902..befa4b14a4 100644 --- a/typedapi/ml/putfilter/put_filter.go +++ b/typedapi/ml/putfilter/put_filter.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Instantiates a filter. +// 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 @@ -85,7 +85,7 @@ func NewPutFilterFunc(tp elastictransport.Interface) NewPutFilter { } } -// Instantiates a filter. +// 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 diff --git a/typedapi/ml/putfilter/request.go b/typedapi/ml/putfilter/request.go index 2a397799c2..cf5c70d057 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putfilter @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package putfilter // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_filter/MlPutFilterRequest.ts#L23-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_filter/MlPutFilterRequest.ts#L23-L51 type Request struct { // Description A description of the filter. diff --git a/typedapi/ml/putfilter/response.go b/typedapi/ml/putfilter/response.go index 7bc62d5ae4..312a59611d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putfilter // Response holds the response body struct for the package putfilter // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_filter/MlPutFilterResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 3af3b9c745..0235f87654 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create an anomaly detection job. // If you include a `datafeed_config`, you must have read index privileges on @@ -37,6 +37,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/expandwildcard" ) const ( @@ -321,6 +322,56 @@ func (r *PutJob) _jobid(jobid string) *PutJob { return r } +// AllowNoIndices If `true`, wildcard indices expressions that resolve into no concrete indices +// are ignored. This includes the +// `_all` string or when no indices are specified. +// API name: allow_no_indices +func (r *PutJob) AllowNoIndices(allownoindices bool) *PutJob { + 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. 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. +// API name: expand_wildcards +func (r *PutJob) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *PutJob { + tmp := []string{} + for _, item := range expandwildcards { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) + + return r +} + +// IgnoreThrottled If `true`, concrete, expanded or aliased indices are ignored when frozen. +// API name: ignore_throttled +func (r *PutJob) IgnoreThrottled(ignorethrottled bool) *PutJob { + r.values.Set("ignore_throttled", strconv.FormatBool(ignorethrottled)) + + return r +} + +// IgnoreUnavailable If `true`, unavailable indices (missing or closed) are ignored. +// API name: ignore_unavailable +func (r *PutJob) IgnoreUnavailable(ignoreunavailable bool) *PutJob { + r.values.Set("ignore_unavailable", strconv.FormatBool(ignoreunavailable)) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/ml/putjob/request.go b/typedapi/ml/putjob/request.go index db559e9ccb..a2f654443e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putjob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_job/MlPutJobRequest.ts#L30-L112 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_job/MlPutJobRequest.ts#L30-L148 type Request struct { // AllowLazyOpen Advanced configuration option. Specifies whether this job can open when there @@ -83,6 +83,10 @@ type Request struct { Description *string `json:"description,omitempty"` // Groups A list of job groups. A job can belong to no groups or many. Groups []string `json:"groups,omitempty"` + // JobId The identifier for the anomaly detection job. This identifier can contain + // lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It + // must start and end with alphanumeric characters. + JobId *string `json:"job_id,omitempty"` // ModelPlotConfig This advanced configuration option stores model information along with the // results. It provides a more detailed view into anomaly detection. If you // enable model plot it can add considerable overhead to the performance of the @@ -226,6 +230,11 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Groups", err) } + case "job_id": + if err := dec.Decode(&s.JobId); err != nil { + return fmt.Errorf("%s | %w", "JobId", err) + } + case "model_plot_config": if err := dec.Decode(&s.ModelPlotConfig); err != nil { return fmt.Errorf("%s | %w", "ModelPlotConfig", err) diff --git a/typedapi/ml/putjob/response.go b/typedapi/ml/putjob/response.go index 38bdfc4ecf..a78588aeb8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putjob @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_job/MlPutJobResponse.ts#L29-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 a25d6e6fa5..9a9f9acc8c 100644 --- a/typedapi/ml/puttrainedmodel/put_trained_model.go +++ b/typedapi/ml/puttrainedmodel/put_trained_model.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Enables you to supply a trained model that is not created by data frame +// Create a trained model. +// Enable you to supply a trained model that is not created by data frame // analytics. package puttrainedmodel @@ -83,7 +84,8 @@ func NewPutTrainedModelFunc(tp elastictransport.Interface) NewPutTrainedModel { } } -// Enables you to supply a trained model that is not created by data frame +// Create a trained model. +// Enable you to supply a trained model that is not created by data frame // analytics. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html diff --git a/typedapi/ml/puttrainedmodel/request.go b/typedapi/ml/puttrainedmodel/request.go index debfc7abc5..0b02f4b590 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package puttrainedmodel @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package puttrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/MlPutTrainedModelRequest.ts#L29-L124 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/MlPutTrainedModelRequest.ts#L31-L128 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 de35f914b0..0a667d134a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package puttrainedmodel @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package puttrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/MlPutTrainedModelResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/MlPutTrainedModelResponse.ts#L22-L24 type Response struct { CompressedDefinition *string `json:"compressed_definition,omitempty"` // CreateTime The time when the trained model was created. @@ -65,8 +65,9 @@ type Response struct { // created by data frame analytics contain analysis_config and input objects. Metadata *types.TrainedModelConfigMetadata `json:"metadata,omitempty"` // ModelId Identifier for the trained model. - ModelId string `json:"model_id"` - ModelSizeBytes types.ByteSize `json:"model_size_bytes,omitempty"` + ModelId string `json:"model_id"` + ModelPackage *types.ModelPackageConfig `json:"model_package,omitempty"` + ModelSizeBytes types.ByteSize `json:"model_size_bytes,omitempty"` // ModelType The model type ModelType *trainedmodeltype.TrainedModelType `json:"model_type,omitempty"` PrefixStrings *types.TrainedModelPrefixStrings `json:"prefix_strings,omitempty"` @@ -231,6 +232,11 @@ func (s *Response) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "ModelId", err) } + case "model_package": + if err := dec.Decode(&s.ModelPackage); err != nil { + return fmt.Errorf("%s | %w", "ModelPackage", err) + } + case "model_size_bytes": if err := dec.Decode(&s.ModelSizeBytes); err != nil { return fmt.Errorf("%s | %w", "ModelSizeBytes", err) diff --git a/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go b/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go index d80bf069b9..801bcf1abb 100644 --- a/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go +++ b/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates or updates a trained model alias. A trained model alias is a logical -// name used to reference a single trained model. +// 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. @@ -96,8 +97,9 @@ func NewPutTrainedModelAliasFunc(tp elastictransport.Interface) NewPutTrainedMod } } -// Creates or updates a trained model alias. A trained model alias is a logical -// name used to reference a single trained model. +// 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. diff --git a/typedapi/ml/puttrainedmodelalias/response.go b/typedapi/ml/puttrainedmodelalias/response.go index c3abf16e47..7dd7c1d675 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package puttrainedmodelalias // Response holds the response body struct for the package puttrainedmodelalias // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model_alias/MlPutTrainedModelAliasResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model_alias/MlPutTrainedModelAliasResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go b/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go index 282e800e9c..aabc4504c1 100644 --- a/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go +++ b/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates part of a trained model definition. +// Create part of a trained model definition. package puttrainedmodeldefinitionpart import ( @@ -86,7 +86,7 @@ func NewPutTrainedModelDefinitionPartFunc(tp elastictransport.Interface) NewPutT } } -// Creates part of a trained model definition. +// Create part of a trained model definition. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html func New(tp elastictransport.Interface) *PutTrainedModelDefinitionPart { diff --git a/typedapi/ml/puttrainedmodeldefinitionpart/request.go b/typedapi/ml/puttrainedmodeldefinitionpart/request.go index 46db6b8bb1..21dfd16287 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package puttrainedmodeldefinitionpart @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package puttrainedmodeldefinitionpart // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartRequest.ts#L24-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartRequest.ts#L24-L58 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 861551bd16..ca916d6b6d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package puttrainedmodeldefinitionpart // Response holds the response body struct for the package puttrainedmodeldefinitionpart // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go b/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go index a43b619d0b..69c5733ce1 100644 --- a/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go +++ b/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a trained model vocabulary. +// 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. @@ -84,7 +84,7 @@ func NewPutTrainedModelVocabularyFunc(tp elastictransport.Interface) NewPutTrain } } -// Creates a trained model vocabulary. +// 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. diff --git a/typedapi/ml/puttrainedmodelvocabulary/request.go b/typedapi/ml/puttrainedmodelvocabulary/request.go index deda1de586..c38a52b251 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package puttrainedmodelvocabulary @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package puttrainedmodelvocabulary // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyRequest.ts#L24-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyRequest.ts#L24-L61 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 a1929e16e6..e36e0ec091 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package puttrainedmodelvocabulary // Response holds the response body struct for the package puttrainedmodelvocabulary // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/resetjob/reset_job.go b/typedapi/ml/resetjob/reset_job.go index 84ed992ff8..8794c6e21c 100644 --- a/typedapi/ml/resetjob/reset_job.go +++ b/typedapi/ml/resetjob/reset_job.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Resets an anomaly detection job. +// 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 @@ -80,7 +80,7 @@ func NewResetJobFunc(tp elastictransport.Interface) NewResetJob { } } -// Resets an anomaly detection job. +// 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 diff --git a/typedapi/ml/resetjob/response.go b/typedapi/ml/resetjob/response.go index 4b4d4135a4..837e6f568a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package resetjob // Response holds the response body struct for the package resetjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/reset_job/MlResetJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/reset_job/MlResetJobResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/revertmodelsnapshot/request.go b/typedapi/ml/revertmodelsnapshot/request.go index a44ca51351..810e5fda6a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package revertmodelsnapshot @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package revertmodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/revert_model_snapshot/MlRevertModelSnapshotRequest.ts#L23-L69 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/revert_model_snapshot/MlRevertModelSnapshotRequest.ts#L23-L70 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 8faa3333aa..17cc343b5d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package revertmodelsnapshot @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package revertmodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/revert_model_snapshot/MlRevertModelSnapshotResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 aca07de51d..945d6b23c9 100644 --- a/typedapi/ml/revertmodelsnapshot/revert_model_snapshot.go +++ b/typedapi/ml/revertmodelsnapshot/revert_model_snapshot.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Reverts to a specific snapshot. +// 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 @@ -93,7 +93,7 @@ func NewRevertModelSnapshotFunc(tp elastictransport.Interface) NewRevertModelSna } } -// Reverts to a specific snapshot. +// 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 diff --git a/typedapi/ml/setupgrademode/response.go b/typedapi/ml/setupgrademode/response.go index a69e784a07..dc01d0c7a4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package setupgrademode // Response holds the response body struct for the package setupgrademode // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/set_upgrade_mode/MlSetUpgradeModeResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/set_upgrade_mode/MlSetUpgradeModeResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/setupgrademode/set_upgrade_mode.go b/typedapi/ml/setupgrademode/set_upgrade_mode.go index a6addd3587..88c5f17e35 100644 --- a/typedapi/ml/setupgrademode/set_upgrade_mode.go +++ b/typedapi/ml/setupgrademode/set_upgrade_mode.go @@ -16,8 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// 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 @@ -79,6 +80,7 @@ func NewSetUpgradeModeFunc(tp elastictransport.Interface) NewSetUpgradeMode { } } +// 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 diff --git a/typedapi/ml/startdatafeed/request.go b/typedapi/ml/startdatafeed/request.go index 00e3eb22c1..80483d5a1e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package startdatafeed @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package startdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/start_datafeed/MlStartDatafeedRequest.ts#L24-L91 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/start_datafeed/MlStartDatafeedRequest.ts#L24-L92 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 7998b007c5..ce3e0122b2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package startdatafeed @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package startdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/start_datafeed/MlStartDatafeedResponse.ts#L22-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f2c8ff2076..c318096f60 100644 --- a/typedapi/ml/startdatafeed/start_datafeed.go +++ b/typedapi/ml/startdatafeed/start_datafeed.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Starts one or more datafeeds. +// Start datafeeds. // // A datafeed must be started in order to retrieve data from Elasticsearch. A // datafeed can be started and stopped @@ -100,7 +100,7 @@ func NewStartDatafeedFunc(tp elastictransport.Interface) NewStartDatafeed { } } -// Starts one or more datafeeds. +// Start datafeeds. // // A datafeed must be started in order to retrieve data from Elasticsearch. A // datafeed can be started and stopped diff --git a/typedapi/ml/startdataframeanalytics/response.go b/typedapi/ml/startdataframeanalytics/response.go index d1cf01947c..fd369734be 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package startdataframeanalytics // Response holds the response body struct for the package startdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsResponse.ts#L22-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 abf95f57a9..bd2d110af3 100644 --- a/typedapi/ml/startdataframeanalytics/start_data_frame_analytics.go +++ b/typedapi/ml/startdataframeanalytics/start_data_frame_analytics.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Starts a data frame analytics job. +// 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 @@ -87,7 +87,7 @@ func NewStartDataFrameAnalyticsFunc(tp elastictransport.Interface) NewStartDataF } } -// Starts a data frame analytics job. +// 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 diff --git a/typedapi/ml/starttrainedmodeldeployment/response.go b/typedapi/ml/starttrainedmodeldeployment/response.go index baac61364f..47e6282c11 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package starttrainedmodeldeployment @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package starttrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 5538b7d31c..be9496c86d 100644 --- a/typedapi/ml/starttrainedmodeldeployment/start_trained_model_deployment.go +++ b/typedapi/ml/starttrainedmodeldeployment/start_trained_model_deployment.go @@ -16,10 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Starts a trained model deployment, which allocates the model to every machine -// learning node. +// Start a trained model deployment. +// It allocates the model to every machine learning node. package starttrainedmodeldeployment import ( @@ -79,8 +79,8 @@ func NewStartTrainedModelDeploymentFunc(tp elastictransport.Interface) NewStartT } } -// Starts a trained model deployment, which allocates the model to every machine -// learning node. +// Start a trained model deployment. +// It allocates the model to every machine learning node. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trained-model-deployment.html func New(tp elastictransport.Interface) *StartTrainedModelDeployment { diff --git a/typedapi/ml/stopdatafeed/request.go b/typedapi/ml/stopdatafeed/request.go index f2b1e542da..dc3856d9bd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stopdatafeed @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package stopdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/stop_datafeed/MlStopDatafeedRequest.ts#L24-L78 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/stop_datafeed/MlStopDatafeedRequest.ts#L24-L79 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 7c32713040..c481c57769 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stopdatafeed // Response holds the response body struct for the package stopdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/stop_datafeed/MlStopDatafeedResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f69adfa07e..e3294329b2 100644 --- a/typedapi/ml/stopdatafeed/stop_datafeed.go +++ b/typedapi/ml/stopdatafeed/stop_datafeed.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Stops one or more datafeeds. +// 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. @@ -84,7 +84,7 @@ func NewStopDatafeedFunc(tp elastictransport.Interface) NewStopDatafeed { } } -// Stops one or more datafeeds. +// 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. diff --git a/typedapi/ml/stopdataframeanalytics/response.go b/typedapi/ml/stopdataframeanalytics/response.go index 49989a4b07..b0bfadb09c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stopdataframeanalytics // Response holds the response body struct for the package stopdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e3c77040e4..e5a5aff387 100644 --- a/typedapi/ml/stopdataframeanalytics/stop_data_frame_analytics.go +++ b/typedapi/ml/stopdataframeanalytics/stop_data_frame_analytics.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Stops one or more data frame analytics jobs. +// Stop data frame analytics jobs. // A data frame analytics job can be started and stopped multiple times // throughout its lifecycle. package stopdataframeanalytics @@ -78,7 +78,7 @@ func NewStopDataFrameAnalyticsFunc(tp elastictransport.Interface) NewStopDataFra } } -// Stops one or more data frame analytics jobs. +// Stop data frame analytics jobs. // A data frame analytics job can be started and stopped multiple times // throughout its lifecycle. // diff --git a/typedapi/ml/stoptrainedmodeldeployment/response.go b/typedapi/ml/stoptrainedmodeldeployment/response.go index 95acd962a8..32a82bccc0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stoptrainedmodeldeployment // Response holds the response body struct for the package stoptrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f1ff1fa996..e881bf5902 100644 --- a/typedapi/ml/stoptrainedmodeldeployment/stop_trained_model_deployment.go +++ b/typedapi/ml/stoptrainedmodeldeployment/stop_trained_model_deployment.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Stops a trained model deployment. +// Stop a trained model deployment. package stoptrainedmodeldeployment import ( @@ -76,7 +76,7 @@ func NewStopTrainedModelDeploymentFunc(tp elastictransport.Interface) NewStopTra } } -// Stops a trained model deployment. +// Stop a trained model deployment. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-trained-model-deployment.html func New(tp elastictransport.Interface) *StopTrainedModelDeployment { diff --git a/typedapi/ml/updatedatafeed/request.go b/typedapi/ml/updatedatafeed/request.go index 284904a3e7..924475c700 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatedatafeed @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package updatedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L162 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L163 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 16e7dec02b..3ad0693f77 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatedatafeed @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_datafeed/MlUpdateDatafeedResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 8f42223fa0..b75f3db699 100644 --- a/typedapi/ml/updatedatafeed/update_datafeed.go +++ b/typedapi/ml/updatedatafeed/update_datafeed.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates the properties of a datafeed. +// 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 @@ -88,7 +88,7 @@ func NewUpdateDatafeedFunc(tp elastictransport.Interface) NewUpdateDatafeed { } } -// Updates the properties of a datafeed. +// 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 diff --git a/typedapi/ml/updatedataframeanalytics/request.go b/typedapi/ml/updatedataframeanalytics/request.go index 8ff7d1548c..064b5400a2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatedataframeanalytics @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsRequest.ts#L24-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsRequest.ts#L24-L73 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 6dc3669624..c81efc96dd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatedataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsResponse.ts#L30-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f26b0e0cb8..b25260cd2c 100644 --- a/typedapi/ml/updatedataframeanalytics/update_data_frame_analytics.go +++ b/typedapi/ml/updatedataframeanalytics/update_data_frame_analytics.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates an existing data frame analytics job. +// Update a data frame analytics job. package updatedataframeanalytics import ( @@ -81,7 +81,7 @@ func NewUpdateDataFrameAnalyticsFunc(tp elastictransport.Interface) NewUpdateDat } } -// Updates an existing data frame analytics job. +// Update a data frame analytics job. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html func New(tp elastictransport.Interface) *UpdateDataFrameAnalytics { diff --git a/typedapi/ml/updatefilter/request.go b/typedapi/ml/updatefilter/request.go index 8509f2058a..252cce295d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatefilter @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatefilter // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_filter/MlUpdateFilterRequest.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/update_filter/MlUpdateFilterRequest.ts#L23-L53 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 28a5bea956..dac58c00e0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatefilter // Response holds the response body struct for the package updatefilter // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_filter/MlUpdateFilterResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e1226100e3..629e24a2fe 100644 --- a/typedapi/ml/updatefilter/update_filter.go +++ b/typedapi/ml/updatefilter/update_filter.go @@ -16,8 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Update a filter. // Updates the description of a filter, adds items, or removes items from the // list. package updatefilter @@ -82,6 +83,7 @@ func NewUpdateFilterFunc(tp elastictransport.Interface) NewUpdateFilter { } } +// Update a filter. // Updates the description of a filter, adds items, or removes items from the // list. // diff --git a/typedapi/ml/updatejob/request.go b/typedapi/ml/updatejob/request.go index 72e3d246f3..8cffb01daf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatejob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package updatejob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_job/MlUpdateJobRequest.ts#L33-L138 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/update_job/MlUpdateJobRequest.ts#L33-L140 type Request struct { // AllowLazyOpen Advanced configuration option. Specifies whether this job can open when @@ -74,7 +74,7 @@ type Request struct { // Description A description of the job. Description *string `json:"description,omitempty"` // Detectors An array of detector update objects. - Detectors []types.Detector `json:"detectors,omitempty"` + Detectors []types.DetectorUpdate `json:"detectors,omitempty"` // Groups A list of job groups. A job can belong to no groups or many. Groups []string `json:"groups,omitempty"` ModelPlotConfig *types.ModelPlotConfig `json:"model_plot_config,omitempty"` diff --git a/typedapi/ml/updatejob/response.go b/typedapi/ml/updatejob/response.go index 17266b75cd..8f0509bbe5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatejob @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatejob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_job/MlUpdateJobResponse.ts#L29-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 eabd06d3a5..f7717a3e1d 100644 --- a/typedapi/ml/updatejob/update_job.go +++ b/typedapi/ml/updatejob/update_job.go @@ -16,8 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Update an anomaly detection job. // Updates certain properties of an anomaly detection job. package updatejob @@ -81,6 +82,7 @@ func NewUpdateJobFunc(tp elastictransport.Interface) NewUpdateJob { } } +// Update an anomaly detection job. // Updates certain properties of an anomaly detection job. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html @@ -446,7 +448,7 @@ func (r *UpdateJob) Description(description string) *UpdateJob { // Detectors An array of detector update objects. // API name: detectors -func (r *UpdateJob) Detectors(detectors ...types.Detector) *UpdateJob { +func (r *UpdateJob) Detectors(detectors ...types.DetectorUpdate) *UpdateJob { r.req.Detectors = detectors return r diff --git a/typedapi/ml/updatemodelsnapshot/request.go b/typedapi/ml/updatemodelsnapshot/request.go index 0d0b80e131..47dbec0a0a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatemodelsnapshot @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_model_snapshot/MlUpdateModelSnapshotRequest.ts#L23-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/update_model_snapshot/MlUpdateModelSnapshotRequest.ts#L23-L56 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 b2406f0db5..e66779cb75 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatemodelsnapshot @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_model_snapshot/MlUpdateModelSnapshotResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 9b41beec43..d680c997aa 100644 --- a/typedapi/ml/updatemodelsnapshot/update_model_snapshot.go +++ b/typedapi/ml/updatemodelsnapshot/update_model_snapshot.go @@ -16,8 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Update a snapshot. // Updates certain properties of a snapshot. package updatemodelsnapshot @@ -86,6 +87,7 @@ func NewUpdateModelSnapshotFunc(tp elastictransport.Interface) NewUpdateModelSna } } +// Update a snapshot. // Updates certain properties of a snapshot. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html diff --git a/typedapi/ml/updatetrainedmodeldeployment/request.go b/typedapi/ml/updatetrainedmodeldeployment/request.go index 342fbdd589..a1904eb889 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatetrainedmodeldeployment @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatetrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts#L24-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts#L24-L63 type Request struct { // NumberOfAllocations The number of model allocations on each node where the model is deployed. diff --git a/typedapi/ml/updatetrainedmodeldeployment/response.go b/typedapi/ml/updatetrainedmodeldeployment/response.go index 3b09b9d55c..90bb618de2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatetrainedmodeldeployment @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatetrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 3c71230a36..2d5bdab354 100644 --- a/typedapi/ml/updatetrainedmodeldeployment/update_trained_model_deployment.go +++ b/typedapi/ml/updatetrainedmodeldeployment/update_trained_model_deployment.go @@ -16,10 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Starts a trained model deployment, which allocates the model to every machine -// learning node. +// Update a trained model deployment. package updatetrainedmodeldeployment import ( @@ -82,8 +81,7 @@ func NewUpdateTrainedModelDeploymentFunc(tp elastictransport.Interface) NewUpdat } } -// Starts a trained model deployment, which allocates the model to every machine -// learning node. +// Update a trained model deployment. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html func New(tp elastictransport.Interface) *UpdateTrainedModelDeployment { diff --git a/typedapi/ml/upgradejobsnapshot/response.go b/typedapi/ml/upgradejobsnapshot/response.go index 64bfbd256a..17390e51fb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package upgradejobsnapshot // Response holds the response body struct for the package upgradejobsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/upgrade_job_snapshot/MlUpgradeJobSnapshotResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 a906d15937..9b010f9cde 100644 --- a/typedapi/ml/upgradejobsnapshot/upgrade_job_snapshot.go +++ b/typedapi/ml/upgradejobsnapshot/upgrade_job_snapshot.go @@ -16,8 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Upgrade a snapshot. // Upgrades 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 @@ -89,6 +90,7 @@ func NewUpgradeJobSnapshotFunc(tp elastictransport.Interface) NewUpgradeJobSnaps } } +// Upgrade a snapshot. // Upgrades 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 diff --git a/typedapi/ml/validate/request.go b/typedapi/ml/validate/request.go index 0a6d5617c9..4667757688 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package validate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package validate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/validate/MlValidateJobRequest.ts#L27-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/validate/MlValidateJobRequest.ts#L27-L44 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 f93088f998..7e40dae3b4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package validate // Response holds the response body struct for the package validate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/validate/MlValidateJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/validate/MlValidateJobResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/validate/validate.go b/typedapi/ml/validate/validate.go index b034732d15..aab73c40ed 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Validates an anomaly detection job. package validate diff --git a/typedapi/ml/validatedetector/request.go b/typedapi/ml/validatedetector/request.go index 1150405e42..f87af1a62f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package validatedetector @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package validatedetector // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/validate_detector/MlValidateDetectorRequest.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/validate_detector/MlValidateDetectorRequest.ts#L23-L31 type Request = types.Detector // NewRequest returns a Request diff --git a/typedapi/ml/validatedetector/response.go b/typedapi/ml/validatedetector/response.go index c3158e2400..895b73953a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package validatedetector // Response holds the response body struct for the package validatedetector // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/validate_detector/MlValidateDetectorResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/validate_detector/MlValidateDetectorResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/validatedetector/validate_detector.go b/typedapi/ml/validatedetector/validate_detector.go index 0051310506..94f5dad35c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Validates an anomaly detection detector. package validatedetector diff --git a/typedapi/monitoring/bulk/bulk.go b/typedapi/monitoring/bulk/bulk.go index 95f3cd2d4c..42650d17b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Used by the monitoring features to send monitoring data. package bulk diff --git a/typedapi/monitoring/bulk/request.go b/typedapi/monitoring/bulk/request.go index 37f6d0a7f9..f3fed4655a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package bulk // Request holds the request body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/monitoring/bulk/BulkMonitoringRequest.ts#L24-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/monitoring/bulk/BulkMonitoringRequest.ts#L24-L59 type Request = []any diff --git a/typedapi/monitoring/bulk/response.go b/typedapi/monitoring/bulk/response.go index f23bb9b72c..e0a78ae357 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package bulk @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/monitoring/bulk/BulkMonitoringResponse.ts#L23-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d678ed55da..d988534f3d 100644 --- a/typedapi/nodes/clearrepositoriesmeteringarchive/clear_repositories_metering_archive.go +++ b/typedapi/nodes/clearrepositoriesmeteringarchive/clear_repositories_metering_archive.go @@ -16,10 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// You can use this API to clear the archived repositories metering information -// in the cluster. +// Clear the archived repositories metering. +// Clear the archived repositories metering information in the cluster. package clearrepositoriesmeteringarchive import ( @@ -82,8 +82,8 @@ func NewClearRepositoriesMeteringArchiveFunc(tp elastictransport.Interface) NewC } } -// You can use this API to clear the archived repositories metering information -// in the cluster. +// Clear the archived repositories metering. +// Clear the archived repositories metering information in the cluster. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html func New(tp elastictransport.Interface) *ClearRepositoriesMeteringArchive { diff --git a/typedapi/nodes/clearrepositoriesmeteringarchive/response.go b/typedapi/nodes/clearrepositoriesmeteringarchive/response.go index ad036491ba..c69291be90 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearrepositoriesmeteringarchive @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearrepositoriesmeteringarchive // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L36-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L36-L38 type Response struct { // ClusterName Name of the cluster. Based on the [Cluster name diff --git a/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go b/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go index e682ba9b72..79c2160c4e 100644 --- a/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go +++ b/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go @@ -16,15 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// You can use the cluster repositories metering API to retrieve repositories -// metering information in a cluster. -// This API exposes monotonically non-decreasing counters and it’s 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 won’t be present after node restarts. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package getrepositoriesmeteringinfo import ( @@ -82,13 +82,13 @@ func NewGetRepositoriesMeteringInfoFunc(tp elastictransport.Interface) NewGetRep } } -// You can use the cluster repositories metering API to retrieve repositories -// metering information in a cluster. -// This API exposes monotonically non-decreasing counters and it’s 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 won’t be present after node restarts. +// Get cluster repositories metering. +// Get repositories metering information for a cluster. +// This API exposes monotonically non-decreasing counters and it is expected +// that clients would durably store the information needed to compute +// aggregations over a period of time. +// Additionally, the information exposed by this API is volatile, meaning that +// it will not be present after node restarts. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html func New(tp elastictransport.Interface) *GetRepositoriesMeteringInfo { diff --git a/typedapi/nodes/getrepositoriesmeteringinfo/response.go b/typedapi/nodes/getrepositoriesmeteringinfo/response.go index c0731a6054..11aee343cd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getrepositoriesmeteringinfo @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrepositoriesmeteringinfo // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/get_repositories_metering_info/GetRepositoriesMeteringInfoResponse.ts#L36-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/get_repositories_metering_info/GetRepositoriesMeteringInfoResponse.ts#L36-L38 type Response struct { // ClusterName Name of the cluster. Based on the [Cluster name diff --git a/typedapi/nodes/hotthreads/hot_threads.go b/typedapi/nodes/hotthreads/hot_threads.go index 443c2fa7f3..1770c13f98 100644 --- a/typedapi/nodes/hotthreads/hot_threads.go +++ b/typedapi/nodes/hotthreads/hot_threads.go @@ -16,11 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// This API yields a breakdown of the hot threads on each selected node in the -// cluster. -// The output is plain text with a breakdown of each node’s top hot threads. +// 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. package hotthreads import ( @@ -77,9 +78,10 @@ func NewHotThreadsFunc(tp elastictransport.Interface) NewHotThreads { } } -// This API yields a breakdown of the hot threads on each selected node in the -// cluster. -// The output is plain text with a breakdown of each node’s top hot threads. +// Get the hot threads for nodes. +// Get a breakdown of the hot threads on each selected node in the cluster. +// The output is plain text with a breakdown of the top hot threads for each +// node. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html func New(tp elastictransport.Interface) *HotThreads { diff --git a/typedapi/nodes/hotthreads/response.go b/typedapi/nodes/hotthreads/response.go index 65d45e7fd8..f1610aa041 100644 --- a/typedapi/nodes/hotthreads/response.go +++ b/typedapi/nodes/hotthreads/response.go @@ -16,19 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package hotthreads -import ( - "github.com/elastic/go-elasticsearch/v8/typedapi/types" -) - // Response holds the response body struct for the package hotthreads // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/hot_threads/NodesHotThreadsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/hot_threads/NodesHotThreadsResponse.ts#L20-L22 type Response struct { - HotThreads []types.HotThread `json:"hot_threads"` } // NewResponse returns a Response diff --git a/typedapi/nodes/info/info.go b/typedapi/nodes/info/info.go index 464be17942..e51e18abba 100644 --- a/typedapi/nodes/info/info.go +++ b/typedapi/nodes/info/info.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns cluster nodes information. +// Get node information. +// By default, the API returns all attributes and core settings for cluster +// nodes. package info import ( @@ -77,7 +79,9 @@ func NewInfoFunc(tp elastictransport.Interface) NewInfo { } } -// Returns cluster nodes information. +// Get node information. +// By default, the API returns all attributes and core settings for cluster +// nodes. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html func New(tp elastictransport.Interface) *Info { diff --git a/typedapi/nodes/info/response.go b/typedapi/nodes/info/response.go index 32872d66e0..46f888a387 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/NodesInfoResponse.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/NodesInfoResponse.ts#L30-L32 type Response struct { ClusterName string `json:"cluster_name"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go b/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go index c594e0a5a4..adaa9c0acc 100644 --- a/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go +++ b/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go @@ -16,9 +16,26 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Reloads the keystore on nodes in the cluster. +// 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. package reloadsecuresettings import ( @@ -79,7 +96,24 @@ func NewReloadSecureSettingsFunc(tp elastictransport.Interface) NewReloadSecureS } } -// Reloads the keystore on nodes in the cluster. +// Reload the keystore on nodes in the cluster. +// +// Secure settings are stored in an on-disk keystore. Certain of these settings +// are reloadable. +// That is, you can change them on disk and reload them without restarting any +// nodes in the cluster. +// When you have updated reloadable secure settings in your keystore, you can +// use this API to reload those settings on each node. +// +// When the Elasticsearch keystore is password protected and not simply +// obfuscated, you must provide the password for the keystore when you reload +// the secure settings. +// Reloading the settings for the whole cluster assumes that the keystores for +// all nodes are protected with the same password; this method is allowed only +// when inter-node communications are encrypted. +// Alternatively, you can reload the secure settings on each node by locally +// accessing the API and passing the node-specific Elasticsearch keystore +// password. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-settings.html#reloadable-secure-settings func New(tp elastictransport.Interface) *ReloadSecureSettings { diff --git a/typedapi/nodes/reloadsecuresettings/request.go b/typedapi/nodes/reloadsecuresettings/request.go index 6b4f9fed55..d559b707de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package reloadsecuresettings @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package reloadsecuresettings // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/reload_secure_settings/ReloadSecureSettingsRequest.ts#L24-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/reload_secure_settings/ReloadSecureSettingsRequest.ts#L24-L59 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 d998d922c7..62a5f9944f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package reloadsecuresettings @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package reloadsecuresettings // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/reload_secure_settings/ReloadSecureSettingsResponse.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/reload_secure_settings/ReloadSecureSettingsResponse.ts#L30-L32 type Response struct { ClusterName string `json:"cluster_name"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/stats/response.go b/typedapi/nodes/stats/response.go index 83bac926ae..e59d54cb8d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/stats/NodesStatsResponse.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/stats/NodesStatsResponse.ts#L30-L32 type Response struct { ClusterName *string `json:"cluster_name,omitempty"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/stats/stats.go b/typedapi/nodes/stats/stats.go index 286ba59bc6..f3c9a77373 100644 --- a/typedapi/nodes/stats/stats.go +++ b/typedapi/nodes/stats/stats.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns cluster nodes statistics. +// 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. package stats import ( @@ -81,7 +84,10 @@ func NewStatsFunc(tp elastictransport.Interface) NewStats { } } -// Returns cluster nodes statistics. +// Get node statistics. +// Get statistics for nodes in a cluster. +// By default, all stats are returned. You can limit the returned information by +// using metrics. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html func New(tp elastictransport.Interface) *Stats { diff --git a/typedapi/nodes/usage/response.go b/typedapi/nodes/usage/response.go index b0bb12560b..70aaca5a47 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package usage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package usage // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/usage/NodesUsageResponse.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/usage/NodesUsageResponse.ts#L30-L32 type Response struct { ClusterName string `json:"cluster_name"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/usage/usage.go b/typedapi/nodes/usage/usage.go index 8caa120486..2cfd76a630 100644 --- a/typedapi/nodes/usage/usage.go +++ b/typedapi/nodes/usage/usage.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns information on the usage of features. +// Get feature usage information. package usage import ( @@ -77,7 +77,7 @@ func NewUsageFunc(tp elastictransport.Interface) NewUsage { } } -// Returns information on the usage of features. +// Get feature usage information. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-usage.html func New(tp elastictransport.Interface) *Usage { diff --git a/typedapi/profiling/flamegraph/flamegraph.go b/typedapi/profiling/flamegraph/flamegraph.go index 9255d60081..6b103a416b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // 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 2f5a52b7ca..ac5b03a929 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Extracts raw stacktrace information from Universal Profiling. package stacktraces diff --git a/typedapi/profiling/status/status.go b/typedapi/profiling/status/status.go index 9e95acd334..6a00d57d77 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // 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 c4a564d3d9..ef9f422c6c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // 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 3be18fbc89..c3954dd61c 100644 --- a/typedapi/queryrules/deleterule/delete_rule.go +++ b/typedapi/queryrules/deleterule/delete_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes a query rule within a query ruleset. +// Delete a query rule. +// Delete a query rule within a query ruleset. package deleterule import ( @@ -81,7 +82,8 @@ func NewDeleteRuleFunc(tp elastictransport.Interface) NewDeleteRule { } } -// Deletes a query rule within a query ruleset. +// Delete a query rule. +// Delete a query rule within a query ruleset. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-rule.html func New(tp elastictransport.Interface) *DeleteRule { diff --git a/typedapi/queryrules/deleterule/response.go b/typedapi/queryrules/deleterule/response.go index 9e8c329e71..7d8abec5f0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleterule // Response holds the response body struct for the package deleterule // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/delete_rule/QueryRuleDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/delete_rule/QueryRuleDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/queryrules/deleteruleset/delete_ruleset.go b/typedapi/queryrules/deleteruleset/delete_ruleset.go index 6edaa0b77c..d1c12c0545 100644 --- a/typedapi/queryrules/deleteruleset/delete_ruleset.go +++ b/typedapi/queryrules/deleteruleset/delete_ruleset.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes a query ruleset. +// Delete a query ruleset. package deleteruleset import ( @@ -76,7 +76,7 @@ func NewDeleteRulesetFunc(tp elastictransport.Interface) NewDeleteRuleset { } } -// Deletes a query ruleset. +// Delete a query ruleset. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-ruleset.html func New(tp elastictransport.Interface) *DeleteRuleset { diff --git a/typedapi/queryrules/deleteruleset/response.go b/typedapi/queryrules/deleteruleset/response.go index b4f940ffcf..93f6ac3eda 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleteruleset // Response holds the response body struct for the package deleteruleset // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/delete_ruleset/QueryRulesetDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/delete_ruleset/QueryRulesetDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/queryrules/getrule/get_rule.go b/typedapi/queryrules/getrule/get_rule.go index 414671ec2e..f40acca779 100644 --- a/typedapi/queryrules/getrule/get_rule.go +++ b/typedapi/queryrules/getrule/get_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns the details about a query rule within a query ruleset +// Get a query rule. +// Get details about a query rule within a query ruleset. package getrule import ( @@ -81,7 +82,8 @@ func NewGetRuleFunc(tp elastictransport.Interface) NewGetRule { } } -// Returns the details about a query rule within a query ruleset +// Get a query rule. +// Get details about a query rule within a query ruleset. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-rule.html func New(tp elastictransport.Interface) *GetRule { diff --git a/typedapi/queryrules/getrule/response.go b/typedapi/queryrules/getrule/response.go index ab4863ebfd..9ab227c3af 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getrule @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package getrule // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/get_rule/QueryRuleGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/get_rule/QueryRuleGetResponse.ts#L22-L24 type Response struct { Actions types.QueryRuleActions `json:"actions"` Criteria []types.QueryRuleCriteria `json:"criteria"` diff --git a/typedapi/queryrules/getruleset/get_ruleset.go b/typedapi/queryrules/getruleset/get_ruleset.go index 13b3067d9c..eaad1d2d80 100644 --- a/typedapi/queryrules/getruleset/get_ruleset.go +++ b/typedapi/queryrules/getruleset/get_ruleset.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns the details about a query ruleset +// Get a query ruleset. +// Get details about a query ruleset. package getruleset import ( @@ -76,7 +77,8 @@ func NewGetRulesetFunc(tp elastictransport.Interface) NewGetRuleset { } } -// Returns the details about a query ruleset +// Get a query ruleset. +// Get details about a query ruleset. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-ruleset.html func New(tp elastictransport.Interface) *GetRuleset { diff --git a/typedapi/queryrules/getruleset/response.go b/typedapi/queryrules/getruleset/response.go index 20335b9ac5..4e36cf9997 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getruleset @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getruleset // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/get_ruleset/QueryRulesetGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/get_ruleset/QueryRulesetGetResponse.ts#L22-L24 type Response struct { // Rules Rules associated with the query ruleset diff --git a/typedapi/queryrules/listrulesets/list_rulesets.go b/typedapi/queryrules/listrulesets/list_rulesets.go index 6695df3355..2cb2cc1828 100644 --- a/typedapi/queryrules/listrulesets/list_rulesets.go +++ b/typedapi/queryrules/listrulesets/list_rulesets.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns summarized information about existing query rulesets. +// Get all query rulesets. +// Get summarized information about the query rulesets. package listrulesets import ( @@ -68,7 +69,8 @@ func NewListRulesetsFunc(tp elastictransport.Interface) NewListRulesets { } } -// Returns summarized information about existing query rulesets. +// Get all query rulesets. +// Get summarized information about the query rulesets. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-query-rulesets.html func New(tp elastictransport.Interface) *ListRulesets { diff --git a/typedapi/queryrules/listrulesets/response.go b/typedapi/queryrules/listrulesets/response.go index 454a5a4b16..9cf9ec0ae0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package listrulesets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package listrulesets // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/list_rulesets/QueryRulesetListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 93dcb66d1e..b3dfd90623 100644 --- a/typedapi/queryrules/putrule/put_rule.go +++ b/typedapi/queryrules/putrule/put_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates or updates a query rule within a query ruleset. +// Create or update a query rule. +// Create or update a query rule within a query ruleset. package putrule import ( @@ -87,7 +88,8 @@ func NewPutRuleFunc(tp elastictransport.Interface) NewPutRule { } } -// Creates or updates a query rule within a query ruleset. +// Create or update a query rule. +// Create or update a query rule within a query ruleset. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-rule.html func New(tp elastictransport.Interface) *PutRule { diff --git a/typedapi/queryrules/putrule/request.go b/typedapi/queryrules/putrule/request.go index e96f9627b3..d9e23e129d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putrule @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package putrule // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/put_rule/QueryRulePutRequest.ts#L28-L56 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/put_rule/QueryRulePutRequest.ts#L28-L57 type Request struct { Actions types.QueryRuleActions `json:"actions"` Criteria []types.QueryRuleCriteria `json:"criteria"` diff --git a/typedapi/queryrules/putrule/response.go b/typedapi/queryrules/putrule/response.go index f957f9e31e..4e4ce95f64 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putrule @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putrule // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/put_rule/QueryRulePutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 818df94d17..5f6167fb4c 100644 --- a/typedapi/queryrules/putruleset/put_ruleset.go +++ b/typedapi/queryrules/putruleset/put_ruleset.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates or updates a query ruleset. +// Create or update a query ruleset. package putruleset import ( @@ -81,7 +81,7 @@ func NewPutRulesetFunc(tp elastictransport.Interface) NewPutRuleset { } } -// Creates or updates a query ruleset. +// Create or update a query ruleset. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-ruleset.html func New(tp elastictransport.Interface) *PutRuleset { diff --git a/typedapi/queryrules/putruleset/request.go b/typedapi/queryrules/putruleset/request.go index 9ec8bc9ae7..f37e758def 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putruleset @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package putruleset // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/put_ruleset/QueryRulesetPutRequest.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/put_ruleset/QueryRulesetPutRequest.ts#L23-L44 type Request struct { Rules []types.QueryRule `json:"rules"` } diff --git a/typedapi/queryrules/putruleset/response.go b/typedapi/queryrules/putruleset/response.go index 4e1de2f35a..546f81d492 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putruleset @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putruleset // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/put_ruleset/QueryRulesetPutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 new file mode 100644 index 0000000000..df306cda9f --- /dev/null +++ b/typedapi/queryrules/test/request.go @@ -0,0 +1,54 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package test + +import ( + "encoding/json" + "fmt" +) + +// Request holds the request body struct for the package test +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/test/QueryRulesetTestRequest.ts#L24-L45 +type Request struct { + MatchCriteria map[string]json.RawMessage `json:"match_criteria"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{ + MatchCriteria: make(map[string]json.RawMessage, 0), + } + + 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 Test request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/queryrules/test/response.go b/typedapi/queryrules/test/response.go new file mode 100644 index 0000000000..7007fb5f97 --- /dev/null +++ b/typedapi/queryrules/test/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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package test + +import ( + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// Response holds the response body struct for the package test +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/test/QueryRulesetTestResponse.ts#L23-L28 +type Response struct { + MatchedRules []types.QueryRulesetMatchedRule `json:"matched_rules"` + TotalMatchedRules int `json:"total_matched_rules"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/queryrules/test/test.go b/typedapi/queryrules/test/test.go new file mode 100644 index 0000000000..e1bb007904 --- /dev/null +++ b/typedapi/queryrules/test/test.go @@ -0,0 +1,372 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Test a query ruleset. +// Evaluate match criteria against a query ruleset to identify the rules that +// would match that criteria. +package test + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +const ( + rulesetidMask = 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 Test 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 + + rulesetid string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewTest type alias for index. +type NewTest func(rulesetid string) *Test + +// NewTestFunc returns a new instance of Test with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewTestFunc(tp elastictransport.Interface) NewTest { + return func(rulesetid string) *Test { + n := New(tp) + + n._rulesetid(rulesetid) + + return n + } +} + +// Test a query ruleset. +// Evaluate match criteria against a query ruleset to identify the rules that +// would match that criteria. +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/test-query-ruleset.html +func New(tp elastictransport.Interface) *Test { + r := &Test{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + + req: NewRequest(), + } + + 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 *Test) Raw(raw io.Reader) *Test { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *Test) Request(req *Request) *Test { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *Test) 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 Test: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == rulesetidMask: + path.WriteString("/") + path.WriteString("_query_rules") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "rulesetid", r.rulesetid) + } + path.WriteString(r.rulesetid) + path.WriteString("/") + path.WriteString("_test") + + 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("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=8") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r Test) 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, "query_rules.test") + 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, "query_rules.test") + if reader := instrument.RecordRequestBody(ctx, "query_rules.test", 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", "query_rules.test") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the Test 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 test.Response +func (r Test) 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, "query_rules.test") + 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 Test headers map. +func (r *Test) Header(key, value string) *Test { + r.headers.Set(key, value) + + return r +} + +// RulesetId The unique identifier of the query ruleset to be created or updated +// API Name: rulesetid +func (r *Test) _rulesetid(rulesetid string) *Test { + r.paramSet |= rulesetidMask + r.rulesetid = rulesetid + + 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 *Test) ErrorTrace(errortrace bool) *Test { + 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 *Test) FilterPath(filterpaths ...string) *Test { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"eixsts_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *Test) Human(human bool) *Test { + 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 *Test) Pretty(pretty bool) *Test { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// API name: match_criteria +func (r *Test) MatchCriteria(matchcriteria map[string]json.RawMessage) *Test { + + r.req.MatchCriteria = matchcriteria + + return r +} diff --git a/typedapi/rollup/deletejob/delete_job.go b/typedapi/rollup/deletejob/delete_job.go index bb299370bc..dd552c6eb0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Deletes an existing rollup job. package deletejob diff --git a/typedapi/rollup/deletejob/response.go b/typedapi/rollup/deletejob/response.go index 1e139b86ff..77302bbc50 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletejob @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deletejob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/delete_job/DeleteRollupJobResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 2347dbcd0f..d41fdf4363 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieves the configuration, stats, and status of rollup jobs. package getjobs diff --git a/typedapi/rollup/getjobs/response.go b/typedapi/rollup/getjobs/response.go index 4ab93f7189..f76fe6aaee 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getjobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobs // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_jobs/GetRollupJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 99da4f9f04..1e8f7a2637 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns the capabilities of any rollup jobs that have been configured for a // specific index or index pattern. diff --git a/typedapi/rollup/getrollupcaps/response.go b/typedapi/rollup/getrollupcaps/response.go index 7736bd1874..e6cbc7775a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getrollupcaps @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrollupcaps // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_rollup_caps/GetRollupCapabilitiesResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 711cc0ef04..ecaab1f2b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns the rollup capabilities of all jobs inside of a rollup index (for // example, the index where rollup data is stored). diff --git a/typedapi/rollup/getrollupindexcaps/response.go b/typedapi/rollup/getrollupindexcaps/response.go index a8b693da89..96028c785b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getrollupindexcaps @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrollupindexcaps // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_rollup_index_caps/GetRollupIndexCapabilitiesResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 45edc97180..c7cca72111 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Creates a rollup job. package putjob diff --git a/typedapi/rollup/putjob/request.go b/typedapi/rollup/putjob/request.go index ad8a7a86fa..e6fc089d6a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putjob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/put_job/CreateRollupJobRequest.ts#L27-L89 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/put_job/CreateRollupJobRequest.ts#L27-L89 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 c3eff1abc3..fe68acaa39 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putjob // Response holds the response body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/put_job/CreateRollupJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/put_job/CreateRollupJobResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/rollup/rollupsearch/request.go b/typedapi/rollup/rollupsearch/request.go index d72fab40d9..3e0f83f782 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package rollupsearch @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package rollupsearch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/rollup_search/RollupSearchRequest.ts#L27-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/rollup_search/RollupSearchRequest.ts#L27-L57 type Request struct { // Aggregations Specifies aggregations. diff --git a/typedapi/rollup/rollupsearch/response.go b/typedapi/rollup/rollupsearch/response.go index e65dc2ff99..d2a4321e2f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package rollupsearch @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package rollupsearch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/rollup_search/RollupSearchResponse.ts#L27-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/rollup_search/RollupSearchResponse.ts#L27-L36 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Hits types.HitsMetadata `json:"hits"` @@ -494,6 +494,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := types.NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := types.NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/rollup/rollupsearch/rollup_search.go b/typedapi/rollup/rollupsearch/rollup_search.go index e66957ae59..011f914954 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Enables searching rolled-up data using the standard Query DSL. package rollupsearch diff --git a/typedapi/rollup/startjob/response.go b/typedapi/rollup/startjob/response.go index 6216869cec..bff287f307 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package startjob // Response holds the response body struct for the package startjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/start_job/StartRollupJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 c3f241e71b..53138905dc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Starts an existing, stopped rollup job. package startjob diff --git a/typedapi/rollup/stopjob/response.go b/typedapi/rollup/stopjob/response.go index 246df9ce55..e60b8c8bb5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stopjob // Response holds the response body struct for the package stopjob // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/stop_job/StopRollupJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 2ab6c76b06..c310ddefc4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Stops an existing, started rollup job. package stopjob diff --git a/typedapi/searchablesnapshots/cachestats/cache_stats.go b/typedapi/searchablesnapshots/cachestats/cache_stats.go index be0b2cbaca..f6ace3735d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieve node-level cache statistics about searchable snapshots. package cachestats diff --git a/typedapi/searchablesnapshots/cachestats/response.go b/typedapi/searchablesnapshots/cachestats/response.go index e33279cb8a..868e7660f3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package cachestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package cachestats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/searchable_snapshots/cache_stats/Response.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 be0103eb42..6be3cf2acb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Clear the cache of searchable snapshots. package clearcache diff --git a/typedapi/searchablesnapshots/clearcache/response.go b/typedapi/searchablesnapshots/clearcache/response.go index c49275819e..791241ae6a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearcache @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcache // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 237d3edbc1..7d87c3ec73 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Mount a snapshot as a searchable index. package mount diff --git a/typedapi/searchablesnapshots/mount/request.go b/typedapi/searchablesnapshots/mount/request.go index 72c03dbd73..c91723f363 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package mount @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package mount // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/searchable_snapshots/mount/SearchableSnapshotsMountRequest.ts#L26-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/searchable_snapshots/mount/SearchableSnapshotsMountRequest.ts#L26-L49 type Request struct { IgnoreIndexSettings []string `json:"ignore_index_settings,omitempty"` Index string `json:"index"` diff --git a/typedapi/searchablesnapshots/mount/response.go b/typedapi/searchablesnapshots/mount/response.go index d16af094c8..3f259e8f5d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package mount @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mount // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/searchable_snapshots/mount/SearchableSnapshotsMountResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 95ba71e979..85dfaddf90 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/searchable_snapshots/stats/SearchableSnapshotsStatsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f4f4f7c653..33e57092b8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieve shard-level statistics about searchable snapshots. package stats diff --git a/typedapi/searchapplication/delete/delete.go b/typedapi/searchapplication/delete/delete.go index e45c803163..926c9b14fb 100644 --- a/typedapi/searchapplication/delete/delete.go +++ b/typedapi/searchapplication/delete/delete.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes a search application. +// Delete a search application. +// Remove a search application and its associated alias. Indices attached to the +// search application are not removed. package delete import ( @@ -76,7 +78,9 @@ func NewDeleteFunc(tp elastictransport.Interface) NewDelete { } } -// Deletes a search application. +// Delete a search application. +// Remove a search application and its associated alias. Indices attached to the +// search application are not removed. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-search-application.html func New(tp elastictransport.Interface) *Delete { diff --git a/typedapi/searchapplication/delete/response.go b/typedapi/searchapplication/delete/response.go index 6949e6f6a7..92d6491116 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/delete/SearchApplicationsDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/delete/SearchApplicationsDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go b/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go index d138fb4ba0..e2c2c07ce5 100644 --- a/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go +++ b/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete a behavioral analytics collection. +// The associated data stream is also deleted. package deletebehavioralanalytics import ( @@ -77,6 +78,7 @@ func NewDeleteBehavioralAnalyticsFunc(tp elastictransport.Interface) NewDeleteBe } // Delete a behavioral analytics collection. +// The associated data stream is also deleted. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-analytics-collection.html func New(tp elastictransport.Interface) *DeleteBehavioralAnalytics { diff --git a/typedapi/searchapplication/deletebehavioralanalytics/response.go b/typedapi/searchapplication/deletebehavioralanalytics/response.go index b04841451d..966e53dee9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletebehavioralanalytics // Response holds the response body struct for the package deletebehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/searchapplication/get/get.go b/typedapi/searchapplication/get/get.go index 8397b1f3b5..2686155126 100644 --- a/typedapi/searchapplication/get/get.go +++ b/typedapi/searchapplication/get/get.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns the details about a search application +// Get search application details. package get import ( @@ -76,7 +76,7 @@ func NewGetFunc(tp elastictransport.Interface) NewGet { } } -// Returns the details about a search application +// Get search application details. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-search-application.html func New(tp elastictransport.Interface) *Get { diff --git a/typedapi/searchapplication/get/response.go b/typedapi/searchapplication/get/response.go index a24ef61673..7ec1dae6cb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/get/SearchApplicationsGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/get/SearchApplicationsGetResponse.ts#L22-L24 type Response struct { // AnalyticsCollectionName Analytics collection associated to the Search Application. diff --git a/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go b/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go index 6f66f266fd..f6d60a546a 100644 --- a/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go +++ b/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns the existing behavioral analytics collections. +// Get behavioral analytics collections. package getbehavioralanalytics import ( @@ -74,7 +74,7 @@ func NewGetBehavioralAnalyticsFunc(tp elastictransport.Interface) NewGetBehavior } } -// Returns the existing behavioral analytics collections. +// Get behavioral analytics collections. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-analytics-collection.html func New(tp elastictransport.Interface) *GetBehavioralAnalytics { diff --git a/typedapi/searchapplication/getbehavioralanalytics/response.go b/typedapi/searchapplication/getbehavioralanalytics/response.go index 9ebc10090b..4965780368 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getbehavioralanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getbehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 06dbfe3b8f..4bfbe83750 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns the existing search applications. package list diff --git a/typedapi/searchapplication/list/response.go b/typedapi/searchapplication/list/response.go index ef70eade23..cd3de1da70 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package list @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/list/SearchApplicationsListResponse.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/list/SearchApplicationsListResponse.ts#L24-L29 type Response struct { Count int64 `json:"count"` Results []types.SearchApplicationListItem `json:"results"` diff --git a/typedapi/searchapplication/put/put.go b/typedapi/searchapplication/put/put.go index 965afb760e..9a91ab7a17 100644 --- a/typedapi/searchapplication/put/put.go +++ b/typedapi/searchapplication/put/put.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates or updates a search application. +// Create or update a search application. package put import ( @@ -81,7 +81,7 @@ func NewPutFunc(tp elastictransport.Interface) NewPut { } } -// Creates or updates a search application. +// Create or update a search application. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-search-application.html func New(tp elastictransport.Interface) *Put { diff --git a/typedapi/searchapplication/put/request.go b/typedapi/searchapplication/put/request.go index c242c87908..f9641a3d25 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package put @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/put/SearchApplicationsPutRequest.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/put/SearchApplicationsPutRequest.ts#L23-L48 type Request = types.SearchApplication // NewRequest returns a Request diff --git a/typedapi/searchapplication/put/response.go b/typedapi/searchapplication/put/response.go index 86a1522dd9..cf5fb09beb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package put @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/put/SearchApplicationsPutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1e00b4a752..279fc163ea 100644 --- a/typedapi/searchapplication/putbehavioralanalytics/put_behavioral_analytics.go +++ b/typedapi/searchapplication/putbehavioralanalytics/put_behavioral_analytics.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a behavioral analytics collection. +// Create a behavioral analytics collection. package putbehavioralanalytics import ( @@ -76,7 +76,7 @@ func NewPutBehavioralAnalyticsFunc(tp elastictransport.Interface) NewPutBehavior } } -// Creates a behavioral analytics collection. +// Create a behavioral analytics collection. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-analytics-collection.html func New(tp elastictransport.Interface) *PutBehavioralAnalytics { diff --git a/typedapi/searchapplication/putbehavioralanalytics/response.go b/typedapi/searchapplication/putbehavioralanalytics/response.go index f2620be24b..41561f365f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putbehavioralanalytics // Response holds the response body struct for the package putbehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L23-L25 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/searchapplication/search/request.go b/typedapi/searchapplication/search/request.go index af57816981..5038d33d30 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package search @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/search/SearchApplicationsSearchRequest.ts#L24-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/search/SearchApplicationsSearchRequest.ts#L24-L54 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 e5c45808d5..ee9f94d193 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/search/SearchApplicationsSearchResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/search/SearchApplicationsSearchResponse.ts#L22-L24 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` @@ -504,6 +504,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := types.NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := types.NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/searchapplication/search/search.go b/typedapi/searchapplication/search/search.go index 9f00792366..f551ee0e5f 100644 --- a/typedapi/searchapplication/search/search.go +++ b/typedapi/searchapplication/search/search.go @@ -16,9 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 - -// Perform a search against a search application. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. package search import ( @@ -81,7 +86,12 @@ func NewSearchFunc(tp elastictransport.Interface) NewSearch { } } -// Perform a search against a search application. +// Run a search application search. +// Generate and run an Elasticsearch query that uses the specified query +// parameteter and the search template associated with the search application or +// default template. +// Unspecified template parameters are assigned their default values if +// applicable. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-search.html func New(tp elastictransport.Interface) *Search { diff --git a/typedapi/security/activateuserprofile/activate_user_profile.go b/typedapi/security/activateuserprofile/activate_user_profile.go index 6dc1fdeb07..73128b1efa 100644 --- a/typedapi/security/activateuserprofile/activate_user_profile.go +++ b/typedapi/security/activateuserprofile/activate_user_profile.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates or updates a user profile on behalf of another user. +// Activate a user profile. +// +// Create or update a user profile on behalf of another user. package activateuserprofile import ( @@ -74,7 +76,9 @@ func NewActivateUserProfileFunc(tp elastictransport.Interface) NewActivateUserPr } } -// Creates or updates a user profile on behalf of another user. +// Activate a user profile. +// +// Create or update a user profile on behalf of another user. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-activate-user-profile.html func New(tp elastictransport.Interface) *ActivateUserProfile { diff --git a/typedapi/security/activateuserprofile/request.go b/typedapi/security/activateuserprofile/request.go index 35c2bf0b36..09d791ad75 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package activateuserprofile @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package activateuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/activate_user_profile/Request.ts#L23-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/activate_user_profile/Request.ts#L23-L39 type Request struct { AccessToken *string `json:"access_token,omitempty"` GrantType granttype.GrantType `json:"grant_type"` diff --git a/typedapi/security/activateuserprofile/response.go b/typedapi/security/activateuserprofile/response.go index 311674188a..c746ac847f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package activateuserprofile @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package activateuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/activate_user_profile/Response.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/activate_user_profile/Response.ts#L22-L24 type Response struct { Data map[string]json.RawMessage `json:"data"` Doc_ types.UserProfileHitMetadata `json:"_doc"` diff --git a/typedapi/security/authenticate/authenticate.go b/typedapi/security/authenticate/authenticate.go index 6716ad93bd..a9c5fd7748 100644 --- a/typedapi/security/authenticate/authenticate.go +++ b/typedapi/security/authenticate/authenticate.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // 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). @@ -77,6 +78,7 @@ func NewAuthenticateFunc(tp elastictransport.Interface) NewAuthenticate { } // 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). diff --git a/typedapi/security/authenticate/response.go b/typedapi/security/authenticate/response.go index 62ba7dceef..4335b21d49 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package authenticate @@ -26,19 +26,19 @@ import ( // Response holds the response body struct for the package authenticate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/authenticate/SecurityAuthenticateResponse.ts#L25-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/authenticate/SecurityAuthenticateResponse.ts#L24-L42 type Response struct { - ApiKey *types.ApiKey `json:"api_key,omitempty"` - AuthenticationRealm types.RealmInfo `json:"authentication_realm"` - AuthenticationType string `json:"authentication_type"` - Email *string `json:"email,omitempty"` - Enabled bool `json:"enabled"` - FullName *string `json:"full_name,omitempty"` - LookupRealm types.RealmInfo `json:"lookup_realm"` - Metadata types.Metadata `json:"metadata"` - Roles []string `json:"roles"` - Token *types.AuthenticateToken `json:"token,omitempty"` - Username string `json:"username"` + ApiKey *types.AuthenticateApiKey `json:"api_key,omitempty"` + AuthenticationRealm types.RealmInfo `json:"authentication_realm"` + AuthenticationType string `json:"authentication_type"` + Email *string `json:"email,omitempty"` + Enabled bool `json:"enabled"` + FullName *string `json:"full_name,omitempty"` + LookupRealm types.RealmInfo `json:"lookup_realm"` + Metadata types.Metadata `json:"metadata"` + Roles []string `json:"roles"` + Token *types.AuthenticateToken `json:"token,omitempty"` + Username string `json:"username"` } // NewResponse returns a Response diff --git a/typedapi/security/bulkdeleterole/bulk_delete_role.go b/typedapi/security/bulkdeleterole/bulk_delete_role.go index b8d2e8137c..4d9656d4c1 100644 --- a/typedapi/security/bulkdeleterole/bulk_delete_role.go +++ b/typedapi/security/bulkdeleterole/bulk_delete_role.go @@ -16,8 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// 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 @@ -77,6 +79,8 @@ func NewBulkDeleteRoleFunc(tp elastictransport.Interface) NewBulkDeleteRole { } } +// 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 diff --git a/typedapi/security/bulkdeleterole/request.go b/typedapi/security/bulkdeleterole/request.go index 0f5b982a7c..50c6e1ffcb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package bulkdeleterole @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package bulkdeleterole // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/bulk_delete_role/SecurityBulkDeleteRoleRequest.ts#L23-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/bulk_delete_role/SecurityBulkDeleteRoleRequest.ts#L23-L43 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 3c33989b74..5384cb3299 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package bulkdeleterole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulkdeleterole // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/bulk_delete_role/SecurityBulkDeleteRoleResponse.ts#L25-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ba425dc5c2..1cfdff2b77 100644 --- a/typedapi/security/bulkputrole/bulk_put_role.go +++ b/typedapi/security/bulkputrole/bulk_put_role.go @@ -16,8 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// 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 @@ -77,6 +79,8 @@ func NewBulkPutRoleFunc(tp elastictransport.Interface) NewBulkPutRole { } } +// 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 diff --git a/typedapi/security/bulkputrole/request.go b/typedapi/security/bulkputrole/request.go index ac068977de..4beafbecdf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package bulkputrole @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package bulkputrole // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/bulk_put_role/SecurityBulkPutRoleRequest.ts#L25-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/bulk_put_role/SecurityBulkPutRoleRequest.ts#L25-L45 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 1c8295aefc..e02b3b67f8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package bulkputrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulkputrole // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/bulk_put_role/SecurityBulkPutRoleResponse.ts#L22-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 a17610f5b5..ed9d9cb616 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Updates the attributes of multiple existing API keys. package bulkupdateapikeys diff --git a/typedapi/security/changepassword/change_password.go b/typedapi/security/changepassword/change_password.go index 8817f8cb66..6578d4c47f 100644 --- a/typedapi/security/changepassword/change_password.go +++ b/typedapi/security/changepassword/change_password.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Changes the passwords of users in the native realm and built-in users. +// Change passwords. +// +// Change the passwords of users in the native realm and built-in users. package changepassword import ( @@ -80,7 +82,9 @@ func NewChangePasswordFunc(tp elastictransport.Interface) NewChangePassword { } } -// Changes the passwords of users in the native realm and built-in users. +// Change passwords. +// +// Change the passwords of users in the native realm and built-in users. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html func New(tp elastictransport.Interface) *ChangePassword { diff --git a/typedapi/security/changepassword/request.go b/typedapi/security/changepassword/request.go index b7547d61b0..00fe9a064d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package changepassword @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package changepassword // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/change_password/SecurityChangePasswordRequest.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/change_password/SecurityChangePasswordRequest.ts#L23-L54 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 4cd912a837..6f1446209a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package changepassword // Response holds the response body struct for the package changepassword // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/change_password/SecurityChangePasswordResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 fb0c6ac142..6cf763b195 100644 --- a/typedapi/security/clearapikeycache/clear_api_key_cache.go +++ b/typedapi/security/clearapikeycache/clear_api_key_cache.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Evicts a subset of all entries from the API key cache. +// 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. package clearapikeycache @@ -78,7 +80,9 @@ func NewClearApiKeyCacheFunc(tp elastictransport.Interface) NewClearApiKeyCache } } -// Evicts a subset of all entries from the API key cache. +// 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. // diff --git a/typedapi/security/clearapikeycache/response.go b/typedapi/security/clearapikeycache/response.go index bdb2a1a5e6..7bd31369bc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearapikeycache @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearapikeycache // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/clear_api_key_cache/SecurityClearApiKeyCacheResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1c8d9c60e9..b8ce39c1ea 100644 --- a/typedapi/security/clearcachedprivileges/clear_cached_privileges.go +++ b/typedapi/security/clearcachedprivileges/clear_cached_privileges.go @@ -16,9 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Evicts application privileges from the native application privileges cache. +// 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. package clearcachedprivileges import ( @@ -76,7 +80,11 @@ func NewClearCachedPrivilegesFunc(tp elastictransport.Interface) NewClearCachedP } } -// Evicts application privileges from the native application privileges cache. +// Clear the privileges cache. +// +// Evict privileges from the native application privilege cache. +// The cache is also automatically cleared for applications that have their +// privileges updated. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html func New(tp elastictransport.Interface) *ClearCachedPrivileges { diff --git a/typedapi/security/clearcachedprivileges/response.go b/typedapi/security/clearcachedprivileges/response.go index a964554307..5a07acf278 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearcachedprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/clear_cached_privileges/SecurityClearCachedPrivilegesResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 a26a0d29a3..c982ff7d62 100644 --- a/typedapi/security/clearcachedrealms/clear_cached_realms.go +++ b/typedapi/security/clearcachedrealms/clear_cached_realms.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Evicts users from the user cache. Can completely clear the cache or evict +// Clear the user cache. +// +// Evict users from the user cache. You can completely clear the cache or evict // specific users. package clearcachedrealms @@ -77,7 +79,9 @@ func NewClearCachedRealmsFunc(tp elastictransport.Interface) NewClearCachedRealm } } -// Evicts users from the user cache. Can completely clear the cache or evict +// Clear the user cache. +// +// Evict users from the user cache. You can completely clear the cache or evict // specific users. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html diff --git a/typedapi/security/clearcachedrealms/response.go b/typedapi/security/clearcachedrealms/response.go index d09b8b6801..86e73c3e92 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearcachedrealms @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedrealms // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/clear_cached_realms/SecurityClearCachedRealmsResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 c4e01c0431..716e92f2da 100644 --- a/typedapi/security/clearcachedroles/clear_cached_roles.go +++ b/typedapi/security/clearcachedroles/clear_cached_roles.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Evicts roles from the native role cache. +// Clear the roles cache. +// +// Evict roles from the native role cache. package clearcachedroles import ( @@ -76,7 +78,9 @@ func NewClearCachedRolesFunc(tp elastictransport.Interface) NewClearCachedRoles } } -// Evicts roles from the native role cache. +// Clear the roles cache. +// +// Evict roles from the native role cache. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html func New(tp elastictransport.Interface) *ClearCachedRoles { diff --git a/typedapi/security/clearcachedroles/response.go b/typedapi/security/clearcachedroles/response.go index 563bb3a5ce..2161361217 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearcachedroles @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedroles // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/clear_cached_roles/ClearCachedRolesResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ae193e3402..e5d040458f 100644 --- a/typedapi/security/clearcachedservicetokens/clear_cached_service_tokens.go +++ b/typedapi/security/clearcachedservicetokens/clear_cached_service_tokens.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Evicts tokens from the service account token caches. +// Clear service account token caches. +// +// Evict a subset of all entries from the service account token caches. package clearcachedservicetokens import ( @@ -86,7 +88,9 @@ func NewClearCachedServiceTokensFunc(tp elastictransport.Interface) NewClearCach } } -// Evicts tokens from the service account token caches. +// Clear service account token caches. +// +// Evict a subset of all entries from the service account token caches. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html func New(tp elastictransport.Interface) *ClearCachedServiceTokens { diff --git a/typedapi/security/clearcachedservicetokens/response.go b/typedapi/security/clearcachedservicetokens/response.go index 7f116efca3..9aef771151 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearcachedservicetokens @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedservicetokens // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/clear_cached_service_tokens/ClearCachedServiceTokensResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d51a3dc971..81fb39835f 100644 --- a/typedapi/security/createapikey/create_api_key.go +++ b/typedapi/security/createapikey/create_api_key.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create an API key. -// Creates an API key for access without requiring basic authentication. +// +// Create an API key for access without requiring basic authentication. // 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 @@ -82,7 +83,8 @@ func NewCreateApiKeyFunc(tp elastictransport.Interface) NewCreateApiKey { } // Create an API key. -// Creates an API key for access without requiring basic authentication. +// +// Create an API key for access without requiring basic authentication. // 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 diff --git a/typedapi/security/createapikey/request.go b/typedapi/security/createapikey/request.go index 03393827d8..3c904a38a6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package createapikey @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package createapikey // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L60 type Request struct { // Expiration Expiration time for the API key. By default, API keys never expire. diff --git a/typedapi/security/createapikey/response.go b/typedapi/security/createapikey/response.go index 50e0831f12..17c26f4eec 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package createapikey // Response holds the response body struct for the package createapikey // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/create_api_key/SecurityCreateApiKeyResponse.ts#L23-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 adcfad92f4..99bbdf1472 100644 --- a/typedapi/security/createcrossclusterapikey/create_cross_cluster_api_key.go +++ b/typedapi/security/createcrossclusterapikey/create_cross_cluster_api_key.go @@ -16,21 +16,53 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a cross-cluster API key for API key based remote cluster access. +// 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. package createcrossclusterapikey import ( + gobytes "bytes" "context" + "encoding/json" "errors" "fmt" "io" "net/http" "net/url" + "strconv" "strings" "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -45,6 +77,10 @@ type CreateCrossClusterApiKey struct { raw io.Reader + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + paramSet int spanStarted bool @@ -65,7 +101,35 @@ func NewCreateCrossClusterApiKeyFunc(tp elastictransport.Interface) NewCreateCro } } -// Creates a cross-cluster API key for API key based remote cluster access. +// Create a cross-cluster API key. +// +// Create an API key of the `cross_cluster` type for the API key based remote +// cluster access. +// A `cross_cluster` API key cannot be used to authenticate through the REST +// interface. +// +// IMPORTANT: To authenticate this request you must use a credential that is not +// an API key. Even if you use an API key that has the required privilege, the +// API returns an error. +// +// Cross-cluster API keys are created by the Elasticsearch API key service, +// which is automatically enabled. +// +// NOTE: Unlike REST API keys, a cross-cluster API key does not capture +// permissions of the authenticated user. The API key’s effective permission is +// exactly as specified with the `access` property. +// +// A successful request returns a JSON structure that contains the API key, its +// unique ID, and its name. If applicable, it also returns expiration +// information for the API key in milliseconds. +// +// By default, API keys never expire. You can specify expiration information +// when you create the API keys. +// +// Cross-cluster API keys can only be updated with the update cross-cluster API +// key API. +// Attempting to update them with the update REST API key API or the bulk update +// REST API keys API will result in an error. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html func New(tp elastictransport.Interface) *CreateCrossClusterApiKey { @@ -73,6 +137,10 @@ func New(tp elastictransport.Interface) *CreateCrossClusterApiKey { transport: tp, values: make(url.Values), headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + + req: NewRequest(), } if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { @@ -84,6 +152,21 @@ func New(tp elastictransport.Interface) *CreateCrossClusterApiKey { 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 *CreateCrossClusterApiKey) Raw(raw io.Reader) *CreateCrossClusterApiKey { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *CreateCrossClusterApiKey) Request(req *Request) *CreateCrossClusterApiKey { + r.req = req + + return r +} + // HttpRequest returns the http.Request object built from the // given parameters. func (r *CreateCrossClusterApiKey) HttpRequest(ctx context.Context) (*http.Request, error) { @@ -93,6 +176,31 @@ func (r *CreateCrossClusterApiKey) HttpRequest(ctx context.Context) (*http.Reque 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 CreateCrossClusterApiKey: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + r.path.Scheme = "http" switch { @@ -182,13 +290,7 @@ func (r CreateCrossClusterApiKey) Perform(providedCtx context.Context) (*http.Re } // Do runs the request through the transport, handle the response and returns a createcrossclusterapikey.Response -func (r CreateCrossClusterApiKey) 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 CreateCrossClusterApiKey) IsSuccess(providedCtx context.Context) (bool, error) { +func (r CreateCrossClusterApiKey) Do(providedCtx context.Context) (*Response, error) { var ctx context.Context r.spanStarted = true if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -199,30 +301,46 @@ func (r CreateCrossClusterApiKey) IsSuccess(providedCtx context.Context) (bool, ctx = providedCtx } - res, err := r.Perform(ctx) + response := NewResponse() + 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 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 + } - if res.StatusCode >= 200 && res.StatusCode < 300 { - return true, nil + return response, nil } - if res.StatusCode != 404 { - err := fmt.Errorf("an error happened during the CreateCrossClusterApiKey query execution, status code: %d", res.StatusCode) + 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 false, err + return nil, err } - return false, nil + 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 CreateCrossClusterApiKey headers map. @@ -231,3 +349,92 @@ func (r *CreateCrossClusterApiKey) Header(key, value string) *CreateCrossCluster 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 *CreateCrossClusterApiKey) ErrorTrace(errortrace bool) *CreateCrossClusterApiKey { + 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 *CreateCrossClusterApiKey) FilterPath(filterpaths ...string) *CreateCrossClusterApiKey { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"eixsts_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *CreateCrossClusterApiKey) Human(human bool) *CreateCrossClusterApiKey { + 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 *CreateCrossClusterApiKey) Pretty(pretty bool) *CreateCrossClusterApiKey { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// Access The access to be granted to this API key. +// The access is composed of permissions for cross-cluster search and +// cross-cluster replication. +// At least one of them must be specified. +// +// NOTE: No explicit privileges should be specified for either search or +// replication access. +// The creation process automatically converts the access specification to a +// role descriptor which has relevant privileges assigned accordingly. +// API name: access +func (r *CreateCrossClusterApiKey) Access(access *types.Access) *CreateCrossClusterApiKey { + + r.req.Access = *access + + return r +} + +// Expiration Expiration time for the API key. +// By default, API keys never expire. +// API name: expiration +func (r *CreateCrossClusterApiKey) Expiration(duration types.Duration) *CreateCrossClusterApiKey { + r.req.Expiration = duration + + return r +} + +// Metadata Arbitrary metadata that you want to associate with the API key. +// It supports nested data structure. +// Within the metadata object, keys beginning with `_` are reserved for system +// usage. +// API name: metadata +func (r *CreateCrossClusterApiKey) Metadata(metadata types.Metadata) *CreateCrossClusterApiKey { + r.req.Metadata = metadata + + return r +} + +// Name Specifies the name for this API key. +// API name: name +func (r *CreateCrossClusterApiKey) Name(name string) *CreateCrossClusterApiKey { + r.req.Name = name + + return r +} diff --git a/typedapi/security/createcrossclusterapikey/request.go b/typedapi/security/createcrossclusterapikey/request.go new file mode 100644 index 0000000000..07de9b0711 --- /dev/null +++ b/typedapi/security/createcrossclusterapikey/request.go @@ -0,0 +1,116 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package createcrossclusterapikey + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// Request holds the request body struct for the package createcrossclusterapikey +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyRequest.ts#L25-L73 +type Request struct { + + // Access The access to be granted to this API key. + // The access is composed of permissions for cross-cluster search and + // cross-cluster replication. + // At least one of them must be specified. + // + // NOTE: No explicit privileges should be specified for either search or + // replication access. + // The creation process automatically converts the access specification to a + // role descriptor which has relevant privileges assigned accordingly. + Access types.Access `json:"access"` + // Expiration Expiration time for the API key. + // By default, API keys never expire. + Expiration types.Duration `json:"expiration,omitempty"` + // Metadata Arbitrary metadata that you want to associate with the API key. + // It supports nested data structure. + // Within the metadata object, keys beginning with `_` are reserved for system + // usage. + Metadata types.Metadata `json:"metadata,omitempty"` + // Name Specifies the name for this API key. + Name string `json:"name"` +} + +// 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 Createcrossclusterapikey request: %w", err) + } + + return &req, nil +} + +func (s *Request) 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": + if err := dec.Decode(&s.Access); err != nil { + return fmt.Errorf("%s | %w", "Access", err) + } + + case "expiration": + if err := dec.Decode(&s.Expiration); err != nil { + return fmt.Errorf("%s | %w", "Expiration", err) + } + + case "metadata": + if err := dec.Decode(&s.Metadata); err != nil { + return fmt.Errorf("%s | %w", "Metadata", err) + } + + case "name": + if err := dec.Decode(&s.Name); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + + } + } + return nil +} diff --git a/typedapi/security/createcrossclusterapikey/response.go b/typedapi/security/createcrossclusterapikey/response.go new file mode 100644 index 0000000000..aba5d0739e --- /dev/null +++ b/typedapi/security/createcrossclusterapikey/response.go @@ -0,0 +1,46 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package createcrossclusterapikey + +// Response holds the response body struct for the package createcrossclusterapikey +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyResponse.ts#L23-L48 +type Response struct { + + // ApiKey Generated API key. + ApiKey string `json:"api_key"` + // Encoded API key credentials which is the base64-encoding of + // the UTF-8 representation of `id` and `api_key` joined + // by a colon (`:`). + Encoded string `json:"encoded"` + // Expiration Expiration in milliseconds for the API key. + Expiration *int64 `json:"expiration,omitempty"` + // Id Unique ID for this API key. + Id string `json:"id"` + // Name Specifies the name for this API key. + Name string `json:"name"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/security/createservicetoken/create_service_token.go b/typedapi/security/createservicetoken/create_service_token.go index c428b723e6..b08af2fbf4 100644 --- a/typedapi/security/createservicetoken/create_service_token.go +++ b/typedapi/security/createservicetoken/create_service_token.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a service accounts token for access without requiring basic +// Create a service account token. +// +// Create a service accounts token for access without requiring basic // authentication. package createservicetoken @@ -86,7 +88,9 @@ func NewCreateServiceTokenFunc(tp elastictransport.Interface) NewCreateServiceTo } } -// Creates a service accounts token for access without requiring basic +// Create a service account token. +// +// Create a service accounts token for access without requiring basic // authentication. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html diff --git a/typedapi/security/createservicetoken/response.go b/typedapi/security/createservicetoken/response.go index b8bc7e90d1..f665c26739 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package createservicetoken @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package createservicetoken // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/create_service_token/CreateServiceTokenResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/create_service_token/CreateServiceTokenResponse.ts#L22-L27 type Response struct { Created bool `json:"created"` Token types.ServiceToken `json:"token"` diff --git a/typedapi/security/deleteprivileges/delete_privileges.go b/typedapi/security/deleteprivileges/delete_privileges.go index 7ea4de040c..6949aacbe5 100644 --- a/typedapi/security/deleteprivileges/delete_privileges.go +++ b/typedapi/security/deleteprivileges/delete_privileges.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Removes application privileges. +// Delete application privileges. package deleteprivileges import ( @@ -82,7 +82,7 @@ func NewDeletePrivilegesFunc(tp elastictransport.Interface) NewDeletePrivileges } } -// Removes application privileges. +// Delete application privileges. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html func New(tp elastictransport.Interface) *DeletePrivileges { diff --git a/typedapi/security/deleteprivileges/response.go b/typedapi/security/deleteprivileges/response.go index c910f3c0ea..82484e8e91 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleteprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deleteprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/delete_privileges/SecurityDeletePrivilegesResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 3c056c8109..2ae6042ece 100644 --- a/typedapi/security/deleterole/delete_role.go +++ b/typedapi/security/deleterole/delete_role.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Removes roles in the native realm. +// Delete roles. +// +// Delete roles in the native realm. package deleterole import ( @@ -77,7 +79,9 @@ func NewDeleteRoleFunc(tp elastictransport.Interface) NewDeleteRole { } } -// Removes roles in the native realm. +// Delete roles. +// +// Delete roles in the native realm. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html func New(tp elastictransport.Interface) *DeleteRole { diff --git a/typedapi/security/deleterole/response.go b/typedapi/security/deleterole/response.go index bef7f1a376..cde302d744 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleterole // Response holds the response body struct for the package deleterole // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/delete_role/SecurityDeleteRoleResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/delete_role/SecurityDeleteRoleResponse.ts#L20-L22 type Response struct { Found bool `json:"found"` } diff --git a/typedapi/security/deleterolemapping/delete_role_mapping.go b/typedapi/security/deleterolemapping/delete_role_mapping.go index 661155cdb3..9f200940e2 100644 --- a/typedapi/security/deleterolemapping/delete_role_mapping.go +++ b/typedapi/security/deleterolemapping/delete_role_mapping.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Removes role mappings. +// Delete role mappings. package deleterolemapping import ( @@ -77,7 +77,7 @@ func NewDeleteRoleMappingFunc(tp elastictransport.Interface) NewDeleteRoleMappin } } -// Removes role mappings. +// Delete role mappings. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html func New(tp elastictransport.Interface) *DeleteRoleMapping { diff --git a/typedapi/security/deleterolemapping/response.go b/typedapi/security/deleterolemapping/response.go index cda78caa60..50c73945f9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleterolemapping // Response holds the response body struct for the package deleterolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/delete_role_mapping/SecurityDeleteRoleMappingResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/delete_role_mapping/SecurityDeleteRoleMappingResponse.ts#L20-L22 type Response struct { Found bool `json:"found"` } diff --git a/typedapi/security/deleteservicetoken/delete_service_token.go b/typedapi/security/deleteservicetoken/delete_service_token.go index 9b5d021caf..572db80167 100644 --- a/typedapi/security/deleteservicetoken/delete_service_token.go +++ b/typedapi/security/deleteservicetoken/delete_service_token.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes a service account token. +// Delete service account tokens. +// +// Delete service account tokens for a service in a specified namespace. package deleteservicetoken import ( @@ -87,7 +89,9 @@ func NewDeleteServiceTokenFunc(tp elastictransport.Interface) NewDeleteServiceTo } } -// Deletes a service account token. +// Delete service account tokens. +// +// Delete service account tokens for a service in a specified namespace. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html func New(tp elastictransport.Interface) *DeleteServiceToken { diff --git a/typedapi/security/deleteservicetoken/response.go b/typedapi/security/deleteservicetoken/response.go index bbc601c514..fac69dd09f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleteservicetoken // Response holds the response body struct for the package deleteservicetoken // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/delete_service_token/DeleteServiceTokenResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/delete_service_token/DeleteServiceTokenResponse.ts#L20-L22 type Response struct { Found bool `json:"found"` } diff --git a/typedapi/security/deleteuser/delete_user.go b/typedapi/security/deleteuser/delete_user.go index 74646c1cdd..d9f2d28bfc 100644 --- a/typedapi/security/deleteuser/delete_user.go +++ b/typedapi/security/deleteuser/delete_user.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes users from the native realm. +// Delete users. +// +// Delete users from the native realm. package deleteuser import ( @@ -77,7 +79,9 @@ func NewDeleteUserFunc(tp elastictransport.Interface) NewDeleteUser { } } -// Deletes users from the native realm. +// Delete users. +// +// Delete users from the native realm. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html func New(tp elastictransport.Interface) *DeleteUser { diff --git a/typedapi/security/deleteuser/response.go b/typedapi/security/deleteuser/response.go index 7a3f83978d..84907fd757 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleteuser // Response holds the response body struct for the package deleteuser // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/delete_user/SecurityDeleteUserResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/delete_user/SecurityDeleteUserResponse.ts#L20-L22 type Response struct { Found bool `json:"found"` } diff --git a/typedapi/security/disableuser/disable_user.go b/typedapi/security/disableuser/disable_user.go index 2a39d83720..0636e1aaee 100644 --- a/typedapi/security/disableuser/disable_user.go +++ b/typedapi/security/disableuser/disable_user.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Disables users in the native realm. +// Disable users. +// +// Disable users in the native realm. package disableuser import ( @@ -77,7 +79,9 @@ func NewDisableUserFunc(tp elastictransport.Interface) NewDisableUser { } } -// Disables users in the native realm. +// Disable users. +// +// Disable users in the native realm. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html func New(tp elastictransport.Interface) *DisableUser { diff --git a/typedapi/security/disableuser/response.go b/typedapi/security/disableuser/response.go index 60f3d741d7..f3e3a5d107 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package disableuser // Response holds the response body struct for the package disableuser // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/disable_user/SecurityDisableUserResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 71933a19c3..124baf508e 100644 --- a/typedapi/security/disableuserprofile/disable_user_profile.go +++ b/typedapi/security/disableuserprofile/disable_user_profile.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Disables a user profile so it's not visible in user profile searches. +// Disable a user profile. +// +// Disable user profiles so that they are not visible in user profile searches. package disableuserprofile import ( @@ -77,7 +79,9 @@ func NewDisableUserProfileFunc(tp elastictransport.Interface) NewDisableUserProf } } -// Disables a user profile so it's not visible in user profile searches. +// Disable a user profile. +// +// Disable user profiles so that they are not visible in user profile searches. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user-profile.html func New(tp elastictransport.Interface) *DisableUserProfile { diff --git a/typedapi/security/disableuserprofile/response.go b/typedapi/security/disableuserprofile/response.go index b69ccd9bb9..97238d80db 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package disableuserprofile // Response holds the response body struct for the package disableuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/disable_user_profile/Response.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/disable_user_profile/Response.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/security/enableuser/enable_user.go b/typedapi/security/enableuser/enable_user.go index 2a89acaccd..df88cd869b 100644 --- a/typedapi/security/enableuser/enable_user.go +++ b/typedapi/security/enableuser/enable_user.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Enables users in the native realm. +// Enable users. +// +// Enable users in the native realm. package enableuser import ( @@ -77,7 +79,9 @@ func NewEnableUserFunc(tp elastictransport.Interface) NewEnableUser { } } -// Enables users in the native realm. +// Enable users. +// +// Enable users in the native realm. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html func New(tp elastictransport.Interface) *EnableUser { diff --git a/typedapi/security/enableuser/response.go b/typedapi/security/enableuser/response.go index 64dde59ea4..8a9a25f371 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package enableuser // Response holds the response body struct for the package enableuser // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/enable_user/SecurityEnableUserResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 c832969880..7de8871483 100644 --- a/typedapi/security/enableuserprofile/enable_user_profile.go +++ b/typedapi/security/enableuserprofile/enable_user_profile.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Enables a user profile so it's visible in user profile searches. +// Enable a user profile. +// +// Enable user profiles to make them visible in user profile searches. package enableuserprofile import ( @@ -77,7 +79,9 @@ func NewEnableUserProfileFunc(tp elastictransport.Interface) NewEnableUserProfil } } -// Enables a user profile so it's visible in user profile searches. +// Enable a user profile. +// +// Enable user profiles to make them visible in user profile searches. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user-profile.html func New(tp elastictransport.Interface) *EnableUserProfile { diff --git a/typedapi/security/enableuserprofile/response.go b/typedapi/security/enableuserprofile/response.go index 4daf7ec4ba..8e7f5a26ac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package enableuserprofile // Response holds the response body struct for the package enableuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/enable_user_profile/Response.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/enable_user_profile/Response.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/security/enrollkibana/enroll_kibana.go b/typedapi/security/enrollkibana/enroll_kibana.go index 1e87c5e9b4..bf017aaa90 100644 --- a/typedapi/security/enrollkibana/enroll_kibana.go +++ b/typedapi/security/enrollkibana/enroll_kibana.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Enables a Kibana instance to configure itself for communication with a -// secured Elasticsearch cluster. +// Enroll Kibana. +// +// Enable a Kibana instance to configure itself for communication with a secured +// Elasticsearch cluster. package enrollkibana import ( @@ -69,8 +71,10 @@ func NewEnrollKibanaFunc(tp elastictransport.Interface) NewEnrollKibana { } } -// Enables a Kibana instance to configure itself for communication with a -// secured Elasticsearch cluster. +// Enroll Kibana. +// +// Enable a Kibana instance to configure itself for communication with a secured +// Elasticsearch cluster. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-kibana-enrollment.html func New(tp elastictransport.Interface) *EnrollKibana { diff --git a/typedapi/security/enrollkibana/response.go b/typedapi/security/enrollkibana/response.go index bf69554f10..7c769ef7a3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package enrollkibana @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package enrollkibana // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/enroll_kibana/Response.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/enroll_kibana/Response.ts#L20-L25 type Response struct { HttpCa string `json:"http_ca"` Token types.KibanaToken `json:"token"` diff --git a/typedapi/security/enrollnode/enroll_node.go b/typedapi/security/enrollnode/enroll_node.go index ac01cd3281..dffa119ed5 100644 --- a/typedapi/security/enrollnode/enroll_node.go +++ b/typedapi/security/enrollnode/enroll_node.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Allows a new node to join an existing cluster with security features enabled. +// Enroll a node. +// +// Enroll a new node to allow it to join an existing cluster with security +// features enabled. package enrollnode import ( @@ -68,7 +71,10 @@ func NewEnrollNodeFunc(tp elastictransport.Interface) NewEnrollNode { } } -// Allows a new node to join an existing cluster with security features enabled. +// Enroll a node. +// +// Enroll a new node to allow it to join an existing cluster with security +// features enabled. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-node-enrollment.html func New(tp elastictransport.Interface) *EnrollNode { diff --git a/typedapi/security/enrollnode/response.go b/typedapi/security/enrollnode/response.go index e4295ef16c..bac50ba7f4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package enrollnode // Response holds the response body struct for the package enrollnode // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/enroll_node/Response.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/enroll_node/Response.ts#L20-L29 type Response struct { HttpCaCert string `json:"http_ca_cert"` HttpCaKey string `json:"http_ca_key"` diff --git a/typedapi/security/getapikey/get_api_key.go b/typedapi/security/getapikey/get_api_key.go index 1ce96a3a01..15849c7fa8 100644 --- a/typedapi/security/getapikey/get_api_key.go +++ b/typedapi/security/getapikey/get_api_key.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // 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. @@ -75,6 +76,7 @@ func NewGetApiKeyFunc(tp elastictransport.Interface) NewGetApiKey { } // 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. diff --git a/typedapi/security/getapikey/response.go b/typedapi/security/getapikey/response.go index 2608342aa3..2ea5a4cd8e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getapikey @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getapikey // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_api_key/SecurityGetApiKeyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e8fae1bf77..ecca447845 100644 --- a/typedapi/security/getbuiltinprivileges/get_builtin_privileges.go +++ b/typedapi/security/getbuiltinprivileges/get_builtin_privileges.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves the list of cluster privileges and index privileges that are -// available in this version of Elasticsearch. +// Get builtin privileges. +// +// Get the list of cluster privileges and index privileges that are available in +// this version of Elasticsearch. package getbuiltinprivileges import ( @@ -69,8 +71,10 @@ func NewGetBuiltinPrivilegesFunc(tp elastictransport.Interface) NewGetBuiltinPri } } -// Retrieves the list of cluster privileges and index privileges that are -// available in this version of Elasticsearch. +// Get builtin privileges. +// +// Get the list of cluster privileges and index privileges that are available in +// this version of Elasticsearch. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html func New(tp elastictransport.Interface) *GetBuiltinPrivileges { diff --git a/typedapi/security/getbuiltinprivileges/response.go b/typedapi/security/getbuiltinprivileges/response.go index 140842344d..c803f711ea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getbuiltinprivileges @@ -26,14 +26,18 @@ import ( "errors" "fmt" "io" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/clusterprivilege" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/remoteclusterprivilege" ) // Response holds the response body struct for the package getbuiltinprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L26-L32 type Response struct { - Cluster []string `json:"cluster"` - Index []string `json:"index"` + Cluster []clusterprivilege.ClusterPrivilege `json:"cluster"` + Index []string `json:"index"` + RemoteCluster []remoteclusterprivilege.RemoteClusterPrivilege `json:"remote_cluster"` } // NewResponse returns a Response @@ -77,6 +81,11 @@ func (s *Response) UnmarshalJSON(data []byte) error { } } + case "remote_cluster": + if err := dec.Decode(&s.RemoteCluster); err != nil { + return fmt.Errorf("%s | %w", "RemoteCluster", err) + } + } } return nil diff --git a/typedapi/security/getprivileges/get_privileges.go b/typedapi/security/getprivileges/get_privileges.go index df8290b6de..05fcf0f58e 100644 --- a/typedapi/security/getprivileges/get_privileges.go +++ b/typedapi/security/getprivileges/get_privileges.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves application privileges. +// Get application privileges. package getprivileges import ( @@ -77,7 +77,7 @@ func NewGetPrivilegesFunc(tp elastictransport.Interface) NewGetPrivileges { } } -// Retrieves application privileges. +// Get application privileges. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html func New(tp elastictransport.Interface) *GetPrivileges { diff --git a/typedapi/security/getprivileges/response.go b/typedapi/security/getprivileges/response.go index 8429b310e0..34d4666929 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_privileges/SecurityGetPrivilegesResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_privileges/SecurityGetPrivilegesResponse.ts#L23-L26 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 f8bb3b83c6..9174082f4e 100644 --- a/typedapi/security/getrole/get_role.go +++ b/typedapi/security/getrole/get_role.go @@ -16,8 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// 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. @@ -76,6 +79,9 @@ func NewGetRoleFunc(tp elastictransport.Interface) NewGetRole { } } +// 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. diff --git a/typedapi/security/getrole/response.go b/typedapi/security/getrole/response.go index 38db853ad7..4ea15c72f8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrole // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_role/SecurityGetRoleResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_role/SecurityGetRoleResponse.ts#L23-L26 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 45816fb6c2..4fc887a011 100644 --- a/typedapi/security/getrolemapping/get_role_mapping.go +++ b/typedapi/security/getrolemapping/get_role_mapping.go @@ -16,9 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves role mappings. +// 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. package getrolemapping import ( @@ -74,7 +80,13 @@ func NewGetRoleMappingFunc(tp elastictransport.Interface) NewGetRoleMapping { } } -// Retrieves role mappings. +// Get role mappings. +// +// Role mappings define which roles are assigned to each user. +// The role mapping APIs are generally the preferred way to manage role mappings +// rather than using role mapping files. +// The get role mappings API cannot retrieve role mappings that are defined in +// role mapping files. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html func New(tp elastictransport.Interface) *GetRoleMapping { diff --git a/typedapi/security/getrolemapping/response.go b/typedapi/security/getrolemapping/response.go index c7bf97613a..30543e878f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getrolemapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_role_mapping/SecurityGetRoleMappingResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_role_mapping/SecurityGetRoleMappingResponse.ts#L23-L26 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 89b68adb8e..8808813203 100644 --- a/typedapi/security/getserviceaccounts/get_service_accounts.go +++ b/typedapi/security/getserviceaccounts/get_service_accounts.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// This API returns a list of service accounts that match the provided path -// parameter(s). +// Get service accounts. +// +// Get a list of service accounts that match the provided path parameters. package getserviceaccounts import ( @@ -78,8 +79,9 @@ func NewGetServiceAccountsFunc(tp elastictransport.Interface) NewGetServiceAccou } } -// This API returns a list of service accounts that match the provided path -// parameter(s). +// Get service accounts. +// +// Get a list of service accounts that match the provided path parameters. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html func New(tp elastictransport.Interface) *GetServiceAccounts { diff --git a/typedapi/security/getserviceaccounts/response.go b/typedapi/security/getserviceaccounts/response.go index 02ce3fe883..1248e3a05e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getserviceaccounts @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getserviceaccounts // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_service_accounts/GetServiceAccountsResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_service_accounts/GetServiceAccountsResponse.ts#L23-L26 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 d73ddaf739..975235758f 100644 --- a/typedapi/security/getservicecredentials/get_service_credentials.go +++ b/typedapi/security/getservicecredentials/get_service_credentials.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves information of all service credentials for a service account. +// Get service account credentials. package getservicecredentials import ( @@ -81,7 +81,7 @@ func NewGetServiceCredentialsFunc(tp elastictransport.Interface) NewGetServiceCr } } -// Retrieves information of all service credentials for a service account. +// Get service account credentials. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html func New(tp elastictransport.Interface) *GetServiceCredentials { diff --git a/typedapi/security/getservicecredentials/response.go b/typedapi/security/getservicecredentials/response.go index 2cd5119312..6bdb9a64ef 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getservicecredentials @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getservicecredentials // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_service_credentials/GetServiceCredentialsResponse.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_service_credentials/GetServiceCredentialsResponse.ts#L25-L33 type Response struct { Count int `json:"count"` // NodesCredentials Contains 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 ae3301a8fd..237b676aba 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieve settings for the security system indices package getsettings diff --git a/typedapi/security/gettoken/get_token.go b/typedapi/security/gettoken/get_token.go index 6620750132..30168eaedc 100644 --- a/typedapi/security/gettoken/get_token.go +++ b/typedapi/security/gettoken/get_token.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a bearer token for access without requiring basic authentication. +// Get a token. +// +// Create a bearer token for access without requiring basic authentication. package gettoken import ( @@ -74,7 +76,9 @@ func NewGetTokenFunc(tp elastictransport.Interface) NewGetToken { } } -// Creates a bearer token for access without requiring basic authentication. +// Get a token. +// +// Create a bearer token for access without requiring basic authentication. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html func New(tp elastictransport.Interface) *GetToken { diff --git a/typedapi/security/gettoken/request.go b/typedapi/security/gettoken/request.go index 73c317df71..1e73026505 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package gettoken @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package gettoken // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_token/GetUserAccessTokenRequest.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_token/GetUserAccessTokenRequest.ts#L25-L42 type Request struct { GrantType *accesstokengranttype.AccessTokenGrantType `json:"grant_type,omitempty"` KerberosTicket *string `json:"kerberos_ticket,omitempty"` diff --git a/typedapi/security/gettoken/response.go b/typedapi/security/gettoken/response.go index 94a37cafc0..240cfc1694 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package gettoken @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettoken // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_token/GetUserAccessTokenResponse.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f344c0addc..5f79a65953 100644 --- a/typedapi/security/getuser/get_user.go +++ b/typedapi/security/getuser/get_user.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves information about users in the native realm and built-in users. +// Get users. +// +// Get information about users in the native realm and built-in users. package getuser import ( @@ -74,7 +76,9 @@ func NewGetUserFunc(tp elastictransport.Interface) NewGetUser { } } -// Retrieves information about users in the native realm and built-in users. +// Get users. +// +// Get information about users in the native realm and built-in users. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html func New(tp elastictransport.Interface) *GetUser { diff --git a/typedapi/security/getuser/response.go b/typedapi/security/getuser/response.go index 2850dbf4f5..0eb4cf2dd0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getuser @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuser // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_user/SecurityGetUserResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_user/SecurityGetUserResponse.ts#L23-L26 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 c943cfadd9..160c625778 100644 --- a/typedapi/security/getuserprivileges/get_user_privileges.go +++ b/typedapi/security/getuserprivileges/get_user_privileges.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves security privileges for the logged in user. +// Get user privileges. package getuserprivileges import ( @@ -68,7 +68,7 @@ func NewGetUserPrivilegesFunc(tp elastictransport.Interface) NewGetUserPrivilege } } -// Retrieves security privileges for the logged in user. +// Get user privileges. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html func New(tp elastictransport.Interface) *GetUserPrivileges { diff --git a/typedapi/security/getuserprivileges/response.go b/typedapi/security/getuserprivileges/response.go index 2b36eb81db..fe2445af79 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getuserprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuserprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_user_privileges/SecurityGetUserPrivilegesResponse.ts#L27-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_user_privileges/SecurityGetUserPrivilegesResponse.ts#L26-L34 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 475c8d3971..470bddd8ce 100644 --- a/typedapi/security/getuserprofile/get_user_profile.go +++ b/typedapi/security/getuserprofile/get_user_profile.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves a user's profile using the unique profile ID. +// Get a user profile. +// +// Get a user's profile using the unique profile ID. package getuserprofile import ( @@ -76,7 +78,9 @@ func NewGetUserProfileFunc(tp elastictransport.Interface) NewGetUserProfile { } } -// Retrieves a user's profile using the unique profile ID. +// Get a user profile. +// +// Get a user's profile using the unique profile ID. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-profile.html func New(tp elastictransport.Interface) *GetUserProfile { diff --git a/typedapi/security/getuserprofile/response.go b/typedapi/security/getuserprofile/response.go index e5fb4380af..b1f97ebcda 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getuserprofile @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_user_profile/Response.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_user_profile/Response.ts#L23-L28 type Response struct { Errors *types.GetUserProfileErrors `json:"errors,omitempty"` Profiles []types.UserProfileWithMetadata `json:"profiles"` diff --git a/typedapi/security/grantapikey/grant_api_key.go b/typedapi/security/grantapikey/grant_api_key.go index b2e7177777..9c216290aa 100644 --- a/typedapi/security/grantapikey/grant_api_key.go +++ b/typedapi/security/grantapikey/grant_api_key.go @@ -16,11 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates an API key on behalf of another user. -// This API is similar to Create API keys, however it creates the API key for a -// user that is different than the user that runs the API. +// 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 (either an access token, or a // username and password) for the user on whose behalf the API key will be // created. @@ -96,9 +98,11 @@ func NewGrantApiKeyFunc(tp elastictransport.Interface) NewGrantApiKey { } } -// Creates an API key on behalf of another user. -// This API is similar to Create API keys, however it creates the API key for a -// user that is different than the user that runs the API. +// 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 (either an access token, or a // username and password) for the user on whose behalf the API key will be // created. diff --git a/typedapi/security/grantapikey/request.go b/typedapi/security/grantapikey/request.go index cb7fe2d3dc..2d271ffc0d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package grantapikey @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package grantapikey // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/grant_api_key/SecurityGrantApiKeyRequest.ts#L24-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/grant_api_key/SecurityGrantApiKeyRequest.ts#L24-L77 type Request struct { // AccessToken The user’s access token. diff --git a/typedapi/security/grantapikey/response.go b/typedapi/security/grantapikey/response.go index 8184fc2f2a..cab71fefa9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package grantapikey // Response holds the response body struct for the package grantapikey // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/grant_api_key/SecurityGrantApiKeyResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 304d944fba..6a1fd176fe 100644 --- a/typedapi/security/hasprivileges/has_privileges.go +++ b/typedapi/security/hasprivileges/has_privileges.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Check user privileges. -// Determines whether the specified user has a specified list of privileges. +// +// Determine whether the specified user has a specified list of privileges. package hasprivileges import ( @@ -82,7 +83,8 @@ func NewHasPrivilegesFunc(tp elastictransport.Interface) NewHasPrivileges { } // Check user privileges. -// Determines whether the specified user has a specified list of privileges. +// +// Determine whether the specified user has a specified list of privileges. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html func New(tp elastictransport.Interface) *HasPrivileges { diff --git a/typedapi/security/hasprivileges/request.go b/typedapi/security/hasprivileges/request.go index b31d4a4c7e..91d27d41d0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package hasprivileges @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package hasprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/has_privileges/SecurityHasPrivilegesRequest.ts#L25-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/has_privileges/SecurityHasPrivilegesRequest.ts#L25-L46 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 5f7431985f..4321e1cd35 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package hasprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package hasprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/has_privileges/SecurityHasPrivilegesResponse.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/has_privileges/SecurityHasPrivilegesResponse.ts#L24-L32 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 e118828877..834695a41a 100644 --- a/typedapi/security/hasprivilegesuserprofile/has_privileges_user_profile.go +++ b/typedapi/security/hasprivilegesuserprofile/has_privileges_user_profile.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Determines whether the users associated with the specified profile IDs have -// all the requested privileges. +// Check user profile privileges. +// +// Determine whether the users associated with the specified user profile IDs +// have all the requested privileges. package hasprivilegesuserprofile import ( @@ -74,8 +76,10 @@ func NewHasPrivilegesUserProfileFunc(tp elastictransport.Interface) NewHasPrivil } } -// Determines whether the users associated with the specified profile IDs have -// all the requested privileges. +// Check user profile privileges. +// +// Determine whether the users associated with the specified user profile IDs +// have all the requested privileges. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges-user-profile.html func New(tp elastictransport.Interface) *HasPrivilegesUserProfile { diff --git a/typedapi/security/hasprivilegesuserprofile/request.go b/typedapi/security/hasprivilegesuserprofile/request.go index a53bb10ac4..b88cf4e7b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package hasprivilegesuserprofile @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package hasprivilegesuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/has_privileges_user_profile/Request.ts#L24-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/has_privileges_user_profile/Request.ts#L24-L42 type Request struct { Privileges types.PrivilegesCheck `json:"privileges"` // Uids A list of profile IDs. The privileges are checked for associated users of the diff --git a/typedapi/security/hasprivilegesuserprofile/response.go b/typedapi/security/hasprivilegesuserprofile/response.go index dd7d7cfbed..d9aaa9b1c3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package hasprivilegesuserprofile @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package hasprivilegesuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/has_privileges_user_profile/Response.ts#L23-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ff74f660ff..1adf65d8b1 100644 --- a/typedapi/security/invalidateapikey/invalidate_api_key.go +++ b/typedapi/security/invalidateapikey/invalidate_api_key.go @@ -16,10 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Invalidate API keys. -// Invalidates one or more 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. // The `manage_api_key` privilege allows deleting any API keys. // The `manage_own_api_key` only allows deleting API keys that are owned by the // user. @@ -27,8 +32,8 @@ // 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, i.e. an API key invalidates -// itself, specify its ID in the `ids` field. +// - 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. package invalidateapikey import ( @@ -84,7 +89,12 @@ func NewInvalidateApiKeyFunc(tp elastictransport.Interface) NewInvalidateApiKey } // Invalidate API keys. -// Invalidates one or more 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. // The `manage_api_key` privilege allows deleting any API keys. // The `manage_own_api_key` only allows deleting API keys that are owned by the // user. @@ -92,8 +102,8 @@ func NewInvalidateApiKeyFunc(tp elastictransport.Interface) NewInvalidateApiKey // 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, i.e. an API key invalidates -// itself, specify its ID in the `ids` field. +// - Or, if the request is issued by an API key, that is to say an API key +// invalidates itself, specify its ID in the `ids` field. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html func New(tp elastictransport.Interface) *InvalidateApiKey { diff --git a/typedapi/security/invalidateapikey/request.go b/typedapi/security/invalidateapikey/request.go index 96a5f9bd5e..c8bac75307 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package invalidateapikey @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package invalidateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L69 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 2d66897b53..98ff24a2ae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package invalidateapikey @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package invalidateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/invalidate_api_key/SecurityInvalidateApiKeyResponse.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/invalidate_api_key/SecurityInvalidateApiKeyResponse.ts#L23-L30 type Response struct { ErrorCount int `json:"error_count"` ErrorDetails []types.ErrorCause `json:"error_details,omitempty"` diff --git a/typedapi/security/invalidatetoken/invalidate_token.go b/typedapi/security/invalidatetoken/invalidate_token.go index 54a5e8282a..1d2069ae32 100644 --- a/typedapi/security/invalidatetoken/invalidate_token.go +++ b/typedapi/security/invalidatetoken/invalidate_token.go @@ -16,9 +16,20 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Invalidates one or more access tokens or refresh tokens. +// 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. package invalidatetoken import ( @@ -73,7 +84,18 @@ func NewInvalidateTokenFunc(tp elastictransport.Interface) NewInvalidateToken { } } -// Invalidates one or more access tokens or refresh tokens. +// 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html func New(tp elastictransport.Interface) *InvalidateToken { diff --git a/typedapi/security/invalidatetoken/request.go b/typedapi/security/invalidatetoken/request.go index aaadebc1cf..27e5046337 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package invalidatetoken @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package invalidatetoken // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/invalidate_token/SecurityInvalidateTokenRequest.ts#L23-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/invalidate_token/SecurityInvalidateTokenRequest.ts#L23-L43 type Request struct { RealmName *string `json:"realm_name,omitempty"` RefreshToken *string `json:"refresh_token,omitempty"` diff --git a/typedapi/security/invalidatetoken/response.go b/typedapi/security/invalidatetoken/response.go index 62ade0c438..f63c5abe2b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package invalidatetoken @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package invalidatetoken // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/invalidate_token/SecurityInvalidateTokenResponse.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/invalidate_token/SecurityInvalidateTokenResponse.ts#L23-L30 type Response struct { ErrorCount int64 `json:"error_count"` ErrorDetails []types.ErrorCause `json:"error_details,omitempty"` diff --git a/typedapi/security/oidcauthenticate/oidc_authenticate.go b/typedapi/security/oidcauthenticate/oidc_authenticate.go index 0407620045..0e799b6364 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Exchanges an OpenID Connection authentication response message for an // Elasticsearch access token and refresh token pair diff --git a/typedapi/security/oidclogout/oidc_logout.go b/typedapi/security/oidclogout/oidc_logout.go index bddb857bb7..591790a1aa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Invalidates a refresh token and access token that was generated from the // OpenID Connect Authenticate API diff --git a/typedapi/security/oidcprepareauthentication/oidc_prepare_authentication.go b/typedapi/security/oidcprepareauthentication/oidc_prepare_authentication.go index 9c031bbbbc..4f86d3a6f5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Creates an OAuth 2.0 authentication request as a URL string package oidcprepareauthentication diff --git a/typedapi/security/putprivileges/put_privileges.go b/typedapi/security/putprivileges/put_privileges.go index d1a7453866..3db781c980 100644 --- a/typedapi/security/putprivileges/put_privileges.go +++ b/typedapi/security/putprivileges/put_privileges.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Adds or updates application privileges. +// Create or update application privileges. package putprivileges import ( @@ -74,7 +74,7 @@ func NewPutPrivilegesFunc(tp elastictransport.Interface) NewPutPrivileges { } } -// Adds or updates application privileges. +// Create or update application privileges. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html func New(tp elastictransport.Interface) *PutPrivileges { diff --git a/typedapi/security/putprivileges/request.go b/typedapi/security/putprivileges/request.go index f2eb765033..b2e60f60d4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putprivileges @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/put_privileges/SecurityPutPrivilegesRequest.ts#L25-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/put_privileges/SecurityPutPrivilegesRequest.ts#L25-L38 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 1e686c0188..676d582d37 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/put_privileges/SecurityPutPrivilegesResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/put_privileges/SecurityPutPrivilegesResponse.ts#L23-L26 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 041ec62049..1b911dc85a 100644 --- a/typedapi/security/putrole/put_role.go +++ b/typedapi/security/putrole/put_role.go @@ -16,12 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// The role management APIs are generally the preferred way to manage roles, -// rather than using file-based role management. +// 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. package putrole import ( @@ -86,10 +89,13 @@ func NewPutRoleFunc(tp elastictransport.Interface) NewPutRole { } } -// The role management APIs are generally the preferred way to manage roles, -// rather than using file-based role management. +// Create or update roles. +// +// The role management APIs are generally the preferred way to manage roles in +// the native realm, rather than using file-based role management. // The create or update roles API cannot update roles that are defined in roles // files. +// File-based role management is not available in Elastic Serverless. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html func New(tp elastictransport.Interface) *PutRole { @@ -431,6 +437,22 @@ func (r *PutRole) Metadata(metadata types.Metadata) *PutRole { return r } +// RemoteCluster A list of remote cluster permissions entries. +// API name: remote_cluster +func (r *PutRole) RemoteCluster(remoteclusters ...types.RemoteClusterPrivileges) *PutRole { + r.req.RemoteCluster = remoteclusters + + return r +} + +// RemoteIndices A list of remote indices permissions entries. +// API name: remote_indices +func (r *PutRole) RemoteIndices(remoteindices ...types.RemoteIndicesPrivileges) *PutRole { + r.req.RemoteIndices = remoteindices + + return r +} + // RunAs A list of users that the owners of this role can impersonate. *Note*: in // Serverless, the run-as feature is disabled. For API compatibility, you can // still specify an empty `run_as` field, but a non-empty list will be rejected. diff --git a/typedapi/security/putrole/request.go b/typedapi/security/putrole/request.go index e6ea674f09..9ce6bfb19e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putrole @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package putrole // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/put_role/SecurityPutRoleRequest.ts#L30-L84 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/put_role/SecurityPutRoleRequest.ts#L32-L102 type Request struct { // Applications A list of application privilege entries. @@ -53,6 +53,10 @@ type Request struct { // Metadata Optional metadata. Within the metadata object, keys that begin with an // underscore (`_`) are reserved for system use. Metadata types.Metadata `json:"metadata,omitempty"` + // RemoteCluster A list of remote cluster permissions entries. + RemoteCluster []types.RemoteClusterPrivileges `json:"remote_cluster,omitempty"` + // RemoteIndices A list of remote indices permissions entries. + RemoteIndices []types.RemoteIndicesPrivileges `json:"remote_indices,omitempty"` // RunAs A list of users that the owners of this role can impersonate. *Note*: in // Serverless, the run-as feature is disabled. For API compatibility, you can // still specify an empty `run_as` field, but a non-empty list will be rejected. @@ -142,6 +146,16 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Metadata", err) } + case "remote_cluster": + if err := dec.Decode(&s.RemoteCluster); err != nil { + return fmt.Errorf("%s | %w", "RemoteCluster", err) + } + + case "remote_indices": + if err := dec.Decode(&s.RemoteIndices); err != nil { + return fmt.Errorf("%s | %w", "RemoteIndices", err) + } + case "run_as": if err := dec.Decode(&s.RunAs); err != nil { return fmt.Errorf("%s | %w", "RunAs", err) diff --git a/typedapi/security/putrole/response.go b/typedapi/security/putrole/response.go index e0f04c7e65..4d376fd2c1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putrole // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/put_role/SecurityPutRoleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/put_role/SecurityPutRoleResponse.ts#L22-L24 type Response struct { Role types.CreatedStatus `json:"role"` } diff --git a/typedapi/security/putrolemapping/put_role_mapping.go b/typedapi/security/putrolemapping/put_role_mapping.go index 469d8a5f28..21ce6abf5e 100644 --- a/typedapi/security/putrolemapping/put_role_mapping.go +++ b/typedapi/security/putrolemapping/put_role_mapping.go @@ -16,9 +16,19 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates and updates role mappings. +// 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. +// +// 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. package putrolemapping import ( @@ -82,7 +92,17 @@ func NewPutRoleMappingFunc(tp elastictransport.Interface) NewPutRoleMapping { } } -// Creates and updates role mappings. +// 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. +// +// 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html func New(tp elastictransport.Interface) *PutRoleMapping { diff --git a/typedapi/security/putrolemapping/request.go b/typedapi/security/putrolemapping/request.go index 6f3e21482e..f3724386e6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putrolemapping @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/put_role_mapping/SecurityPutRoleMappingRequest.ts#L25-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/put_role_mapping/SecurityPutRoleMappingRequest.ts#L25-L56 type Request struct { Enabled *bool `json:"enabled,omitempty"` Metadata types.Metadata `json:"metadata,omitempty"` diff --git a/typedapi/security/putrolemapping/response.go b/typedapi/security/putrolemapping/response.go index 247ffaaa7c..6ecf8742ca 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putrolemapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/put_role_mapping/SecurityPutRoleMappingResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 71b70590a9..fa2fecc127 100644 --- a/typedapi/security/putuser/put_user.go +++ b/typedapi/security/putuser/put_user.go @@ -16,10 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Adds and updates users in the native realm. These users are commonly referred -// to as native users. +// Create or update users. +// +// 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. package putuser import ( @@ -83,8 +87,12 @@ func NewPutUserFunc(tp elastictransport.Interface) NewPutUser { } } -// Adds and updates users in the native realm. These users are commonly referred -// to as native users. +// Create or update users. +// +// A password is required for adding a new user but is optional when updating an +// existing user. +// To change a user’s password without updating any other fields, use the change +// password API. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html func New(tp elastictransport.Interface) *PutUser { diff --git a/typedapi/security/putuser/request.go b/typedapi/security/putuser/request.go index 9b7f4e721f..f8c7fc3430 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putuser @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putuser // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/put_user/SecurityPutUserRequest.ts#L23-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/put_user/SecurityPutUserRequest.ts#L23-L48 type Request struct { Email *string `json:"email,omitempty"` Enabled *bool `json:"enabled,omitempty"` diff --git a/typedapi/security/putuser/response.go b/typedapi/security/putuser/response.go index fa3d8ef5a8..fe02c7d686 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putuser // Response holds the response body struct for the package putuser // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/put_user/SecurityPutUserResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/put_user/SecurityPutUserResponse.ts#L20-L22 type Response struct { Created bool `json:"created"` } diff --git a/typedapi/security/queryapikeys/query_api_keys.go b/typedapi/security/queryapikeys/query_api_keys.go index ccc082e5b2..aa4bb35c2a 100644 --- a/typedapi/security/queryapikeys/query_api_keys.go +++ b/typedapi/security/queryapikeys/query_api_keys.go @@ -16,11 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Query API keys. -// Retrieves a paginated list of API keys and their information. You can -// optionally filter the results with a query. +// 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. package queryapikeys import ( @@ -75,9 +76,10 @@ func NewQueryApiKeysFunc(tp elastictransport.Interface) NewQueryApiKeys { } } -// Query API keys. -// Retrieves a paginated list of API keys and their information. You can -// optionally filter the results with a query. +// 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html func New(tp elastictransport.Interface) *QueryApiKeys { diff --git a/typedapi/security/queryapikeys/request.go b/typedapi/security/queryapikeys/request.go index dcdfd79bb6..843120ef0f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package queryapikeys @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package queryapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_api_keys/QueryApiKeysRequest.ts#L26-L100 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/query_api_keys/QueryApiKeysRequest.ts#L26-L101 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 8645b88bc4..87011e2942 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package queryapikeys @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package queryapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_api_keys/QueryApiKeysResponse.ts#L26-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 89ca2dd1b9..78508e3b0b 100644 --- a/typedapi/security/queryrole/query_role.go +++ b/typedapi/security/queryrole/query_role.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves roles in a paginated manner. You can optionally filter the results -// with a query. +// Find roles with a query. +// +// Get roles in a paginated manner. You can optionally filter the results with a +// query. package queryrole import ( @@ -74,8 +76,10 @@ func NewQueryRoleFunc(tp elastictransport.Interface) NewQueryRole { } } -// Retrieves roles in a paginated manner. You can optionally filter the results -// with a query. +// Find roles with a query. +// +// Get roles in a paginated manner. You can optionally filter the results with a +// query. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-role.html func New(tp elastictransport.Interface) *QueryRole { diff --git a/typedapi/security/queryrole/request.go b/typedapi/security/queryrole/request.go index b37a22d9ef..9940ef080a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package queryrole @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package queryrole // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_role/QueryRolesRequest.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/query_role/QueryRolesRequest.ts#L25-L69 type Request struct { // From Starting document offset. diff --git a/typedapi/security/queryrole/response.go b/typedapi/security/queryrole/response.go index d4f7bae0e1..cccbf1bc27 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package queryrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package queryrole // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_role/QueryRolesResponse.ts#L23-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/query_role/QueryRolesResponse.ts#L23-L38 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 7eef72b985..55920cfca9 100644 --- a/typedapi/security/queryuser/query_user.go +++ b/typedapi/security/queryuser/query_user.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves information for Users in a paginated manner. You can optionally -// filter the results with a query. +// Find users with a query. +// +// Get information for users in a paginated manner. +// You can optionally filter the results with a query. package queryuser import ( @@ -74,8 +76,10 @@ func NewQueryUserFunc(tp elastictransport.Interface) NewQueryUser { } } -// Retrieves information for Users in a paginated manner. You can optionally -// filter the results with a query. +// Find users with a query. +// +// Get information for users in a paginated manner. +// You can optionally filter the results with a query. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-user.html func New(tp elastictransport.Interface) *QueryUser { diff --git a/typedapi/security/queryuser/request.go b/typedapi/security/queryuser/request.go index ccf64681a0..b940d6852c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package queryuser @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package queryuser // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_user/SecurityQueryUserRequest.ts#L25-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/query_user/SecurityQueryUserRequest.ts#L25-L75 type Request struct { // From Starting document offset. diff --git a/typedapi/security/queryuser/response.go b/typedapi/security/queryuser/response.go index 3e63a0d7f3..b7ed922c59 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package queryuser @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package queryuser // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_user/SecurityQueryUserResponse.ts#L23-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 53af7b2dc7..a1a3512242 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package samlauthenticate @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package samlauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/saml_authenticate/Request.ts#L23-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/saml_authenticate/Request.ts#L23-L40 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 2b09b25224..7fb79f5597 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package samlauthenticate // Response holds the response body struct for the package samlauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/saml_authenticate/Response.ts#L22-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/saml_authenticate/Response.ts#L22-L30 type Response struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` diff --git a/typedapi/security/samlauthenticate/saml_authenticate.go b/typedapi/security/samlauthenticate/saml_authenticate.go index 39cd77eed9..c86c447339 100644 --- a/typedapi/security/samlauthenticate/saml_authenticate.go +++ b/typedapi/security/samlauthenticate/saml_authenticate.go @@ -16,9 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Submits a SAML Response message to Elasticsearch for consumption. +// Authenticate SAML. +// +// Submits a SAML response message to Elasticsearch for consumption. package samlauthenticate import ( @@ -73,7 +75,9 @@ func NewSamlAuthenticateFunc(tp elastictransport.Interface) NewSamlAuthenticate } } -// Submits a SAML Response message to Elasticsearch for consumption. +// Authenticate SAML. +// +// Submits a SAML response message to Elasticsearch for consumption. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html func New(tp elastictransport.Interface) *SamlAuthenticate { diff --git a/typedapi/security/samlcompletelogout/request.go b/typedapi/security/samlcompletelogout/request.go index 0bcae22993..0fbef11fce 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package samlcompletelogout @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package samlcompletelogout // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/saml_complete_logout/Request.ts#L23-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/saml_complete_logout/Request.ts#L23-L42 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 6da7d0fcdb..43687c6628 100644 --- a/typedapi/security/samlcompletelogout/saml_complete_logout.go +++ b/typedapi/security/samlcompletelogout/saml_complete_logout.go @@ -16,8 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Logout of SAML completely. +// // Verifies the logout response sent from the SAML IdP. package samlcompletelogout @@ -72,6 +74,8 @@ func NewSamlCompleteLogoutFunc(tp elastictransport.Interface) NewSamlCompleteLog } } +// Logout of SAML completely. +// // Verifies the logout response sent from the SAML IdP. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html diff --git a/typedapi/security/samlinvalidate/request.go b/typedapi/security/samlinvalidate/request.go index 55a82945f5..1efdf1c76e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package samlinvalidate @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package samlinvalidate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/saml_invalidate/Request.ts#L22-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/saml_invalidate/Request.ts#L22-L45 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 97e7bad1ce..e297bbcf8e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package samlinvalidate // Response holds the response body struct for the package samlinvalidate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/saml_invalidate/Response.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/saml_invalidate/Response.ts#L22-L28 type Response struct { Invalidated int `json:"invalidated"` Realm string `json:"realm"` diff --git a/typedapi/security/samlinvalidate/saml_invalidate.go b/typedapi/security/samlinvalidate/saml_invalidate.go index 85898a7b6f..86933c58ff 100644 --- a/typedapi/security/samlinvalidate/saml_invalidate.go +++ b/typedapi/security/samlinvalidate/saml_invalidate.go @@ -16,8 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Invalidate SAML. +// // Submits a SAML LogoutRequest message to Elasticsearch for consumption. package samlinvalidate @@ -73,6 +75,8 @@ func NewSamlInvalidateFunc(tp elastictransport.Interface) NewSamlInvalidate { } } +// Invalidate SAML. +// // Submits a SAML LogoutRequest message to Elasticsearch for consumption. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html diff --git a/typedapi/security/samllogout/request.go b/typedapi/security/samllogout/request.go index a2ee05a747..ad5cb236b1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package samllogout @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package samllogout // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/saml_logout/Request.ts#L22-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/saml_logout/Request.ts#L22-L43 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 62339ed14d..47be17b501 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package samllogout // Response holds the response body struct for the package samllogout // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/saml_logout/Response.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/saml_logout/Response.ts#L20-L24 type Response struct { Redirect string `json:"redirect"` } diff --git a/typedapi/security/samllogout/saml_logout.go b/typedapi/security/samllogout/saml_logout.go index 7aff74a67b..e912214c97 100644 --- a/typedapi/security/samllogout/saml_logout.go +++ b/typedapi/security/samllogout/saml_logout.go @@ -16,8 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Logout of SAML. +// // Submits a request to invalidate an access token and refresh token. package samllogout @@ -73,6 +75,8 @@ func NewSamlLogoutFunc(tp elastictransport.Interface) NewSamlLogout { } } +// Logout of SAML. +// // Submits a request to invalidate an access token and refresh token. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html diff --git a/typedapi/security/samlprepareauthentication/request.go b/typedapi/security/samlprepareauthentication/request.go index 19f1064c8d..afd1399748 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package samlprepareauthentication @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package samlprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/saml_prepare_authentication/Request.ts#L22-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/saml_prepare_authentication/Request.ts#L22-L48 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 f395073651..cccb02e1a0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package samlprepareauthentication // Response holds the response body struct for the package samlprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/saml_prepare_authentication/Response.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/saml_prepare_authentication/Response.ts#L22-L28 type Response struct { Id string `json:"id"` Realm string `json:"realm"` diff --git a/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go b/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go index eef728a834..33968d72e7 100644 --- a/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go +++ b/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates a SAML authentication request () as a URL string, based -// on the configuration of the respective SAML realm in Elasticsearch. +// Prepare SAML authentication. +// +// Creates a SAML authentication request (``) as a URL string, +// based on the configuration of the respective SAML realm in Elasticsearch. package samlprepareauthentication import ( @@ -74,8 +76,10 @@ func NewSamlPrepareAuthenticationFunc(tp elastictransport.Interface) NewSamlPrep } } -// Creates a SAML authentication request () as a URL string, based -// on the configuration of the respective SAML realm in Elasticsearch. +// Prepare SAML authentication. +// +// Creates a SAML authentication request (``) as a URL string, +// based on the configuration of the respective SAML realm in Elasticsearch. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html func New(tp elastictransport.Interface) *SamlPrepareAuthentication { diff --git a/typedapi/security/samlserviceprovidermetadata/response.go b/typedapi/security/samlserviceprovidermetadata/response.go index 0600aedb10..ddc79277de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package samlserviceprovidermetadata // Response holds the response body struct for the package samlserviceprovidermetadata // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/saml_service_provider_metadata/Response.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/saml_service_provider_metadata/Response.ts#L20-L24 type Response struct { Metadata string `json:"metadata"` } diff --git a/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go b/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go index d8dc733dd5..70aebe12ee 100644 --- a/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go +++ b/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go @@ -16,8 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Create SAML service provider metadata. +// // Generate SAML metadata for a SAML 2.0 Service Provider. package samlserviceprovidermetadata @@ -76,6 +78,8 @@ func NewSamlServiceProviderMetadataFunc(tp elastictransport.Interface) NewSamlSe } } +// Create SAML service provider metadata. +// // Generate SAML metadata for a SAML 2.0 Service Provider. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html diff --git a/typedapi/security/suggestuserprofiles/request.go b/typedapi/security/suggestuserprofiles/request.go index bddf83af98..facfa4637a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package suggestuserprofiles @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package suggestuserprofiles // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/suggest_user_profiles/Request.ts#L24-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/suggest_user_profiles/Request.ts#L24-L68 type Request struct { // Data List of filters for the `data` field of the profile document. diff --git a/typedapi/security/suggestuserprofiles/response.go b/typedapi/security/suggestuserprofiles/response.go index e16a377acc..2d81aa3507 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package suggestuserprofiles @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package suggestuserprofiles // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/suggest_user_profiles/Response.ts#L29-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/suggest_user_profiles/Response.ts#L29-L35 type Response struct { Profiles []types.UserProfile `json:"profiles"` Took int64 `json:"took"` diff --git a/typedapi/security/suggestuserprofiles/suggest_user_profiles.go b/typedapi/security/suggestuserprofiles/suggest_user_profiles.go index ad2c4ed1d1..c11ef2bc45 100644 --- a/typedapi/security/suggestuserprofiles/suggest_user_profiles.go +++ b/typedapi/security/suggestuserprofiles/suggest_user_profiles.go @@ -16,8 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 +// Suggest a user profile. +// // Get suggestions for user profiles that match specified search criteria. package suggestuserprofiles @@ -73,6 +75,8 @@ func NewSuggestUserProfilesFunc(tp elastictransport.Interface) NewSuggestUserPro } } +// Suggest a user profile. +// // Get suggestions for user profiles that match specified search criteria. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-suggest-user-profile.html diff --git a/typedapi/security/updateapikey/request.go b/typedapi/security/updateapikey/request.go index cf08a5e048..a9acda58a4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateapikey @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package updateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/update_api_key/Request.ts#L26-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/update_api_key/Request.ts#L26-L67 type Request struct { // Expiration Expiration time for the API key. diff --git a/typedapi/security/updateapikey/response.go b/typedapi/security/updateapikey/response.go index f9354ee39c..28343af467 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateapikey // Response holds the response body struct for the package updateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/update_api_key/Response.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 74a15a2b48..db1a2a077c 100644 --- a/typedapi/security/updateapikey/update_api_key.go +++ b/typedapi/security/updateapikey/update_api_key.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Update an API key. +// // Updates attributes of an existing API key. // Users can only update API keys that they created or that were granted to // them. @@ -106,6 +107,7 @@ func NewUpdateApiKeyFunc(tp elastictransport.Interface) NewUpdateApiKey { } // Update an API key. +// // Updates attributes of an existing API key. // Users can only update API keys that they created or that were granted to // them. diff --git a/typedapi/security/updatecrossclusterapikey/request.go b/typedapi/security/updatecrossclusterapikey/request.go new file mode 100644 index 0000000000..3ec719e024 --- /dev/null +++ b/typedapi/security/updatecrossclusterapikey/request.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package updatecrossclusterapikey + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// Request holds the request body struct for the package updatecrossclusterapikey +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyRequest.ts#L25-L61 +type Request struct { + + // Access The access to be granted to this API key. + // The access is composed of permissions for cross cluster search and cross + // cluster replication. + // At least one of them must be specified. + // When specified, the new access assignment fully replaces the previously + // assigned access. + Access types.Access `json:"access"` + // Expiration Expiration time for the API key. + // By default, API keys never expire. This property can be omitted to leave the + // value unchanged. + Expiration types.Duration `json:"expiration,omitempty"` + // Metadata Arbitrary metadata that you want to associate with the API key. + // It supports nested data structure. + // Within the metadata object, keys beginning with `_` are reserved for system + // usage. + // When specified, this information fully replaces metadata previously + // associated with the API key. + Metadata types.Metadata `json:"metadata,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 Updatecrossclusterapikey request: %w", err) + } + + return &req, nil +} + +func (s *Request) 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": + if err := dec.Decode(&s.Access); err != nil { + return fmt.Errorf("%s | %w", "Access", err) + } + + case "expiration": + if err := dec.Decode(&s.Expiration); err != nil { + return fmt.Errorf("%s | %w", "Expiration", err) + } + + case "metadata": + if err := dec.Decode(&s.Metadata); err != nil { + return fmt.Errorf("%s | %w", "Metadata", err) + } + + } + } + return nil +} diff --git a/typedapi/security/updatecrossclusterapikey/response.go b/typedapi/security/updatecrossclusterapikey/response.go new file mode 100644 index 0000000000..8f3926f86f --- /dev/null +++ b/typedapi/security/updatecrossclusterapikey/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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package updatecrossclusterapikey + +// Response holds the response body struct for the package updatecrossclusterapikey +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyResponse.ts#L20-L28 +type Response struct { + + // Updated If `true`, the API key was updated. + // If `false`, the API key didn’t change because no change was detected. + Updated bool `json:"updated"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/security/updatecrossclusterapikey/update_cross_cluster_api_key.go b/typedapi/security/updatecrossclusterapikey/update_cross_cluster_api_key.go new file mode 100644 index 0000000000..58fc3e7e9c --- /dev/null +++ b/typedapi/security/updatecrossclusterapikey/update_cross_cluster_api_key.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// 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. +package updatecrossclusterapikey + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +const ( + idMask = 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 UpdateCrossClusterApiKey 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 + + id string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewUpdateCrossClusterApiKey type alias for index. +type NewUpdateCrossClusterApiKey func(id string) *UpdateCrossClusterApiKey + +// NewUpdateCrossClusterApiKeyFunc returns a new instance of UpdateCrossClusterApiKey with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewUpdateCrossClusterApiKeyFunc(tp elastictransport.Interface) NewUpdateCrossClusterApiKey { + return func(id string) *UpdateCrossClusterApiKey { + n := New(tp) + + n._id(id) + + return n + } +} + +// 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. +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html +func New(tp elastictransport.Interface) *UpdateCrossClusterApiKey { + r := &UpdateCrossClusterApiKey{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + + req: NewRequest(), + } + + 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 *UpdateCrossClusterApiKey) Raw(raw io.Reader) *UpdateCrossClusterApiKey { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *UpdateCrossClusterApiKey) Request(req *Request) *UpdateCrossClusterApiKey { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *UpdateCrossClusterApiKey) 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 UpdateCrossClusterApiKey: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == idMask: + path.WriteString("/") + path.WriteString("_security") + path.WriteString("/") + path.WriteString("cross_cluster") + path.WriteString("/") + path.WriteString("api_key") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", r.id) + } + path.WriteString(r.id) + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=8") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r UpdateCrossClusterApiKey) 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, "security.update_cross_cluster_api_key") + 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, "security.update_cross_cluster_api_key") + if reader := instrument.RecordRequestBody(ctx, "security.update_cross_cluster_api_key", 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", "security.update_cross_cluster_api_key") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the UpdateCrossClusterApiKey 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 updatecrossclusterapikey.Response +func (r UpdateCrossClusterApiKey) 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, "security.update_cross_cluster_api_key") + 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 UpdateCrossClusterApiKey headers map. +func (r *UpdateCrossClusterApiKey) Header(key, value string) *UpdateCrossClusterApiKey { + r.headers.Set(key, value) + + return r +} + +// Id The ID of the cross-cluster API key to update. +// API Name: id +func (r *UpdateCrossClusterApiKey) _id(id string) *UpdateCrossClusterApiKey { + r.paramSet |= idMask + r.id = id + + 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 *UpdateCrossClusterApiKey) ErrorTrace(errortrace bool) *UpdateCrossClusterApiKey { + 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 *UpdateCrossClusterApiKey) FilterPath(filterpaths ...string) *UpdateCrossClusterApiKey { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"eixsts_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *UpdateCrossClusterApiKey) Human(human bool) *UpdateCrossClusterApiKey { + 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 *UpdateCrossClusterApiKey) Pretty(pretty bool) *UpdateCrossClusterApiKey { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// Access The access to be granted to this API key. +// The access is composed of permissions for cross cluster search and cross +// cluster replication. +// At least one of them must be specified. +// When specified, the new access assignment fully replaces the previously +// assigned access. +// API name: access +func (r *UpdateCrossClusterApiKey) Access(access *types.Access) *UpdateCrossClusterApiKey { + + r.req.Access = *access + + return r +} + +// Expiration Expiration time for the API key. +// By default, API keys never expire. This property can be omitted to leave the +// value unchanged. +// API name: expiration +func (r *UpdateCrossClusterApiKey) Expiration(duration types.Duration) *UpdateCrossClusterApiKey { + r.req.Expiration = duration + + return r +} + +// Metadata Arbitrary metadata that you want to associate with the API key. +// It supports nested data structure. +// Within the metadata object, keys beginning with `_` are reserved for system +// usage. +// When specified, this information fully replaces metadata previously +// associated with the API key. +// API name: metadata +func (r *UpdateCrossClusterApiKey) Metadata(metadata types.Metadata) *UpdateCrossClusterApiKey { + r.req.Metadata = metadata + + return r +} diff --git a/typedapi/security/updatesettings/update_settings.go b/typedapi/security/updatesettings/update_settings.go index bae3f53a10..c33ceb9832 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Update settings for the security system index package updatesettings diff --git a/typedapi/security/updateuserprofiledata/request.go b/typedapi/security/updateuserprofiledata/request.go index 3e01a4b0a0..1c281ddd6e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateuserprofiledata @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updateuserprofiledata // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/update_user_profile_data/Request.ts#L27-L70 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/update_user_profile_data/Request.ts#L27-L72 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 1b356772cb..066e9e4a42 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updateuserprofiledata // Response holds the response body struct for the package updateuserprofiledata // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/update_user_profile_data/Response.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/update_user_profile_data/Response.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/security/updateuserprofiledata/update_user_profile_data.go b/typedapi/security/updateuserprofiledata/update_user_profile_data.go index 91377a9fed..99ff9679df 100644 --- a/typedapi/security/updateuserprofiledata/update_user_profile_data.go +++ b/typedapi/security/updateuserprofiledata/update_user_profile_data.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Updates specific data for the user profile that's associated with the -// specified unique ID. +// Update user profile data. +// +// Update specific data for the user profile that is associated with a unique +// ID. package updateuserprofiledata import ( @@ -83,8 +85,10 @@ func NewUpdateUserProfileDataFunc(tp elastictransport.Interface) NewUpdateUserPr } } -// Updates specific data for the user profile that's associated with the -// specified unique ID. +// Update user profile data. +// +// Update specific data for the user profile that is associated with a unique +// ID. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-user-profile-data.html func New(tp elastictransport.Interface) *UpdateUserProfileData { diff --git a/typedapi/shutdown/deletenode/delete_node.go b/typedapi/shutdown/deletenode/delete_node.go index 721154c3ec..0acef79daa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Removes a node from the shutdown list. Designed for indirect use by ECE/ESS // and ECK. Direct use is not supported. diff --git a/typedapi/shutdown/deletenode/response.go b/typedapi/shutdown/deletenode/response.go index 706508f653..2eee4b1a21 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletenode // Response holds the response body struct for the package deletenode // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/shutdown/delete_node/ShutdownDeleteNodeResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/shutdown/delete_node/ShutdownDeleteNodeResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/shutdown/getnode/get_node.go b/typedapi/shutdown/getnode/get_node.go index 34be55ec4c..73cc533364 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieve status of a node or nodes that are currently marked as shutting // down. Designed for indirect use by ECE/ESS and ECK. Direct use is not diff --git a/typedapi/shutdown/getnode/response.go b/typedapi/shutdown/getnode/response.go index 166dff383a..775037e2d2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getnode @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getnode // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 efffd07859..3b26f68e69 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. // Direct use is not supported. diff --git a/typedapi/shutdown/putnode/request.go b/typedapi/shutdown/putnode/request.go index e6c364043c..e3004f52f7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putnode @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putnode // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/shutdown/put_node/ShutdownPutNodeRequest.ts#L25-L76 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/shutdown/put_node/ShutdownPutNodeRequest.ts#L25-L76 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 e4b376594c..8e5aca5419 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putnode // Response holds the response body struct for the package putnode // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/shutdown/put_node/ShutdownPutNodeResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/shutdown/put_node/ShutdownPutNodeResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/slm/deletelifecycle/delete_lifecycle.go b/typedapi/slm/deletelifecycle/delete_lifecycle.go index 4305bf2d0e..e5b9c8168f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Deletes an existing snapshot lifecycle policy. package deletelifecycle diff --git a/typedapi/slm/deletelifecycle/response.go b/typedapi/slm/deletelifecycle/response.go index 8502669388..9f96265d3a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletelifecycle // Response holds the response body struct for the package deletelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/delete_lifecycle/DeleteSnapshotLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/delete_lifecycle/DeleteSnapshotLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/slm/executelifecycle/execute_lifecycle.go b/typedapi/slm/executelifecycle/execute_lifecycle.go index a0f8adf5ed..25501e48a6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Immediately creates a snapshot according to the lifecycle policy, without // waiting for the scheduled time. diff --git a/typedapi/slm/executelifecycle/response.go b/typedapi/slm/executelifecycle/response.go index 288214a10d..ee8610a28c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package executelifecycle // Response holds the response body struct for the package executelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/execute_lifecycle/ExecuteSnapshotLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 43c4c2c983..814c3642ec 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Deletes any snapshots that are expired according to the policy's retention // rules. diff --git a/typedapi/slm/executeretention/response.go b/typedapi/slm/executeretention/response.go index 7fe8deb5e6..a325df97f3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package executeretention // Response holds the response body struct for the package executeretention // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/execute_retention/ExecuteRetentionResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/execute_retention/ExecuteRetentionResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/slm/getlifecycle/get_lifecycle.go b/typedapi/slm/getlifecycle/get_lifecycle.go index 759f78916f..9308c09df5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieves one or more snapshot lifecycle policy definitions and information // about the latest snapshot attempts. diff --git a/typedapi/slm/getlifecycle/response.go b/typedapi/slm/getlifecycle/response.go index 3a49de23b4..638cdb94ed 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getlifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/get_lifecycle/GetSnapshotLifecycleResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 34b145238d..7442c98628 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns global and policy-level statistics about actions taken by snapshot // lifecycle management. diff --git a/typedapi/slm/getstats/response.go b/typedapi/slm/getstats/response.go index f8819c7bb3..b7529bf448 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getstats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/get_stats/GetSnapshotLifecycleStatsResponse.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/get_stats/GetSnapshotLifecycleStatsResponse.ts#L23-L36 type Response struct { PolicyStats []string `json:"policy_stats"` RetentionDeletionTime types.Duration `json:"retention_deletion_time"` diff --git a/typedapi/slm/getstatus/get_status.go b/typedapi/slm/getstatus/get_status.go index ceed906597..d970b61f84 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieves the status of snapshot lifecycle management (SLM). package getstatus diff --git a/typedapi/slm/getstatus/response.go b/typedapi/slm/getstatus/response.go index fd823cf65b..8166116762 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getstatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/get_status/GetSnapshotLifecycleManagementStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ec3fca38ed..04028ff893 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Creates or updates a snapshot lifecycle policy. package putlifecycle diff --git a/typedapi/slm/putlifecycle/request.go b/typedapi/slm/putlifecycle/request.go index e138ac4597..3cdfcea475 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putlifecycle @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/put_lifecycle/PutSnapshotLifecycleRequest.ts#L26-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/put_lifecycle/PutSnapshotLifecycleRequest.ts#L26-L72 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 195f5a4c44..f6f363f5f0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putlifecycle // Response holds the response body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/put_lifecycle/PutSnapshotLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/put_lifecycle/PutSnapshotLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/slm/start/response.go b/typedapi/slm/start/response.go index 2fa2885785..78a44699ea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/start/StartSnapshotLifecycleManagementResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/start/StartSnapshotLifecycleManagementResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/slm/start/start.go b/typedapi/slm/start/start.go index 39c59fc8d7..dcea66e03b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Turns on snapshot lifecycle management (SLM). package start diff --git a/typedapi/slm/stop/response.go b/typedapi/slm/stop/response.go index a09a3bf19b..a233d0456b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/stop/StopSnapshotLifecycleManagementResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/stop/StopSnapshotLifecycleManagementResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/slm/stop/stop.go b/typedapi/slm/stop/stop.go index a691bf7346..47ea92d2bc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Turns off snapshot lifecycle management (SLM). package stop diff --git a/typedapi/snapshot/cleanuprepository/cleanup_repository.go b/typedapi/snapshot/cleanuprepository/cleanup_repository.go index ed22a57246..da5bd97f5c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Triggers the review of a snapshot repository’s contents and deletes any stale // data not referenced by existing snapshots. diff --git a/typedapi/snapshot/cleanuprepository/response.go b/typedapi/snapshot/cleanuprepository/response.go index 0dfdc9d615..b3996eb7a2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package cleanuprepository @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package cleanuprepository // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 515302e6e6..4111846e78 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Clones indices from one snapshot into another snapshot in the same // repository. diff --git a/typedapi/snapshot/clone/request.go b/typedapi/snapshot/clone/request.go index 12d9d4f650..c1f18271f9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clone @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/clone/SnapshotCloneRequest.ts#L24-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/clone/SnapshotCloneRequest.ts#L24-L42 type Request struct { Indices string `json:"indices"` } diff --git a/typedapi/snapshot/clone/response.go b/typedapi/snapshot/clone/response.go index 3d59e3854f..22fec901ee 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clone // Response holds the response body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/clone/SnapshotCloneResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/clone/SnapshotCloneResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/snapshot/create/create.go b/typedapi/snapshot/create/create.go index 2e9d230e6e..9086282b43 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Creates a snapshot in a repository. package create diff --git a/typedapi/snapshot/create/request.go b/typedapi/snapshot/create/request.go index f797511a73..b1afd578c1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package create @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/create/SnapshotCreateRequest.ts#L24-L81 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/create/SnapshotCreateRequest.ts#L24-L81 type Request struct { // FeatureStates Feature states to include in the snapshot. Each feature state includes one or diff --git a/typedapi/snapshot/create/response.go b/typedapi/snapshot/create/response.go index e7244f02fe..757eae4bcf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package create @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/create/SnapshotCreateResponse.ts#L22-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 89ea223761..a85a1a273a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Creates a repository. package createrepository diff --git a/typedapi/snapshot/createrepository/request.go b/typedapi/snapshot/createrepository/request.go index e52452a64f..c07979aea9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package createrepository @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package createrepository // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/create_repository/SnapshotCreateRepositoryRequest.ts#L25-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/create_repository/SnapshotCreateRepositoryRequest.ts#L25-L42 type Request = types.Repository diff --git a/typedapi/snapshot/createrepository/response.go b/typedapi/snapshot/createrepository/response.go index 682e779f32..c9e4229e7c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package createrepository // Response holds the response body struct for the package createrepository // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/create_repository/SnapshotCreateRepositoryResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/create_repository/SnapshotCreateRepositoryResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/snapshot/delete/delete.go b/typedapi/snapshot/delete/delete.go index 769599b17e..7ccfbe2988 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Deletes one or more snapshots. package delete diff --git a/typedapi/snapshot/delete/response.go b/typedapi/snapshot/delete/response.go index 5da26750a3..05dc309e02 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/delete/SnapshotDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/delete/SnapshotDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/snapshot/deleterepository/delete_repository.go b/typedapi/snapshot/deleterepository/delete_repository.go index a03b8ce8a8..13c21cacd3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Deletes a repository. package deleterepository diff --git a/typedapi/snapshot/deleterepository/response.go b/typedapi/snapshot/deleterepository/response.go index a5b43d306d..79fbddbbe2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleterepository // Response holds the response body struct for the package deleterepository // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/delete_repository/SnapshotDeleteRepositoryResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/delete_repository/SnapshotDeleteRepositoryResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/snapshot/get/get.go b/typedapi/snapshot/get/get.go index 6f4b933f07..e25bc8debc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns information about a snapshot. package get diff --git a/typedapi/snapshot/get/response.go b/typedapi/snapshot/get/response.go index 37128a2d3b..8626c6a8d0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/get/SnapshotGetResponse.ts#L25-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/get/SnapshotGetResponse.ts#L25-L42 type Response struct { // Remaining The number of remaining snapshots that were not returned due to size limits diff --git a/typedapi/snapshot/getrepository/get_repository.go b/typedapi/snapshot/getrepository/get_repository.go index ea3ff56389..97e23cf724 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns information about a repository. package getrepository diff --git a/typedapi/snapshot/getrepository/response.go b/typedapi/snapshot/getrepository/response.go index 4b13650385..e373a7281b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getrepository @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package getrepository // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/get_repository/SnapshotGetRepositoryResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/get_repository/SnapshotGetRepositoryResponse.ts#L23-L25 type Response map[string]types.Repository diff --git a/typedapi/snapshot/repositoryverifyintegrity/repository_verify_integrity.go b/typedapi/snapshot/repositoryverifyintegrity/repository_verify_integrity.go new file mode 100644 index 0000000000..f517ca8fc9 --- /dev/null +++ b/typedapi/snapshot/repositoryverifyintegrity/repository_verify_integrity.go @@ -0,0 +1,408 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Verifies the integrity of the contents of a snapshot repository +package repositoryverifyintegrity + +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/v8/typedapi/types" +) + +const ( + repositoryMask = 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 RepositoryVerifyIntegrity struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + repository string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewRepositoryVerifyIntegrity type alias for index. +type NewRepositoryVerifyIntegrity func(repository string) *RepositoryVerifyIntegrity + +// NewRepositoryVerifyIntegrityFunc returns a new instance of RepositoryVerifyIntegrity with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewRepositoryVerifyIntegrityFunc(tp elastictransport.Interface) NewRepositoryVerifyIntegrity { + return func(repository string) *RepositoryVerifyIntegrity { + n := New(tp) + + n._repository(repository) + + return n + } +} + +// Verifies the integrity of the contents of a snapshot repository +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html +func New(tp elastictransport.Interface) *RepositoryVerifyIntegrity { + r := &RepositoryVerifyIntegrity{ + 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 *RepositoryVerifyIntegrity) 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 == repositoryMask: + path.WriteString("/") + path.WriteString("_snapshot") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "repository", r.repository) + } + path.WriteString(r.repository) + path.WriteString("/") + path.WriteString("_verify_integrity") + + method = http.MethodPost + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r RepositoryVerifyIntegrity) 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, "snapshot.repository_verify_integrity") + 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, "snapshot.repository_verify_integrity") + if reader := instrument.RecordRequestBody(ctx, "snapshot.repository_verify_integrity", 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", "snapshot.repository_verify_integrity") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the RepositoryVerifyIntegrity 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 repositoryverifyintegrity.Response +func (r RepositoryVerifyIntegrity) 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, "snapshot.repository_verify_integrity") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := new(Response) + + 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 RepositoryVerifyIntegrity) 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, "snapshot.repository_verify_integrity") + 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 RepositoryVerifyIntegrity 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 RepositoryVerifyIntegrity headers map. +func (r *RepositoryVerifyIntegrity) Header(key, value string) *RepositoryVerifyIntegrity { + r.headers.Set(key, value) + + return r +} + +// Repository A repository name +// API Name: repository +func (r *RepositoryVerifyIntegrity) _repository(repository string) *RepositoryVerifyIntegrity { + r.paramSet |= repositoryMask + r.repository = repository + + return r +} + +// MetaThreadPoolConcurrency Number of threads to use for reading metadata +// API name: meta_thread_pool_concurrency +func (r *RepositoryVerifyIntegrity) MetaThreadPoolConcurrency(metathreadpoolconcurrency int) *RepositoryVerifyIntegrity { + r.values.Set("meta_thread_pool_concurrency", strconv.Itoa(metathreadpoolconcurrency)) + + return r +} + +// BlobThreadPoolConcurrency Number of threads to use for reading blob contents +// API name: blob_thread_pool_concurrency +func (r *RepositoryVerifyIntegrity) BlobThreadPoolConcurrency(blobthreadpoolconcurrency int) *RepositoryVerifyIntegrity { + r.values.Set("blob_thread_pool_concurrency", strconv.Itoa(blobthreadpoolconcurrency)) + + return r +} + +// SnapshotVerificationConcurrency Number of snapshots to verify concurrently +// API name: snapshot_verification_concurrency +func (r *RepositoryVerifyIntegrity) SnapshotVerificationConcurrency(snapshotverificationconcurrency int) *RepositoryVerifyIntegrity { + r.values.Set("snapshot_verification_concurrency", strconv.Itoa(snapshotverificationconcurrency)) + + return r +} + +// IndexVerificationConcurrency Number of indices to verify concurrently +// API name: index_verification_concurrency +func (r *RepositoryVerifyIntegrity) IndexVerificationConcurrency(indexverificationconcurrency int) *RepositoryVerifyIntegrity { + r.values.Set("index_verification_concurrency", strconv.Itoa(indexverificationconcurrency)) + + return r +} + +// IndexSnapshotVerificationConcurrency Number of snapshots to verify concurrently within each index +// API name: index_snapshot_verification_concurrency +func (r *RepositoryVerifyIntegrity) IndexSnapshotVerificationConcurrency(indexsnapshotverificationconcurrency int) *RepositoryVerifyIntegrity { + r.values.Set("index_snapshot_verification_concurrency", strconv.Itoa(indexsnapshotverificationconcurrency)) + + return r +} + +// MaxFailedShardSnapshots Maximum permitted number of failed shard snapshots +// API name: max_failed_shard_snapshots +func (r *RepositoryVerifyIntegrity) MaxFailedShardSnapshots(maxfailedshardsnapshots int) *RepositoryVerifyIntegrity { + r.values.Set("max_failed_shard_snapshots", strconv.Itoa(maxfailedshardsnapshots)) + + return r +} + +// VerifyBlobContents Whether to verify the contents of individual blobs +// API name: verify_blob_contents +func (r *RepositoryVerifyIntegrity) VerifyBlobContents(verifyblobcontents bool) *RepositoryVerifyIntegrity { + r.values.Set("verify_blob_contents", strconv.FormatBool(verifyblobcontents)) + + return r +} + +// MaxBytesPerSec Rate limit for individual blob verification +// API name: max_bytes_per_sec +func (r *RepositoryVerifyIntegrity) MaxBytesPerSec(maxbytespersec string) *RepositoryVerifyIntegrity { + r.values.Set("max_bytes_per_sec", maxbytespersec) + + 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 *RepositoryVerifyIntegrity) ErrorTrace(errortrace bool) *RepositoryVerifyIntegrity { + 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 *RepositoryVerifyIntegrity) FilterPath(filterpaths ...string) *RepositoryVerifyIntegrity { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"eixsts_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *RepositoryVerifyIntegrity) Human(human bool) *RepositoryVerifyIntegrity { + 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 *RepositoryVerifyIntegrity) Pretty(pretty bool) *RepositoryVerifyIntegrity { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/snapshot/repositoryverifyintegrity/response.go b/typedapi/snapshot/repositoryverifyintegrity/response.go new file mode 100644 index 0000000000..95b69851fd --- /dev/null +++ b/typedapi/snapshot/repositoryverifyintegrity/response.go @@ -0,0 +1,35 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package repositoryverifyintegrity + +import ( + "encoding/json" +) + +// Response holds the response body struct for the package repositoryverifyintegrity +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/repository_verify_integrity/SnapshotRepositoryVerifyIntegrityResponse.ts#L22-L24 + +type Response = json.RawMessage + +func NewResponse() *Response { + return new(Response) +} diff --git a/typedapi/snapshot/restore/request.go b/typedapi/snapshot/restore/request.go index fca982a86f..530f75aef3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package restore @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package restore // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/restore/SnapshotRestoreRequest.ts#L25-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/restore/SnapshotRestoreRequest.ts#L25-L51 type Request struct { FeatureStates []string `json:"feature_states,omitempty"` IgnoreIndexSettings []string `json:"ignore_index_settings,omitempty"` diff --git a/typedapi/snapshot/restore/response.go b/typedapi/snapshot/restore/response.go index 07f342828b..ebcb9ec46e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package restore @@ -26,9 +26,10 @@ import ( // Response holds the response body struct for the package restore // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/restore/SnapshotRestoreResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/restore/SnapshotRestoreResponse.ts#L23-L28 type Response struct { - Snapshot types.SnapshotRestore `json:"snapshot"` + Accepted *bool `json:"accepted,omitempty"` + Snapshot *types.SnapshotRestore `json:"snapshot,omitempty"` } // NewResponse returns a Response diff --git a/typedapi/snapshot/restore/restore.go b/typedapi/snapshot/restore/restore.go index 91970035d5..2345f55a41 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Restores a snapshot. package restore diff --git a/typedapi/snapshot/status/response.go b/typedapi/snapshot/status/response.go index 05dc9b2a5c..921727305c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package status @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package status // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/status/SnapshotStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 721012df19..ccf740d02b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Returns information about the status of a snapshot. package status diff --git a/typedapi/snapshot/verifyrepository/response.go b/typedapi/snapshot/verifyrepository/response.go index dadb6fcf64..b67c9a4f3a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package verifyrepository @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package verifyrepository // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L23-L25 type Response struct { Nodes map[string]types.CompactNodeInfo `json:"nodes"` } diff --git a/typedapi/snapshot/verifyrepository/verify_repository.go b/typedapi/snapshot/verifyrepository/verify_repository.go index 79b9726c3c..3d26f122c8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Verifies a repository. package verifyrepository diff --git a/typedapi/sql/clearcursor/clear_cursor.go b/typedapi/sql/clearcursor/clear_cursor.go index 843fdc45ea..cd75c23869 100644 --- a/typedapi/sql/clearcursor/clear_cursor.go +++ b/typedapi/sql/clearcursor/clear_cursor.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Clears the SQL cursor +// Clear an SQL search cursor. package clearcursor import ( @@ -73,7 +73,7 @@ func NewClearCursorFunc(tp elastictransport.Interface) NewClearCursor { } } -// Clears the SQL cursor +// Clear an SQL search cursor. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html func New(tp elastictransport.Interface) *ClearCursor { diff --git a/typedapi/sql/clearcursor/request.go b/typedapi/sql/clearcursor/request.go index aea365d1ad..557886a040 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearcursor @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package clearcursor // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L35 type Request struct { // Cursor Cursor to clear. diff --git a/typedapi/sql/clearcursor/response.go b/typedapi/sql/clearcursor/response.go index a5c0566930..b736d605d7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package clearcursor // Response holds the response body struct for the package clearcursor // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/sql/clear_cursor/ClearSqlCursorResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 3be8790e80..cc8a057184 100644 --- a/typedapi/sql/deleteasync/delete_async.go +++ b/typedapi/sql/deleteasync/delete_async.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes an async SQL search or a stored synchronous SQL search. If the search -// is still running, the API cancels it. +// 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. package deleteasync import ( @@ -77,8 +78,9 @@ func NewDeleteAsyncFunc(tp elastictransport.Interface) NewDeleteAsync { } } -// Deletes an async SQL search or a stored synchronous SQL search. If the search -// is still running, the API cancels it. +// 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-async-sql-search-api.html func New(tp elastictransport.Interface) *DeleteAsync { diff --git a/typedapi/sql/deleteasync/response.go b/typedapi/sql/deleteasync/response.go index a98b55d998..371975f74c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deleteasync // Response holds the response body struct for the package deleteasync // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/sql/delete_async/SqlDeleteAsyncResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/sql/delete_async/SqlDeleteAsyncResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/sql/getasync/get_async.go b/typedapi/sql/getasync/get_async.go index c12ec591f9..4805c4dcf1 100644 --- a/typedapi/sql/getasync/get_async.go +++ b/typedapi/sql/getasync/get_async.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns the current status and available results for an async SQL search or -// stored synchronous SQL search +// Get async SQL search results. +// Get the current status and available results for an async SQL search or +// stored synchronous SQL search. package getasync import ( @@ -77,8 +78,9 @@ func NewGetAsyncFunc(tp elastictransport.Interface) NewGetAsync { } } -// Returns the current status and available results for an async SQL search or -// stored synchronous SQL search +// Get async SQL search results. +// Get the current status and available results for an async SQL search or +// stored synchronous SQL search. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-api.html func New(tp elastictransport.Interface) *GetAsync { diff --git a/typedapi/sql/getasync/response.go b/typedapi/sql/getasync/response.go index a8a77853ca..a5c4b8b042 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getasync @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package getasync // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/sql/get_async/SqlGetAsyncResponse.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e2f0e00aab..5f685b923a 100644 --- a/typedapi/sql/getasyncstatus/get_async_status.go +++ b/typedapi/sql/getasyncstatus/get_async_status.go @@ -16,10 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Returns the current status of an async SQL search or a stored synchronous SQL -// search +// Get the async SQL search status. +// Get the current status of an async SQL search or a stored synchronous SQL +// search. package getasyncstatus import ( @@ -77,8 +78,9 @@ func NewGetAsyncStatusFunc(tp elastictransport.Interface) NewGetAsyncStatus { } } -// Returns the current status of an async SQL search or a stored synchronous SQL -// search +// Get the async SQL search status. +// Get the current status of an async SQL search or a stored synchronous SQL +// search. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-status-api.html func New(tp elastictransport.Interface) *GetAsyncStatus { diff --git a/typedapi/sql/getasyncstatus/response.go b/typedapi/sql/getasyncstatus/response.go index 98d61fdd89..88dae95048 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getasyncstatus // Response holds the response body struct for the package getasyncstatus // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/sql/get_async_status/SqlGetAsyncStatusResponse.ts#L23-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/sql/get_async_status/SqlGetAsyncStatusResponse.ts#L23-L55 type Response struct { // CompletionStatus HTTP status code for the search. The API only returns this property for diff --git a/typedapi/sql/query/query.go b/typedapi/sql/query/query.go index 66db077a6c..c407319ee2 100644 --- a/typedapi/sql/query/query.go +++ b/typedapi/sql/query/query.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Executes a SQL request +// Get SQL search results. +// Run an SQL request. package query import ( @@ -35,6 +36,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/sqlformat" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -73,7 +75,8 @@ func NewQueryFunc(tp elastictransport.Interface) NewQuery { } } -// Executes a SQL request +// Get SQL search results. +// Run an SQL request. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html func New(tp elastictransport.Interface) *Query { @@ -292,8 +295,8 @@ func (r *Query) Header(key, value string) *Query { // Format Format for the response. // API name: format -func (r *Query) Format(format string) *Query { - r.values.Set("format", format) +func (r *Query) Format(format sqlformat.SqlFormat) *Query { + r.values.Set("format", format.String()) return r } diff --git a/typedapi/sql/query/request.go b/typedapi/sql/query/request.go index 68dcb9e0f3..97999112a0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package query @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/sql/query/QuerySqlRequest.ts#L28-L122 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/sql/query/QuerySqlRequest.ts#L28-L124 type Request struct { // Catalog Default catalog (cluster) for queries. If unspecified, the queries execute on diff --git a/typedapi/sql/query/response.go b/typedapi/sql/query/response.go index 7ef61d222b..1b9691f1a3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package query @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/sql/query/QuerySqlResponse.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 507adeb3db..80db4d230d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package translate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package translate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/sql/translate/TranslateSqlRequest.ts#L25-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/sql/translate/TranslateSqlRequest.ts#L25-L56 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 96ed1d8a59..ad41550abe 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package translate @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package translate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/sql/translate/TranslateSqlResponse.ts#L28-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/sql/translate/TranslateSqlResponse.ts#L27-L37 type Response struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Fields []types.FieldAndFormat `json:"fields,omitempty"` diff --git a/typedapi/sql/translate/translate.go b/typedapi/sql/translate/translate.go index 2fc1113a43..9efa84d99a 100644 --- a/typedapi/sql/translate/translate.go +++ b/typedapi/sql/translate/translate.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Translates SQL into Elasticsearch queries +// Translate SQL into Elasticsearch queries. +// Translate an SQL search into a search API request containing Query DSL. package translate import ( @@ -73,7 +74,8 @@ func NewTranslateFunc(tp elastictransport.Interface) NewTranslate { } } -// Translates SQL into Elasticsearch queries +// Translate SQL into Elasticsearch queries. +// Translate an SQL search into a search API request containing Query DSL. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html func New(tp elastictransport.Interface) *Translate { diff --git a/typedapi/ssl/certificates/certificates.go b/typedapi/ssl/certificates/certificates.go index 5775582df4..18a6cc912e 100644 --- a/typedapi/ssl/certificates/certificates.go +++ b/typedapi/ssl/certificates/certificates.go @@ -16,10 +16,38 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves information about the X.509 certificates used to encrypt +// 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. package certificates import ( @@ -69,8 +97,36 @@ func NewCertificatesFunc(tp elastictransport.Interface) NewCertificates { } } -// Retrieves information about the X.509 certificates used to encrypt +// Get SSL certificates. +// +// Get information about the X.509 certificates that are used to encrypt // communications in the cluster. +// The API returns a list that includes certificates from all TLS contexts +// including: +// +// - Settings for transport and HTTP interfaces +// - TLS settings that are used within authentication realms +// - TLS settings for remote monitoring exporters +// +// The list includes certificates that are used for configuring trust, such as +// those configured in the `xpack.security.transport.ssl.truststore` and +// `xpack.security.transport.ssl.certificate_authorities` settings. +// It also includes certificates that are used for configuring server identity, +// such as `xpack.security.http.ssl.keystore` and +// `xpack.security.http.ssl.certificate settings`. +// +// The list does not include certificates that are sourced from the default SSL +// context of the Java Runtime Environment (JRE), even if those certificates are +// in use within Elasticsearch. +// +// NOTE: When a PKCS#11 token is configured as the truststore of the JRE, the +// API returns all the certificates that are included in the PKCS#11 token +// irrespective of whether these are used in the Elasticsearch TLS +// configuration. +// +// If Elasticsearch is configured to use a keystore or truststore, the API +// output includes all certificates in that store, even though some of the +// certificates might not be in active use within the cluster. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html func New(tp elastictransport.Interface) *Certificates { diff --git a/typedapi/ssl/certificates/response.go b/typedapi/ssl/certificates/response.go index a30e2cfef8..ad77e057fa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package certificates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package certificates // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ssl/certificates/GetCertificatesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ssl/certificates/GetCertificatesResponse.ts#L22-L24 type Response []types.CertificateInformation diff --git a/typedapi/synonyms/deletesynonym/delete_synonym.go b/typedapi/synonyms/deletesynonym/delete_synonym.go index e6715b72e1..40c35e3cb5 100644 --- a/typedapi/synonyms/deletesynonym/delete_synonym.go +++ b/typedapi/synonyms/deletesynonym/delete_synonym.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes a synonym set +// Delete a synonym set. package deletesynonym import ( @@ -76,7 +76,7 @@ func NewDeleteSynonymFunc(tp elastictransport.Interface) NewDeleteSynonym { } } -// Deletes a synonym set +// Delete a synonym set. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonyms-set.html func New(tp elastictransport.Interface) *DeleteSynonym { diff --git a/typedapi/synonyms/deletesynonym/response.go b/typedapi/synonyms/deletesynonym/response.go index 169864c714..eb5fac7e3f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletesynonym // Response holds the response body struct for the package deletesynonym // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/delete_synonym/SynonymsDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/delete_synonym/SynonymsDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go b/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go index a8a7e8e0b9..139ed109bf 100644 --- a/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go +++ b/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Deletes a synonym rule in a synonym set +// Delete a synonym rule. +// Delete a synonym rule from a synonym set. package deletesynonymrule import ( @@ -81,7 +82,8 @@ func NewDeleteSynonymRuleFunc(tp elastictransport.Interface) NewDeleteSynonymRul } } -// Deletes a synonym rule in a synonym set +// Delete a synonym rule. +// Delete a synonym rule from a synonym set. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonym-rule.html func New(tp elastictransport.Interface) *DeleteSynonymRule { diff --git a/typedapi/synonyms/deletesynonymrule/response.go b/typedapi/synonyms/deletesynonymrule/response.go index c5bce26baa..b8bf35d478 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletesynonymrule @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package deletesynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteResponse.ts#L22-L24 type Response struct { // ReloadAnalyzersDetails Updating synonyms in a synonym set reloads the associated analyzers. diff --git a/typedapi/synonyms/getsynonym/get_synonym.go b/typedapi/synonyms/getsynonym/get_synonym.go index 0a2de094ee..b2bd585300 100644 --- a/typedapi/synonyms/getsynonym/get_synonym.go +++ b/typedapi/synonyms/getsynonym/get_synonym.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves a synonym set +// Get a synonym set. package getsynonym import ( @@ -76,7 +76,7 @@ func NewGetSynonymFunc(tp elastictransport.Interface) NewGetSynonym { } } -// Retrieves a synonym set +// Get a synonym set. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms-set.html func New(tp elastictransport.Interface) *GetSynonym { diff --git a/typedapi/synonyms/getsynonym/response.go b/typedapi/synonyms/getsynonym/response.go index 8365e2869b..abe84c4fb8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getsynonym @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/get_synonym/SynonymsGetResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/get_synonym/SynonymsGetResponse.ts#L23-L28 type Response struct { Count int `json:"count"` SynonymsSet []types.SynonymRuleRead `json:"synonyms_set"` diff --git a/typedapi/synonyms/getsynonymrule/get_synonym_rule.go b/typedapi/synonyms/getsynonymrule/get_synonym_rule.go index b66d0a7488..a2cebde187 100644 --- a/typedapi/synonyms/getsynonymrule/get_synonym_rule.go +++ b/typedapi/synonyms/getsynonymrule/get_synonym_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves a synonym rule from a synonym set +// Get a synonym rule. +// Get a synonym rule from a synonym set. package getsynonymrule import ( @@ -81,7 +82,8 @@ func NewGetSynonymRuleFunc(tp elastictransport.Interface) NewGetSynonymRule { } } -// Retrieves a synonym rule from a synonym set +// Get a synonym rule. +// Get a synonym rule from a synonym set. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonym-rule.html func New(tp elastictransport.Interface) *GetSynonymRule { diff --git a/typedapi/synonyms/getsynonymrule/response.go b/typedapi/synonyms/getsynonymrule/response.go index b938a31daa..6150269fe8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getsynonymrule // Response holds the response body struct for the package getsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/get_synonym_rule/SynonymRuleGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/get_synonym_rule/SynonymRuleGetResponse.ts#L22-L24 type Response struct { // Id Synonym Rule identifier diff --git a/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go b/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go index 4addaa6b55..5a1bfc5977 100644 --- a/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go +++ b/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Retrieves a summary of all defined synonym sets +// Get all synonym sets. +// Get a summary of all defined synonym sets. package getsynonymssets import ( @@ -68,7 +69,8 @@ func NewGetSynonymsSetsFunc(tp elastictransport.Interface) NewGetSynonymsSets { } } -// Retrieves a summary of all defined synonym sets +// Get all synonym sets. +// Get a summary of all defined synonym sets. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-synonyms-sets.html func New(tp elastictransport.Interface) *GetSynonymsSets { diff --git a/typedapi/synonyms/getsynonymssets/response.go b/typedapi/synonyms/getsynonymssets/response.go index 96af6199f9..5a9aa3cf66 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getsynonymssets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsynonymssets // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L23-L28 type Response struct { Count int `json:"count"` Results []types.SynonymsSetItem `json:"results"` diff --git a/typedapi/synonyms/putsynonym/put_synonym.go b/typedapi/synonyms/putsynonym/put_synonym.go index ec5f849ba5..e317d708aa 100644 --- a/typedapi/synonyms/putsynonym/put_synonym.go +++ b/typedapi/synonyms/putsynonym/put_synonym.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates or updates a synonym set. +// 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. package putsynonym import ( @@ -81,7 +84,10 @@ func NewPutSynonymFunc(tp elastictransport.Interface) NewPutSynonym { } } -// Creates or updates a synonym set. +// 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. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonyms-set.html func New(tp elastictransport.Interface) *PutSynonym { diff --git a/typedapi/synonyms/putsynonym/request.go b/typedapi/synonyms/putsynonym/request.go index c05cd38915..2c40084d57 100644 --- a/typedapi/synonyms/putsynonym/request.go +++ b/typedapi/synonyms/putsynonym/request.go @@ -16,20 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putsynonym import ( + "bytes" "encoding/json" + "errors" "fmt" + "io" "github.com/elastic/go-elasticsearch/v8/typedapi/types" ) // Request holds the request body struct for the package putsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/put_synonym/SynonymsPutRequest.ts#L23-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/put_synonym/SynonymsPutRequest.ts#L23-L44 type Request struct { // SynonymsSet The synonym set information to update @@ -54,3 +57,38 @@ func (r *Request) FromJSON(data string) (*Request, error) { return &req, nil } + +func (s *Request) 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 "synonyms_set": + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := types.NewSynonymRule() + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "SynonymsSet", err) + } + + s.SynonymsSet = append(s.SynonymsSet, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.SynonymsSet); err != nil { + return fmt.Errorf("%s | %w", "SynonymsSet", err) + } + } + + } + } + return nil +} diff --git a/typedapi/synonyms/putsynonym/response.go b/typedapi/synonyms/putsynonym/response.go index d5b8bb93ac..ca6ed1b105 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putsynonym @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package putsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/put_synonym/SynonymsPutResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/put_synonym/SynonymsPutResponse.ts#L23-L28 type Response struct { ReloadAnalyzersDetails types.ReloadResult `json:"reload_analyzers_details"` Result result.Result `json:"result"` diff --git a/typedapi/synonyms/putsynonymrule/put_synonym_rule.go b/typedapi/synonyms/putsynonymrule/put_synonym_rule.go index 2ff799face..8e88f72cf5 100644 --- a/typedapi/synonyms/putsynonymrule/put_synonym_rule.go +++ b/typedapi/synonyms/putsynonymrule/put_synonym_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Creates or updates a synonym rule in a synonym set +// Create or update a synonym rule. +// Create or update a synonym rule in a synonym set. package putsynonymrule import ( @@ -86,7 +87,8 @@ func NewPutSynonymRuleFunc(tp elastictransport.Interface) NewPutSynonymRule { } } -// Creates or updates a synonym rule in a synonym set +// Create or update a synonym rule. +// Create or update a synonym rule in a synonym set. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonym-rule.html func New(tp elastictransport.Interface) *PutSynonymRule { diff --git a/typedapi/synonyms/putsynonymrule/request.go b/typedapi/synonyms/putsynonymrule/request.go index 0b4e7a4fe5..609651b34f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putsynonymrule @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L48 type Request struct { Synonyms string `json:"synonyms"` } diff --git a/typedapi/synonyms/putsynonymrule/response.go b/typedapi/synonyms/putsynonymrule/response.go index 6987eef505..ccc4c69dcf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putsynonymrule @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package putsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L24 type Response struct { // ReloadAnalyzersDetails Updating synonyms in a synonym set reloads the associated analyzers. diff --git a/typedapi/tasks/cancel/cancel.go b/typedapi/tasks/cancel/cancel.go index 04534547fb..1cfd48d111 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Cancels a task, if it can be cancelled through an API. package cancel diff --git a/typedapi/tasks/cancel/response.go b/typedapi/tasks/cancel/response.go index 2181f5b269..27473de511 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package cancel @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package cancel // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/tasks/cancel/CancelTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/tasks/cancel/CancelTasksResponse.ts#L22-L24 type Response struct { NodeFailures []types.ErrorCause `json:"node_failures,omitempty"` // Nodes Task information grouped by node, if `group_by` was set to `node` (the diff --git a/typedapi/tasks/get/get.go b/typedapi/tasks/get/get.go index 4929dd46d1..d122dbcf75 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get task information. // Returns information about the tasks currently executing in the cluster. diff --git a/typedapi/tasks/get/response.go b/typedapi/tasks/get/response.go index 423444ac63..bdae740d4f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package get @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/tasks/get/GetTaskResponse.ts#L24-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 b2c8f00a7a..873f5b1c9a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // The task management API returns information about tasks currently executing // on one or more nodes in the cluster. @@ -306,14 +306,10 @@ func (r *List) GroupBy(groupby groupby.GroupBy) *List { return r } -// NodeId Comma-separated list of node IDs or names used to limit returned information. -// API name: node_id -func (r *List) NodeId(nodeids ...string) *List { - tmp := []string{} - for _, item := range nodeids { - tmp = append(tmp, fmt.Sprintf("%v", item)) - } - r.values.Set("node_id", strings.Join(tmp, ",")) +// Nodes Comma-separated list of node IDs or names used to limit returned information. +// API name: nodes +func (r *List) Nodes(nodeids ...string) *List { + r.values.Set("nodes", strings.Join(nodeids, ",")) return r } diff --git a/typedapi/tasks/list/response.go b/typedapi/tasks/list/response.go index 416d48cbd2..8746a92f5c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package list @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/tasks/list/ListTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/tasks/list/ListTasksResponse.ts#L22-L24 type Response struct { NodeFailures []types.ErrorCause `json:"node_failures,omitempty"` // Nodes Task information grouped by node, if `group_by` was set to `node` (the diff --git a/typedapi/textstructure/findfieldstructure/find_field_structure.go b/typedapi/textstructure/findfieldstructure/find_field_structure.go index b377eed298..c0e5ef9577 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Finds the structure of a text field in an index. package findfieldstructure diff --git a/typedapi/textstructure/findmessagestructure/find_message_structure.go b/typedapi/textstructure/findmessagestructure/find_message_structure.go index 1c7179f214..8d2e111626 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Finds the structure of a list of messages. The messages must contain data // that is suitable to be ingested into Elasticsearch. diff --git a/typedapi/textstructure/findstructure/find_structure.go b/typedapi/textstructure/findstructure/find_structure.go index 6d45999e3c..148de4c66d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Finds the structure of a text file. The text file must contain data that is // suitable to be ingested into Elasticsearch. diff --git a/typedapi/textstructure/findstructure/request.go b/typedapi/textstructure/findstructure/request.go index 39469f772d..5a03e7ff32 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package findstructure @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package findstructure // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/text_structure/find_structure/FindStructureRequest.ts#L24-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/text_structure/find_structure/FindStructureRequest.ts#L24-L75 type Request = []json.RawMessage // NewRequest returns a Request diff --git a/typedapi/textstructure/findstructure/response.go b/typedapi/textstructure/findstructure/response.go index 52ea08af89..0bd018fad6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package findstructure @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package findstructure // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/text_structure/find_structure/FindStructureResponse.ts#L27-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/text_structure/find_structure/FindStructureResponse.ts#L27-L52 type Response struct { Charset string `json:"charset"` ColumnNames []string `json:"column_names,omitempty"` diff --git a/typedapi/textstructure/testgrokpattern/request.go b/typedapi/textstructure/testgrokpattern/request.go index d2d9218482..cf7aa3a9e3 100644 --- a/typedapi/textstructure/testgrokpattern/request.go +++ b/typedapi/textstructure/testgrokpattern/request.go @@ -16,18 +16,21 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package testgrokpattern import ( + "bytes" "encoding/json" + "errors" "fmt" + "io" ) // Request holds the request body struct for the package testgrokpattern // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/text_structure/test_grok_pattern/TestGrokPatternRequest.ts#L22-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/text_structure/test_grok_pattern/TestGrokPatternRequest.ts#L23-L44 type Request struct { // GrokPattern Grok pattern to run on the text. @@ -54,3 +57,32 @@ func (r *Request) FromJSON(data string) (*Request, error) { return &req, nil } + +func (s *Request) 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 "grok_pattern": + if err := dec.Decode(&s.GrokPattern); err != nil { + return fmt.Errorf("%s | %w", "GrokPattern", err) + } + + case "text": + if err := dec.Decode(&s.Text); err != nil { + return fmt.Errorf("%s | %w", "Text", err) + } + + } + } + return nil +} diff --git a/typedapi/textstructure/testgrokpattern/response.go b/typedapi/textstructure/testgrokpattern/response.go index 331ac38099..8ac025dff0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package testgrokpattern @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package testgrokpattern // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/text_structure/test_grok_pattern/TestGrokPatternResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 34dbe31855..dbf3e680c5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Tests a Grok pattern on some text. package testgrokpattern @@ -348,7 +348,6 @@ func (r *TestGrokPattern) Pretty(pretty bool) *TestGrokPattern { // GrokPattern Grok pattern to run on the text. // API name: grok_pattern func (r *TestGrokPattern) GrokPattern(grokpattern string) *TestGrokPattern { - r.req.GrokPattern = grokpattern return r diff --git a/typedapi/transform/deletetransform/delete_transform.go b/typedapi/transform/deletetransform/delete_transform.go index 045e80ad4d..335bfe7379 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Delete a transform. // Deletes a transform. diff --git a/typedapi/transform/deletetransform/response.go b/typedapi/transform/deletetransform/response.go index 3af17fb011..dcaf30bc51 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletetransform // Response holds the response body struct for the package deletetransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/delete_transform/DeleteTransformResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/delete_transform/DeleteTransformResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/getnodestats/get_node_stats.go b/typedapi/transform/getnodestats/get_node_stats.go index bf9ae5aede..04d88fbce4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // 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 2cbbeea477..64886bb0ce 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get transforms. // Retrieves configuration information for transforms. diff --git a/typedapi/transform/gettransform/response.go b/typedapi/transform/gettransform/response.go index d21ce9ac05..b2e359f93a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package gettransform @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/get_transform/GetTransformResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 5e83fb3f5e..08296ed236 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Get transform stats. // Retrieves usage information for transforms. diff --git a/typedapi/transform/gettransformstats/response.go b/typedapi/transform/gettransformstats/response.go index 8fa8257200..170b4f96db 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package gettransformstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettransformstats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/get_transform_stats/GetTransformStatsResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 af0365da8a..3a76ca6bc6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Preview a transform. // Generates a preview of the results that you will get when you create a diff --git a/typedapi/transform/previewtransform/request.go b/typedapi/transform/previewtransform/request.go index 6977264a96..cdf7656816 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package previewtransform @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package previewtransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/preview_transform/PreviewTransformRequest.ts#L33-L108 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/preview_transform/PreviewTransformRequest.ts#L33-L108 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 a3dff573b7..871aa0dca3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package previewtransform @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package previewtransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/preview_transform/PreviewTransformResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4f1d8cac18..4da7e459e4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Create a transform. // Creates a transform. diff --git a/typedapi/transform/puttransform/request.go b/typedapi/transform/puttransform/request.go index 0ef25f8124..84d3cdffff 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package puttransform @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package puttransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/put_transform/PutTransformRequest.ts#L33-L123 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/put_transform/PutTransformRequest.ts#L33-L123 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 8905e79d78..fada92cd90 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package puttransform // Response holds the response body struct for the package puttransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/put_transform/PutTransformResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/put_transform/PutTransformResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/resettransform/reset_transform.go b/typedapi/transform/resettransform/reset_transform.go index 774662fb52..56c328e915 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Reset a transform. // Resets a transform. diff --git a/typedapi/transform/resettransform/response.go b/typedapi/transform/resettransform/response.go index cce915f475..8801e39108 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package resettransform // Response holds the response body struct for the package resettransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/reset_transform/ResetTransformResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/reset_transform/ResetTransformResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/schedulenowtransform/response.go b/typedapi/transform/schedulenowtransform/response.go index a1bc30bc0c..3e7c6f923e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package schedulenowtransform // Response holds the response body struct for the package schedulenowtransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/schedule_now_transform/ScheduleNowTransformResponse.ts#L21-L23 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/schedule_now_transform/ScheduleNowTransformResponse.ts#L21-L23 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/schedulenowtransform/schedule_now_transform.go b/typedapi/transform/schedulenowtransform/schedule_now_transform.go index b0306cb016..0ade5ccef1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Schedule a transform to start now. // Instantly runs a transform to process data. diff --git a/typedapi/transform/starttransform/response.go b/typedapi/transform/starttransform/response.go index 547d88ae1a..b3bfbcb621 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package starttransform // Response holds the response body struct for the package starttransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/start_transform/StartTransformResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/start_transform/StartTransformResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/starttransform/start_transform.go b/typedapi/transform/starttransform/start_transform.go index 56178341a8..3c4d5b26bd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Start a transform. // Starts a transform. diff --git a/typedapi/transform/stoptransform/response.go b/typedapi/transform/stoptransform/response.go index 148cd66cc4..869628cc85 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stoptransform // Response holds the response body struct for the package stoptransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/stop_transform/StopTransformResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/stop_transform/StopTransformResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/stoptransform/stop_transform.go b/typedapi/transform/stoptransform/stop_transform.go index a6a22491cb..366898bf0e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Stop transforms. // Stops one or more transforms. diff --git a/typedapi/transform/updatetransform/request.go b/typedapi/transform/updatetransform/request.go index fd39845ef2..c2711d1b5e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatetransform @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package updatetransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/update_transform/UpdateTransformRequest.ts#L31-L106 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/update_transform/UpdateTransformRequest.ts#L31-L106 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 4bf3ff6e3f..94b97c02ae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package updatetransform @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatetransform // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/update_transform/UpdateTransformResponse.ts#L33-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 272c4fd3b1..412c382247 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Update a transform. // Updates certain properties of a transform. diff --git a/typedapi/transform/upgradetransforms/response.go b/typedapi/transform/upgradetransforms/response.go index c75cb672f5..33ea1126e0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package upgradetransforms // Response holds the response body struct for the package upgradetransforms // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/upgrade_transforms/UpgradeTransformsResponse.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 8afc9b7bfe..d7db5a0191 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Upgrades all transforms. // This API identifies transforms that have a legacy configuration format and diff --git a/typedapi/types/access.go b/typedapi/types/access.go new file mode 100644 index 0000000000..3ee99acb0d --- /dev/null +++ b/typedapi/types/access.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +// Access type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` + // Search A list of indices permission entries for cross-cluster search. + Search []SearchAccess `json:"search,omitempty"` +} + +// NewAccess returns a Access. +func NewAccess() *Access { + r := &Access{} + + return r +} diff --git a/typedapi/types/acknowledgement.go b/typedapi/types/acknowledgement.go index 348a241b72..bd96bc8db0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Acknowledgement type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/post/types.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/license/post/types.ts#L20-L23 type Acknowledgement struct { License []string `json:"license"` Message string `json:"message"` diff --git a/typedapi/types/acknowledgestate.go b/typedapi/types/acknowledgestate.go index 57167ace07..4c5c9f49e6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // AcknowledgeState type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Action.ts#L115-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Action.ts#L109-L112 type AcknowledgeState struct { State acknowledgementoptions.AcknowledgementOptions `json:"state"` Timestamp DateTime `json:"timestamp"` diff --git a/typedapi/types/actionstatus.go b/typedapi/types/actionstatus.go index 325e67123b..62edc3f3aa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ActionStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Action.ts#L131-L136 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Action.ts#L125-L130 type ActionStatus struct { Ack AcknowledgeState `json:"ack"` LastExecution *ExecutionState `json:"last_execution,omitempty"` diff --git a/typedapi/types/activationstate.go b/typedapi/types/activationstate.go index 48d5737fbb..bc18bca2a7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ActivationState type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Activation.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Activation.ts#L24-L27 type ActivationState struct { Active bool `json:"active"` Timestamp DateTime `json:"timestamp"` diff --git a/typedapi/types/activationstatus.go b/typedapi/types/activationstatus.go index f91d2c1d83..acba2073e2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ActivationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Activation.ts#L29-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Activation.ts#L29-L33 type ActivationStatus struct { Actions WatcherStatusActions `json:"actions"` State ActivationState `json:"state"` diff --git a/typedapi/types/adaptiveallocationssettings.go b/typedapi/types/adaptiveallocationssettings.go new file mode 100644 index 0000000000..cf41f7fb34 --- /dev/null +++ b/typedapi/types/adaptiveallocationssettings.go @@ -0,0 +1,112 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// AdaptiveAllocationsSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L109-L113 +type AdaptiveAllocationsSettings struct { + Enabled bool `json:"enabled"` + MaxNumberOfAllocations *int `json:"max_number_of_allocations,omitempty"` + MinNumberOfAllocations *int `json:"min_number_of_allocations,omitempty"` +} + +func (s *AdaptiveAllocationsSettings) 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 "max_number_of_allocations": + + 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", "MaxNumberOfAllocations", err) + } + s.MaxNumberOfAllocations = &value + case float64: + f := int(v) + s.MaxNumberOfAllocations = &f + } + + case "min_number_of_allocations": + + 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", "MinNumberOfAllocations", err) + } + s.MinNumberOfAllocations = &value + case float64: + f := int(v) + s.MinNumberOfAllocations = &f + } + + } + } + return nil +} + +// NewAdaptiveAllocationsSettings returns a AdaptiveAllocationsSettings. +func NewAdaptiveAllocationsSettings() *AdaptiveAllocationsSettings { + r := &AdaptiveAllocationsSettings{} + + return r +} diff --git a/typedapi/types/adaptiveselection.go b/typedapi/types/adaptiveselection.go index 77c9cfac9c..1db176765d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AdaptiveSelection type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L403-L432 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L439-L468 type AdaptiveSelection struct { // AvgQueueSize The exponentially weighted moving average queue size of search requests on // the keyed node. diff --git a/typedapi/types/addaction.go b/typedapi/types/addaction.go index 494d9ad478..551b019757 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AddAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/update_aliases/types.ts#L41-L95 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/update_aliases/types.ts#L41-L95 type AddAction struct { // Alias Alias for the action. // Index alias names support date math. diff --git a/typedapi/types/adjacencymatrixaggregate.go b/typedapi/types/adjacencymatrixaggregate.go index d15059f921..8f2e7d8e82 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // AdjacencyMatrixAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L577-L579 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L647-L652 type AdjacencyMatrixAggregate struct { Buckets BucketsAdjacencyMatrixBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/adjacencymatrixaggregation.go b/typedapi/types/adjacencymatrixaggregation.go index 9f0783d54a..e51df344d3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AdjacencyMatrixAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L55-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L60-L70 type AdjacencyMatrixAggregation struct { // Filters Filters used to create buckets. // At least one filter is required. diff --git a/typedapi/types/adjacencymatrixbucket.go b/typedapi/types/adjacencymatrixbucket.go index e14d9c9280..e1d3c6903c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // AdjacencyMatrixBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L581-L583 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L654-L656 type AdjacencyMatrixBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -498,6 +498,13 @@ func (s *AdjacencyMatrixBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/aggregate.go b/typedapi/types/aggregate.go index 5319872c58..e43be6697f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -80,6 +80,7 @@ package types // UnmappedSignificantTermsAggregate // CompositeAggregate // FrequentItemSetsAggregate +// TimeSeriesAggregate // ScriptedMetricAggregate // TopHitsAggregate // InferenceAggregate @@ -92,5 +93,5 @@ package types // MatrixStatsAggregate // GeoLineAggregate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L38-L123 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L38-L125 type Aggregate any diff --git a/typedapi/types/aggregatemetricdoubleproperty.go b/typedapi/types/aggregatemetricdoubleproperty.go index 8ef2eed5d4..7c1837c04a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // AggregateMetricDoubleProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/complex.ts#L61-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/complex.ts#L61-L66 type AggregateMetricDoubleProperty struct { DefaultMetric string `json:"default_metric"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` diff --git a/typedapi/types/aggregateorder.go b/typedapi/types/aggregateorder.go index 99910263d5..1d30a5f431 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]sortorder.SortOrder // []map[string]sortorder.SortOrder // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L983-L985 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L1052-L1054 type AggregateOrder any diff --git a/typedapi/types/aggregateoutput.go b/typedapi/types/aggregateoutput.go index df20e617d9..0f3f543eb5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // AggregateOutput type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L101-L106 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L101-L106 type AggregateOutput struct { Exponent *Weights `json:"exponent,omitempty"` LogisticRegression *Weights `json:"logistic_regression,omitempty"` diff --git a/typedapi/types/aggregation.go b/typedapi/types/aggregation.go index f9a632fe02..cd8c574f04 100644 --- a/typedapi/types/aggregation.go +++ b/typedapi/types/aggregation.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Aggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregation.ts#L20-L20 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregation.ts#L20-L20 type Aggregation struct { } diff --git a/typedapi/types/aggregationbreakdown.go b/typedapi/types/aggregationbreakdown.go index aaac9bb64f..7611db9f2d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AggregationBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L26-L39 type AggregationBreakdown struct { BuildAggregation int64 `json:"build_aggregation"` BuildAggregationCount int64 `json:"build_aggregation_count"` diff --git a/typedapi/types/aggregationprofile.go b/typedapi/types/aggregationprofile.go index a92c7c5a38..a7709637d1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AggregationProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L77-L84 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L85-L92 type AggregationProfile struct { Breakdown AggregationBreakdown `json:"breakdown"` Children []AggregationProfile `json:"children,omitempty"` diff --git a/typedapi/types/aggregationprofiledebug.go b/typedapi/types/aggregationprofiledebug.go index e4df5ea2f5..8721884ebb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,8 +31,9 @@ import ( // AggregationProfileDebug type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L39-L68 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L42-L76 type AggregationProfileDebug struct { + BruteForceUsed *int `json:"brute_force_used,omitempty"` BuiltBuckets *int `json:"built_buckets,omitempty"` CharsFetched *int `json:"chars_fetched,omitempty"` CollectAnalyzedCount *int `json:"collect_analyzed_count,omitempty"` @@ -41,6 +42,8 @@ type AggregationProfileDebug struct { DeferredAggregators []string `json:"deferred_aggregators,omitempty"` Delegate *string `json:"delegate,omitempty"` DelegateDebug *AggregationProfileDebug `json:"delegate_debug,omitempty"` + DynamicPruningAttempted *int `json:"dynamic_pruning_attempted,omitempty"` + DynamicPruningUsed *int `json:"dynamic_pruning_used,omitempty"` EmptyCollectorsUsed *int `json:"empty_collectors_used,omitempty"` ExtractCount *int `json:"extract_count,omitempty"` ExtractNs *int `json:"extract_ns,omitempty"` @@ -57,6 +60,7 @@ type AggregationProfileDebug struct { SegmentsWithDocCountField *int `json:"segments_with_doc_count_field,omitempty"` SegmentsWithMultiValuedOrds *int `json:"segments_with_multi_valued_ords,omitempty"` SegmentsWithSingleValuedOrds *int `json:"segments_with_single_valued_ords,omitempty"` + SkippedDueToNoData *int `json:"skipped_due_to_no_data,omitempty"` StringHashingCollectorsUsed *int `json:"string_hashing_collectors_used,omitempty"` SurvivingBuckets *int `json:"surviving_buckets,omitempty"` TotalBuckets *int `json:"total_buckets,omitempty"` @@ -78,6 +82,22 @@ func (s *AggregationProfileDebug) UnmarshalJSON(data []byte) error { switch t { + case "brute_force_used": + + 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", "BruteForceUsed", err) + } + s.BruteForceUsed = &value + case float64: + f := int(v) + s.BruteForceUsed = &f + } + case "built_buckets": var tmp any @@ -176,6 +196,38 @@ func (s *AggregationProfileDebug) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "DelegateDebug", err) } + case "dynamic_pruning_attempted": + + 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", "DynamicPruningAttempted", err) + } + s.DynamicPruningAttempted = &value + case float64: + f := int(v) + s.DynamicPruningAttempted = &f + } + + case "dynamic_pruning_used": + + 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", "DynamicPruningUsed", err) + } + s.DynamicPruningUsed = &value + case float64: + f := int(v) + s.DynamicPruningUsed = &f + } + case "empty_collectors_used": var tmp any @@ -411,6 +463,22 @@ func (s *AggregationProfileDebug) UnmarshalJSON(data []byte) error { s.SegmentsWithSingleValuedOrds = &f } + case "skipped_due_to_no_data": + + 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", "SkippedDueToNoData", err) + } + s.SkippedDueToNoData = &value + case float64: + f := int(v) + s.SkippedDueToNoData = &f + } + case "string_hashing_collectors_used": var tmp any diff --git a/typedapi/types/aggregationprofiledelegatedebugfilter.go b/typedapi/types/aggregationprofiledelegatedebugfilter.go index 7a45114e99..654b0a9220 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AggregationProfileDelegateDebugFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L70-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L78-L83 type AggregationProfileDelegateDebugFilter struct { Query *string `json:"query,omitempty"` ResultsFromMetadata *int `json:"results_from_metadata,omitempty"` diff --git a/typedapi/types/aggregationrange.go b/typedapi/types/aggregationrange.go index 9030ce7843..b87151cabd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AggregationRange type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L674-L687 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L691-L704 type AggregationRange struct { // From Start of the range (inclusive). From *Float64 `json:"from,omitempty"` @@ -57,19 +57,8 @@ func (s *AggregationRange) UnmarshalJSON(data []byte) error { switch t { case "from": - 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", "From", err) - } - f := Float64(value) - s.From = &f - case float64: - f := Float64(v) - s.From = &f + if err := dec.Decode(&s.From); err != nil { + return fmt.Errorf("%s | %w", "From", err) } case "key": @@ -85,19 +74,8 @@ func (s *AggregationRange) UnmarshalJSON(data []byte) error { s.Key = &o case "to": - 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", "To", err) - } - f := Float64(value) - s.To = &f - case float64: - f := Float64(v) - s.To = &f + if err := dec.Decode(&s.To); err != nil { + return fmt.Errorf("%s | %w", "To", err) } } diff --git a/typedapi/types/aggregations.go b/typedapi/types/aggregations.go index 1bdf438d5b..3a856294ce 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Aggregations type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/AggregationContainer.ts#L105-L514 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/AggregationContainer.ts#L107-L533 type Aggregations struct { // AdjacencyMatrix A bucket aggregation returning a form of adjacency matrix. // The request provides a collection of named filter expressions, similar to the @@ -223,6 +223,10 @@ type Aggregations struct { // PercentilesBucket A sibling pipeline aggregation which calculates percentiles across all bucket // of a specified metric in a sibling aggregation. PercentilesBucket *PercentilesBucketAggregation `json:"percentiles_bucket,omitempty"` + // RandomSampler A single bucket aggregation that randomly includes documents in the + // aggregated results. + // Sampling provides significant speed improvement at the cost of accuracy. + RandomSampler *RandomSamplerAggregation `json:"random_sampler,omitempty"` // Range A multi-bucket value source based aggregation that enables the user to define // a set of ranges - each representing a bucket. Range *RangeAggregation `json:"range,omitempty"` @@ -270,6 +274,10 @@ type Aggregations struct { // Terms A multi-bucket value source based aggregation where buckets are dynamically // built - one per unique value. Terms *TermsAggregation `json:"terms,omitempty"` + // TimeSeries The time series aggregation queries data created using a time series index. + // This is typically data such as metrics or other data streams with a time + // component, and requires creating an index using the time series mode. + TimeSeries *TimeSeriesAggregation `json:"time_series,omitempty"` // TopHits A metric aggregation that returns the top matching documents per bucket. TopHits *TopHitsAggregation `json:"top_hits,omitempty"` // TopMetrics A metric aggregation that selects metrics from the document with the largest @@ -633,6 +641,11 @@ func (s *Aggregations) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "PercentilesBucket", err) } + case "random_sampler": + if err := dec.Decode(&s.RandomSampler); err != nil { + return fmt.Errorf("%s | %w", "RandomSampler", err) + } + case "range": if err := dec.Decode(&s.Range); err != nil { return fmt.Errorf("%s | %w", "Range", err) @@ -713,6 +726,11 @@ func (s *Aggregations) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Terms", err) } + case "time_series": + if err := dec.Decode(&s.TimeSeries); err != nil { + return fmt.Errorf("%s | %w", "TimeSeries", err) + } + case "top_hits": if err := dec.Decode(&s.TopHits); err != nil { return fmt.Errorf("%s | %w", "TopHits", err) diff --git a/typedapi/types/alias.go b/typedapi/types/alias.go index ac083b2217..0ffc9b1df3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Alias type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/Alias.ts#L23-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/aliasdefinition.go b/typedapi/types/aliasdefinition.go index 0c257764af..4c8198143b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AliasDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/AliasDefinition.ts#L22-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/aliasesrecord.go b/typedapi/types/aliasesrecord.go index 5b416e6e02..09947beddf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AliasesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/aliases/types.ts#L22-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/aliases/types.ts#L22-L53 type AliasesRecord struct { // Alias alias name Alias *string `json:"alias,omitempty"` diff --git a/typedapi/types/allfield.go b/typedapi/types/allfield.go index 7e2ae6585b..4ca7576648 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AllField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/meta-fields.ts#L29-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/meta-fields.ts#L29-L40 type AllField struct { Analyzer string `json:"analyzer"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/allocateaction.go b/typedapi/types/allocateaction.go index 33fd58ace7..1127296986 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AllocateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L136-L142 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L136-L142 type AllocateAction struct { Exclude map[string]string `json:"exclude,omitempty"` Include map[string]string `json:"include,omitempty"` diff --git a/typedapi/types/allocationdecision.go b/typedapi/types/allocationdecision.go index 262049a387..435d17eb22 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // AllocationDecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L26-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/types.ts#L27-L31 type AllocationDecision struct { Decider string `json:"decider"` Decision allocationexplaindecision.AllocationExplainDecision `json:"decision"` diff --git a/typedapi/types/allocationrecord.go b/typedapi/types/allocationrecord.go index a7c71eaa5f..4e5cb5ecf7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AllocationRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/allocation/types.ts#L24-L98 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. @@ -63,16 +63,16 @@ type AllocationRecord struct { // Ip IP address and port for the node. Ip *string `json:"ip,omitempty"` // Node Name for the node. Set using the `node.name` setting. - Node string `json:"node"` + Node *string `json:"node,omitempty"` // NodeRole Node roles NodeRole *string `json:"node.role,omitempty"` // Shards Number of primary and replica shards assigned to the node. - Shards string `json:"shards"` + Shards *string `json:"shards,omitempty"` // ShardsUndesired Amount of shards that are scheduled to be moved elsewhere in the cluster or // -1 other than desired balance allocator is used ShardsUndesired *string `json:"shards.undesired,omitempty"` // WriteLoadForecast Sum of index write load forecasts - WriteLoadForecast *Float64 `json:"write_load.forecast,omitempty"` + WriteLoadForecast *Stringifieddouble `json:"write_load.forecast,omitempty"` } func (s *AllocationRecord) UnmarshalJSON(data []byte) error { @@ -140,7 +140,7 @@ func (s *AllocationRecord) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Node = o + s.Node = &o case "node.role", "r", "role", "nodeRole": var tmp json.RawMessage @@ -164,7 +164,7 @@ func (s *AllocationRecord) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Shards = o + s.Shards = &o case "shards.undesired": var tmp json.RawMessage diff --git a/typedapi/types/allocationstore.go b/typedapi/types/allocationstore.go index f3b6e25476..9c512e76d9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AllocationStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L39-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/types.ts#L40-L47 type AllocationStore struct { AllocationId string `json:"allocation_id"` Found bool `json:"found"` diff --git a/typedapi/types/alwayscondition.go b/typedapi/types/alwayscondition.go index 26e02caf9c..edb470d732 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // AlwaysCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Conditions.ts#L25-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Conditions.ts#L25-L25 type AlwaysCondition struct { } diff --git a/typedapi/types/analysisconfig.go b/typedapi/types/analysisconfig.go index 2474a8e441..fe2a1aae9b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AnalysisConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Analysis.ts#L29-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/analysisconfigread.go b/typedapi/types/analysisconfigread.go index 4c6b68ee7e..9407e666b4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AnalysisConfigRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Analysis.ts#L79-L148 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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`. diff --git a/typedapi/types/analysislimits.go b/typedapi/types/analysislimits.go index fc684735ac..ddd94a6d6c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AnalysisLimits type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Analysis.ts#L161-L172 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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, @@ -55,7 +55,7 @@ type AnalysisLimits struct { // `xpack.ml.max_model_memory_limit` setting, an error occurs when you try to // create jobs that have `model_memory_limit` values greater than that setting // value. - ModelMemoryLimit *string `json:"model_memory_limit,omitempty"` + ModelMemoryLimit ByteSize `json:"model_memory_limit,omitempty"` } func (s *AnalysisLimits) UnmarshalJSON(data []byte) error { @@ -89,16 +89,9 @@ func (s *AnalysisLimits) UnmarshalJSON(data []byte) error { } case "model_memory_limit": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { + if err := dec.Decode(&s.ModelMemoryLimit); err != nil { return fmt.Errorf("%s | %w", "ModelMemoryLimit", err) } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.ModelMemoryLimit = &o } } diff --git a/typedapi/types/analysismemorylimit.go b/typedapi/types/analysismemorylimit.go index 393206c30d..1a4f2a0972 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AnalysisMemoryLimit type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Analysis.ts#L174-L179 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/analytics.go b/typedapi/types/analytics.go index 995f20cd16..914b5aab2a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Analytics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L330-L332 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L328-L330 type Analytics struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/analyticscollection.go b/typedapi/types/analyticscollection.go index f9edab92d1..08493794d6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // AnalyticsCollection type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/_types/BehavioralAnalytics.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/_types/BehavioralAnalytics.ts#L22-L27 type AnalyticsCollection struct { // EventDataStream Data stream for the collection. EventDataStream EventDataStream `json:"event_data_stream"` diff --git a/typedapi/types/analyticsstatistics.go b/typedapi/types/analyticsstatistics.go index 37a3edb94b..bd17aae8c3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AnalyticsStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L61-L71 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L59-L69 type AnalyticsStatistics struct { BoxplotUsage int64 `json:"boxplot_usage"` CumulativeCardinalityUsage int64 `json:"cumulative_cardinality_usage"` diff --git a/typedapi/types/analyzedetail.go b/typedapi/types/analyzedetail.go index a581cdee5f..2b360ba3dc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AnalyzeDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/analyze/types.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/analyze/types.ts#L24-L30 type AnalyzeDetail struct { Analyzer *AnalyzerDetail `json:"analyzer,omitempty"` Charfilters []CharFilterDetail `json:"charfilters,omitempty"` diff --git a/typedapi/types/analyzer.go b/typedapi/types/analyzer.go index fb4b469888..41bea5ad52 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,43 @@ package types // IcuAnalyzer // KuromojiAnalyzer // SnowballAnalyzer +// ArabicAnalyzer +// ArmenianAnalyzer +// BasqueAnalyzer +// BengaliAnalyzer +// BrazilianAnalyzer +// BulgarianAnalyzer +// CatalanAnalyzer +// ChineseAnalyzer +// CjkAnalyzer +// CzechAnalyzer +// DanishAnalyzer // DutchAnalyzer +// EnglishAnalyzer +// EstonianAnalyzer +// FinnishAnalyzer +// FrenchAnalyzer +// GalicianAnalyzer +// GermanAnalyzer +// GreekAnalyzer +// HindiAnalyzer +// HungarianAnalyzer +// IndonesianAnalyzer +// IrishAnalyzer +// ItalianAnalyzer +// LatvianAnalyzer +// LithuanianAnalyzer +// NorwegianAnalyzer +// PersianAnalyzer +// PortugueseAnalyzer +// RomanianAnalyzer +// RussianAnalyzer +// SerbianAnalyzer +// SoraniAnalyzer +// SpanishAnalyzer +// SwedishAnalyzer +// TurkishAnalyzer +// ThaiAnalyzer // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L113-L131 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L359-L413 type Analyzer any diff --git a/typedapi/types/analyzerdetail.go b/typedapi/types/analyzerdetail.go index 1b5573e6bc..81d6a3cc53 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AnalyzerDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/analyze/types.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/analyze/types.ts#L32-L35 type AnalyzerDetail struct { Name string `json:"name"` Tokens []ExplainAnalyzeToken `json:"tokens"` diff --git a/typedapi/types/analyzetoken.go b/typedapi/types/analyzetoken.go index 6c3b17a7b4..d10342a100 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AnalyzeToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/analyze/types.ts#L37-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/analyze/types.ts#L37-L44 type AnalyzeToken struct { EndOffset int64 `json:"end_offset"` Position int64 `json:"position"` diff --git a/typedapi/types/anomaly.go b/typedapi/types/anomaly.go index 076ca654bd..1c28300571 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Anomaly type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Anomaly.ts#L24-L121 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Anomaly.ts#L24-L121 type Anomaly struct { // Actual The actual value for the bucket. Actual []Float64 `json:"actual,omitempty"` diff --git a/typedapi/types/anomalycause.go b/typedapi/types/anomalycause.go index 5a41d3a24d..507ecbf9c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AnomalyCause type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Anomaly.ts#L123-L138 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Anomaly.ts#L123-L138 type AnomalyCause struct { Actual []Float64 `json:"actual"` ByFieldName string `json:"by_field_name"` diff --git a/typedapi/types/anomalydetectors.go b/typedapi/types/anomalydetectors.go index aeb49bc6dd..4df94a71a4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AnomalyDetectors type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/info/types.ts#L44-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/info/types.ts#L46-L52 type AnomalyDetectors struct { CategorizationAnalyzer CategorizationAnalyzer `json:"categorization_analyzer"` CategorizationExamplesLimit int `json:"categorization_examples_limit"` diff --git a/typedapi/types/anomalyexplanation.go b/typedapi/types/anomalyexplanation.go index e3b3263a4a..97ed63b546 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AnomalyExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Anomaly.ts#L156-L197 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Anomaly.ts#L156-L197 type AnomalyExplanation struct { // AnomalyCharacteristicsImpact Impact from the duration and magnitude of the detected anomaly relative to // the historical average. diff --git a/typedapi/types/apikey.go b/typedapi/types/apikey.go index d8672e2dea..0de27844ea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -27,14 +27,23 @@ import ( "fmt" "io" "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/apikeytype" ) // ApiKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/ApiKey.ts#L27-L89 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 + // cluster replication. + // At least one of them must be specified. + // When specified, the new access assignment fully replaces the previously + // assigned access. + Access *Access `json:"access,omitempty"` // Creation Creation time for the API key in milliseconds. - Creation *int64 `json:"creation,omitempty"` + Creation int64 `json:"creation"` // Expiration Expiration time for the API key in milliseconds. Expiration *int64 `json:"expiration,omitempty"` // Id Id for the API key @@ -42,21 +51,23 @@ type ApiKey struct { // Invalidated Invalidation status for the API key. // If the key has been invalidated, it has a value of `true`. Otherwise, it is // `false`. - Invalidated *bool `json:"invalidated,omitempty"` + Invalidated bool `json:"invalidated"` + // Invalidation If the key has been invalidated, invalidation time in milliseconds. + Invalidation *int64 `json:"invalidation,omitempty"` // LimitedBy The owner user’s permissions associated with the API key. // It is a point-in-time snapshot captured at creation and subsequent updates. // An API key’s effective permissions are an intersection of its assigned // privileges and the owner user’s permissions. LimitedBy []map[string]RoleDescriptor `json:"limited_by,omitempty"` // Metadata Metadata of the API key - Metadata Metadata `json:"metadata,omitempty"` + Metadata Metadata `json:"metadata"` // Name Name of the API key. Name string `json:"name"` // ProfileUid The profile uid for the API key owner principal, if requested and if it // exists ProfileUid *string `json:"profile_uid,omitempty"` // Realm Realm name of the principal for which this API key was created. - Realm *string `json:"realm,omitempty"` + Realm string `json:"realm"` // RealmType Realm type of the principal for which this API key was created RealmType *string `json:"realm_type,omitempty"` // RoleDescriptors The role descriptors assigned to this API key when it was created or last @@ -64,9 +75,13 @@ type ApiKey struct { // An empty role descriptor means the API key inherits the owner user’s // permissions. RoleDescriptors map[string]RoleDescriptor `json:"role_descriptors,omitempty"` - Sort_ []FieldValue `json:"_sort,omitempty"` + // Sort_ Sorting values when using the `sort` parameter with the + // `security.query_api_keys` API. + Sort_ []FieldValue `json:"_sort,omitempty"` + // Type The type of the API key (e.g. `rest` or `cross_cluster`). + Type apikeytype.ApiKeyType `json:"type"` // Username Principal for which this API key was created - Username *string `json:"username,omitempty"` + Username string `json:"username"` } func (s *ApiKey) UnmarshalJSON(data []byte) error { @@ -84,34 +99,19 @@ func (s *ApiKey) UnmarshalJSON(data []byte) error { switch t { + case "access": + if err := dec.Decode(&s.Access); err != nil { + return fmt.Errorf("%s | %w", "Access", err) + } + case "creation": - 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", "Creation", err) - } - s.Creation = &value - case float64: - f := int64(v) - s.Creation = &f + if err := dec.Decode(&s.Creation); err != nil { + return fmt.Errorf("%s | %w", "Creation", err) } case "expiration": - 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", "Expiration", err) - } - s.Expiration = &value - case float64: - f := int64(v) - s.Expiration = &f + if err := dec.Decode(&s.Expiration); err != nil { + return fmt.Errorf("%s | %w", "Expiration", err) } case "id": @@ -128,9 +128,14 @@ func (s *ApiKey) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "Invalidated", err) } - s.Invalidated = &value + s.Invalidated = value case bool: - s.Invalidated = &v + s.Invalidated = v + } + + case "invalidation": + if err := dec.Decode(&s.Invalidation); err != nil { + return fmt.Errorf("%s | %w", "Invalidation", err) } case "limited_by": @@ -170,7 +175,7 @@ func (s *ApiKey) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Realm = &o + s.Realm = o case "realm_type": var tmp json.RawMessage @@ -197,6 +202,11 @@ func (s *ApiKey) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Sort_", err) } + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + case "username": if err := dec.Decode(&s.Username); err != nil { return fmt.Errorf("%s | %w", "Username", err) diff --git a/typedapi/types/apikeyaggregate.go b/typedapi/types/apikeyaggregate.go index 5b163078c0..b5673df3f2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -36,5 +36,5 @@ package types // DateRangeAggregate // CompositeAggregate // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_api_keys/types.ts#L123-L140 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ba7d72470c..6f8fecff47 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ApiKeyAggregationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_api_keys/types.ts#L64-L121 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/query_api_keys/types.ts#L63-L120 type ApiKeyAggregationContainer struct { // Aggregations Sub-aggregations for this aggregation. // Only applies to bucket aggregations. diff --git a/typedapi/types/apikeyauthorization.go b/typedapi/types/apikeyauthorization.go index bff65a5392..7a1e601a45 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ApiKeyAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Authorization.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Authorization.ts#L20-L29 type ApiKeyAuthorization struct { // Id The identifier for the API key. Id string `json:"id"` diff --git a/typedapi/types/apikeyfiltersaggregation.go b/typedapi/types/apikeyfiltersaggregation.go index b3b75c3a4d..5f99f0814c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ApiKeyFiltersAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_api_keys/types.ts#L208-L228 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/apikeyquerycontainer.go b/typedapi/types/apikeyquerycontainer.go index 0fcd9aeb3a..d40085a319 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ApiKeyQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_api_keys/types.ts#L142-L206 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/query_api_keys/types.ts#L141-L205 type ApiKeyQueryContainer struct { // Bool matches documents matching boolean combinations of other queries. Bool *BoolQuery `json:"bool,omitempty"` diff --git a/typedapi/types/appendprocessor.go b/typedapi/types/appendprocessor.go index f6a9fe5fb1..dbe9521773 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AppendProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L279-L294 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L328-L343 type AppendProcessor struct { // AllowDuplicates If `false`, the processor does not append values already present in the // field. @@ -145,8 +145,19 @@ func (s *AppendProcessor) UnmarshalJSON(data []byte) error { s.Tag = &o case "value": - if err := dec.Decode(&s.Value); err != nil { - return fmt.Errorf("%s | %w", "Value", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(json.RawMessage) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Value", err) + } + + s.Value = append(s.Value, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Value); err != nil { + return fmt.Errorf("%s | %w", "Value", err) + } } } diff --git a/typedapi/types/applicationglobaluserprivileges.go b/typedapi/types/applicationglobaluserprivileges.go index 154141ef56..aab77d89dd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ApplicationGlobalUserPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L340-L342 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L410-L412 type ApplicationGlobalUserPrivileges struct { Manage ManageUserPrivileges `json:"manage"` } diff --git a/typedapi/types/applicationprivileges.go b/typedapi/types/applicationprivileges.go index 726752a30e..0c2b837059 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ApplicationPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L27-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/applicationprivilegescheck.go b/typedapi/types/applicationprivilegescheck.go index 0510df14ea..e7490c756a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ApplicationPrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/has_privileges/types.ts#L24-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/has_privileges/types.ts#L24-L31 type ApplicationPrivilegesCheck struct { // Application The name of the application. Application string `json:"application"` diff --git a/typedapi/types/applicationsprivileges.go b/typedapi/types/applicationsprivileges.go index 009f77e52e..38351b4870 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ApplicationsPrivileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/has_privileges/types.ts#L46-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/has_privileges/types.ts#L46-L46 type ApplicationsPrivileges map[string]ResourcePrivileges diff --git a/typedapi/types/arabicanalyzer.go b/typedapi/types/arabicanalyzer.go new file mode 100644 index 0000000000..9c0cb24787 --- /dev/null +++ b/typedapi/types/arabicanalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ArabicAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L61-L66 +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"` +} + +func (s *ArabicAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 ArabicAnalyzer) MarshalJSON() ([]byte, error) { + type innerArabicAnalyzer ArabicAnalyzer + tmp := innerArabicAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "arabic" + + return json.Marshal(tmp) +} + +// NewArabicAnalyzer returns a ArabicAnalyzer. +func NewArabicAnalyzer() *ArabicAnalyzer { + r := &ArabicAnalyzer{} + + return r +} diff --git a/typedapi/types/archive.go b/typedapi/types/archive.go index ddda129481..17fe9f5671 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Archive type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L48-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L46-L48 type Archive struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/armeniananalyzer.go b/typedapi/types/armeniananalyzer.go new file mode 100644 index 0000000000..65797496d8 --- /dev/null +++ b/typedapi/types/armeniananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ArmenianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L68-L73 +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"` +} + +func (s *ArmenianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 ArmenianAnalyzer) MarshalJSON() ([]byte, error) { + type innerArmenianAnalyzer ArmenianAnalyzer + tmp := innerArmenianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "armenian" + + return json.Marshal(tmp) +} + +// NewArmenianAnalyzer returns a ArmenianAnalyzer. +func NewArmenianAnalyzer() *ArmenianAnalyzer { + r := &ArmenianAnalyzer{} + + return r +} diff --git a/typedapi/types/arraycomparecondition.go b/typedapi/types/arraycomparecondition.go index 0c1fc35c7e..bb2f4d03b0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // ArrayCompareCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Conditions.ts#L32-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Conditions.ts#L32-L39 type ArrayCompareCondition struct { ArrayCompareCondition map[conditionop.ConditionOp]ArrayCompareOpParams `json:"-"` Path string `json:"path"` diff --git a/typedapi/types/arraycompareopparams.go b/typedapi/types/arraycompareopparams.go index bc7d026586..cc7804cb9b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // ArrayCompareOpParams type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Conditions.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Conditions.ts#L27-L30 type ArrayCompareOpParams struct { Quantifier quantifier.Quantifier `json:"quantifier"` Value FieldValue `json:"value"` diff --git a/typedapi/types/arraypercentilesitem.go b/typedapi/types/arraypercentilesitem.go index bc8e78ce5b..b682750d50 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ArrayPercentilesItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L160-L164 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L162-L166 type ArrayPercentilesItem struct { Key string `json:"key"` Value *Float64 `json:"value,omitempty"` diff --git a/typedapi/types/asciifoldingtokenfilter.go b/typedapi/types/asciifoldingtokenfilter.go index 82ed15fb8a..ab867cfa0a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // AsciiFoldingTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L170-L173 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L169-L172 type AsciiFoldingTokenFilter struct { PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/asyncsearch.go b/typedapi/types/asyncsearch.go index 4cdebc694b..5b47b7b17a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // AsyncSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/async_search/_types/AsyncSearch.ts#L30-L56 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/async_search/_types/AsyncSearch.ts#L30-L56 type AsyncSearch struct { // Aggregations Partial aggregations results, coming from the shards that have already // completed the execution of the query. @@ -502,6 +502,13 @@ func (s *AsyncSearch) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/attachmentprocessor.go b/typedapi/types/attachmentprocessor.go index 7a1d707d91..03e436f49f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AttachmentProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L296-L337 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L345-L386 type AttachmentProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/audit.go b/typedapi/types/audit.go index 3b792c61ce..7280ba3a35 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Audit type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L73-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L71-L73 type Audit struct { Enabled bool `json:"enabled"` Outputs []string `json:"outputs,omitempty"` diff --git a/typedapi/types/authenticateapikey.go b/typedapi/types/authenticateapikey.go new file mode 100644 index 0000000000..2ff4cbc107 --- /dev/null +++ b/typedapi/types/authenticateapikey.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// AuthenticateApiKey type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/authenticate/SecurityAuthenticateResponse.ts#L44-L47 +type AuthenticateApiKey struct { + Id string `json:"id"` + Name *string `json:"name,omitempty"` +} + +func (s *AuthenticateApiKey) 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 "name": + if err := dec.Decode(&s.Name); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + + } + } + return nil +} + +// NewAuthenticateApiKey returns a AuthenticateApiKey. +func NewAuthenticateApiKey() *AuthenticateApiKey { + r := &AuthenticateApiKey{} + + return r +} diff --git a/typedapi/types/authenticateduser.go b/typedapi/types/authenticateduser.go index bb4c2a364d..fa8be55f5f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AuthenticatedUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_token/types.ts#L40-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_token/types.ts#L40-L45 type AuthenticatedUser struct { AuthenticationProvider *AuthenticationProvider `json:"authentication_provider,omitempty"` AuthenticationRealm UserRealm `json:"authentication_realm"` diff --git a/typedapi/types/authenticatetoken.go b/typedapi/types/authenticatetoken.go index 9f63eb3a84..7563bd6526 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AuthenticateToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/authenticate/types.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/authenticate/types.ts#L22-L29 type AuthenticateToken struct { Name string `json:"name"` Type *string `json:"type,omitempty"` diff --git a/typedapi/types/authenticationprovider.go b/typedapi/types/authenticationprovider.go index 241a3b3334..ed53b4f5e5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AuthenticationProvider type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_token/types.ts#L35-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_token/types.ts#L35-L38 type AuthenticationProvider struct { Name string `json:"name"` Type string `json:"type"` diff --git a/typedapi/types/autodatehistogramaggregate.go b/typedapi/types/autodatehistogramaggregate.go index 28338fff07..341ff2d6c2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // AutoDateHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L358-L362 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L393-L400 type AutoDateHistogramAggregate struct { Buckets BucketsDateHistogramBucket `json:"buckets"` Interval string `json:"interval"` diff --git a/typedapi/types/autodatehistogramaggregation.go b/typedapi/types/autodatehistogramaggregation.go index 4e30ca03c1..c81753e20e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // AutoDateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L67-L102 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L72-L110 type AutoDateHistogramAggregation struct { // Buckets The target number of buckets. Buckets *int `json:"buckets,omitempty"` diff --git a/typedapi/types/autofollowedcluster.go b/typedapi/types/autofollowedcluster.go index b861bf2930..ecab1572cf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // AutoFollowedCluster type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/stats/types.ts.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/stats/types.ts.ts#L26-L30 type AutoFollowedCluster struct { ClusterName string `json:"cluster_name"` LastSeenMetadataVersion int64 `json:"last_seen_metadata_version"` diff --git a/typedapi/types/autofollowpattern.go b/typedapi/types/autofollowpattern.go index 483d98763b..a15d8e3e90 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // AutoFollowPattern type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/get_auto_follow_pattern/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/get_auto_follow_pattern/types.ts#L23-L26 type AutoFollowPattern struct { Name string `json:"name"` Pattern AutoFollowPatternSummary `json:"pattern"` diff --git a/typedapi/types/autofollowpatternsummary.go b/typedapi/types/autofollowpatternsummary.go index 5573399375..9312b65b6d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AutoFollowPatternSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/get_auto_follow_pattern/types.ts#L28-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/get_auto_follow_pattern/types.ts#L28-L52 type AutoFollowPatternSummary struct { Active bool `json:"active"` // FollowIndexPattern The name of follower index. diff --git a/typedapi/types/autofollowstats.go b/typedapi/types/autofollowstats.go index 40bf1aed33..ff137df8a7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AutoFollowStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/stats/types.ts.ts#L33-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/stats/types.ts.ts#L32-L38 type AutoFollowStats struct { AutoFollowedClusters []AutoFollowedCluster `json:"auto_followed_clusters"` NumberOfFailedFollowIndices int64 `json:"number_of_failed_follow_indices"` diff --git a/typedapi/types/autoscalingcapacity.go b/typedapi/types/autoscalingcapacity.go index 5e270ad564..671173f493 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // AutoscalingCapacity type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L38-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L38-L41 type AutoscalingCapacity struct { Node AutoscalingResources `json:"node"` Total AutoscalingResources `json:"total"` diff --git a/typedapi/types/autoscalingdecider.go b/typedapi/types/autoscalingdecider.go index af80433838..99b1f63e20 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AutoscalingDecider type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L52-L56 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/autoscalingdeciders.go b/typedapi/types/autoscalingdeciders.go index faf3977ec4..9fab904e6c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // AutoscalingDeciders type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L31-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L31-L36 type AutoscalingDeciders struct { CurrentCapacity AutoscalingCapacity `json:"current_capacity"` CurrentNodes []AutoscalingNode `json:"current_nodes"` diff --git a/typedapi/types/autoscalingnode.go b/typedapi/types/autoscalingnode.go index ef30d5bf0d..1303d38210 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // AutoscalingNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L48-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L48-L50 type AutoscalingNode struct { Name string `json:"name"` } diff --git a/typedapi/types/autoscalingpolicy.go b/typedapi/types/autoscalingpolicy.go index 01185f1ecb..bf3d9ee877 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,9 +26,9 @@ import ( // AutoscalingPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/autoscaling/_types/AutoscalingPolicy.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/autoscaling/_types/AutoscalingPolicy.ts#L23-L30 type AutoscalingPolicy struct { - // Deciders Decider settings + // Deciders Decider settings. Deciders map[string]json.RawMessage `json:"deciders"` Roles []string `json:"roles"` } diff --git a/typedapi/types/autoscalingresources.go b/typedapi/types/autoscalingresources.go index 34d16f1dca..909c8e4526 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AutoscalingResources type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L43-L46 type AutoscalingResources struct { Memory int `json:"memory"` Storage int `json:"storage"` diff --git a/typedapi/types/averageaggregation.go b/typedapi/types/averageaggregation.go index bcbbfdff66..94d673d680 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L55-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L55-L55 type AverageAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/averagebucketaggregation.go b/typedapi/types/averagebucketaggregation.go index ade946c371..91328f51b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // AverageBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L78-L78 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/avgaggregate.go b/typedapi/types/avgaggregate.go index 9cc20740f8..6d00613c0c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AvgAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L209-L210 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/azurerepository.go b/typedapi/types/azurerepository.go index 7f3cc4c092..9b2adb9dd2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // AzureRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L40-L43 type AzureRepository struct { Settings AzureRepositorySettings `json:"settings"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/azurerepositorysettings.go b/typedapi/types/azurerepositorysettings.go index c12b0ce289..253849f593 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // AzureRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L77-L83 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L77-L83 type AzureRepositorySettings struct { BasePath *string `json:"base_path,omitempty"` ChunkSize ByteSize `json:"chunk_size,omitempty"` diff --git a/typedapi/types/base.go b/typedapi/types/base.go index 1923bf93b9..2e5961e7e1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Base type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L28-L31 type Base struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/baseindicator.go b/typedapi/types/baseindicator.go index 8864dbbd50..6f1c62fd2c 100644 --- a/typedapi/types/baseindicator.go +++ b/typedapi/types/baseindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // BaseIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L42-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L43-L48 type BaseIndicator struct { Diagnosis []Diagnosis `json:"diagnosis,omitempty"` Impacts []Impact `json:"impacts,omitempty"` diff --git a/typedapi/types/basenode.go b/typedapi/types/basenode.go index 5f9f08979a..fd52737028 100644 --- a/typedapi/types/basenode.go +++ b/typedapi/types/basenode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // BaseNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_spec_utils/BaseNode.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_spec_utils/BaseNode.ts#L25-L32 type BaseNode struct { Attributes map[string]string `json:"attributes"` Host string `json:"host"` diff --git a/typedapi/types/basqueanalyzer.go b/typedapi/types/basqueanalyzer.go new file mode 100644 index 0000000000..067db5502d --- /dev/null +++ b/typedapi/types/basqueanalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// BasqueAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L75-L80 +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"` +} + +func (s *BasqueAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 BasqueAnalyzer) MarshalJSON() ([]byte, error) { + type innerBasqueAnalyzer BasqueAnalyzer + tmp := innerBasqueAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "basque" + + return json.Marshal(tmp) +} + +// NewBasqueAnalyzer returns a BasqueAnalyzer. +func NewBasqueAnalyzer() *BasqueAnalyzer { + r := &BasqueAnalyzer{} + + return r +} diff --git a/typedapi/types/bengalianalyzer.go b/typedapi/types/bengalianalyzer.go new file mode 100644 index 0000000000..cbcc38de8c --- /dev/null +++ b/typedapi/types/bengalianalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// BengaliAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L82-L87 +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"` +} + +func (s *BengaliAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 BengaliAnalyzer) MarshalJSON() ([]byte, error) { + type innerBengaliAnalyzer BengaliAnalyzer + tmp := innerBengaliAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "bengali" + + return json.Marshal(tmp) +} + +// NewBengaliAnalyzer returns a BengaliAnalyzer. +func NewBengaliAnalyzer() *BengaliAnalyzer { + r := &BengaliAnalyzer{} + + return r +} diff --git a/typedapi/types/binaryproperty.go b/typedapi/types/binaryproperty.go index 80874aaf5d..1993edca1d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // BinaryProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L55-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L54-L56 type BinaryProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -43,7 +43,6 @@ type BinaryProperty struct { // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -760,18 +759,6 @@ func (s *BinaryProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -807,7 +794,6 @@ func (s BinaryProperty) MarshalJSON() ([]byte, error) { IgnoreAbove: s.IgnoreAbove, Meta: s.Meta, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/booleanproperty.go b/typedapi/types/booleanproperty.go index 932d7ebb3f..d5828ffedd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // BooleanProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L59-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L58-L64 type BooleanProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -47,7 +47,6 @@ type BooleanProperty struct { Meta map[string]string `json:"meta,omitempty"` NullValue *bool `json:"null_value,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -813,18 +812,6 @@ func (s *BooleanProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -864,7 +851,6 @@ func (s BooleanProperty) MarshalJSON() ([]byte, error) { Meta: s.Meta, NullValue: s.NullValue, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/boolquery.go b/typedapi/types/boolquery.go index 5e32b6d9d6..d53b7bad47 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BoolQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L29-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/boostingquery.go b/typedapi/types/boostingquery.go index 14ddfe64ec..b9d2a6b3d1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BoostingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L55-L68 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/boxplotaggregate.go b/typedapi/types/boxplotaggregate.go index 56c7c445e9..62d84a74da 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BoxPlotAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L713-L729 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L806-L825 type BoxPlotAggregate struct { Lower Float64 `json:"lower"` LowerAsString *string `json:"lower_as_string,omitempty"` diff --git a/typedapi/types/boxplotaggregation.go b/typedapi/types/boxplotaggregation.go index f2f799669c..204d0229dc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BoxplotAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L57-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L57-L62 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 diff --git a/typedapi/types/braziliananalyzer.go b/typedapi/types/braziliananalyzer.go new file mode 100644 index 0000000000..e7c40bf0c4 --- /dev/null +++ b/typedapi/types/braziliananalyzer.go @@ -0,0 +1,113 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// BrazilianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L89-L93 +type BrazilianAnalyzer struct { + Stopwords []string `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` +} + +func (s *BrazilianAnalyzer) 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": + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 BrazilianAnalyzer) MarshalJSON() ([]byte, error) { + type innerBrazilianAnalyzer BrazilianAnalyzer + tmp := innerBrazilianAnalyzer{ + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "brazilian" + + return json.Marshal(tmp) +} + +// NewBrazilianAnalyzer returns a BrazilianAnalyzer. +func NewBrazilianAnalyzer() *BrazilianAnalyzer { + r := &BrazilianAnalyzer{} + + return r +} diff --git a/typedapi/types/breaker.go b/typedapi/types/breaker.go index a811c4aa1f..225f20b8f3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Breaker type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L434-L459 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L470-L495 type Breaker struct { // EstimatedSize Estimated memory used for the operation. EstimatedSize *string `json:"estimated_size,omitempty"` diff --git a/typedapi/types/bucketcorrelationaggregation.go b/typedapi/types/bucketcorrelationaggregation.go index 3605c24304..f9c5244464 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // BucketCorrelationAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L129-L135 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/bucketcorrelationfunction.go b/typedapi/types/bucketcorrelationfunction.go index 8df427dfd2..2ba17b12ee 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // BucketCorrelationFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L137-L142 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/bucketcorrelationfunctioncountcorrelation.go b/typedapi/types/bucketcorrelationfunctioncountcorrelation.go index 528bd324fa..52d5ce858c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // BucketCorrelationFunctionCountCorrelation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L144-L147 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go b/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go index 6383b79d1e..ad50f9b787 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BucketCorrelationFunctionCountCorrelationIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L149-L167 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/bucketinfluencer.go b/typedapi/types/bucketinfluencer.go index abdc06dad0..ffb64fd7db 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BucketInfluencer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Bucket.ts#L80-L128 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/bucketksaggregation.go b/typedapi/types/bucketksaggregation.go index 20fc609089..564cc910be 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BucketKsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L94-L127 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/bucketmetricvalueaggregate.go b/typedapi/types/bucketmetricvalueaggregate.go index 038c12dcdb..7f3603becd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BucketMetricValueAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L233-L236 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L250-L253 type BucketMetricValueAggregate struct { Keys []string `json:"keys"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/bucketpathaggregation.go b/typedapi/types/bucketpathaggregation.go index 0da995b6db..d90daef6ba 100644 --- a/typedapi/types/bucketpathaggregation.go +++ b/typedapi/types/bucketpathaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // BucketPathAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L31-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/pipeline.ts#L31-L37 type BucketPathAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/bucketsadjacencymatrixbucket.go b/typedapi/types/bucketsadjacencymatrixbucket.go index 0a6f3b0cd3..abb761b2b5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]AdjacencyMatrixBucket // []AdjacencyMatrixBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsAdjacencyMatrixBucket any diff --git a/typedapi/types/bucketsapikeyquerycontainer.go b/typedapi/types/bucketsapikeyquerycontainer.go index dc37ed66db..b2667ec011 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]ApiKeyQueryContainer // []ApiKeyQueryContainer // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsApiKeyQueryContainer any diff --git a/typedapi/types/bucketscompositebucket.go b/typedapi/types/bucketscompositebucket.go index 4381454ded..9df3975309 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]CompositeBucket // []CompositeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsCompositeBucket any diff --git a/typedapi/types/bucketscriptaggregation.go b/typedapi/types/bucketscriptaggregation.go index 053507af0a..527c3bfc3b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // BucketScriptAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L80-L85 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/bucketsdatehistogrambucket.go b/typedapi/types/bucketsdatehistogrambucket.go index 41859b5c0d..e4c0e55c07 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]DateHistogramBucket // []DateHistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsDateHistogramBucket any diff --git a/typedapi/types/bucketsdoubletermsbucket.go b/typedapi/types/bucketsdoubletermsbucket.go index 6177edf5bb..78d62ad7fd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]DoubleTermsBucket // []DoubleTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsDoubleTermsBucket any diff --git a/typedapi/types/bucketselectoraggregation.go b/typedapi/types/bucketselectoraggregation.go index fb2302be63..b04bce72f4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // BucketSelectorAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L87-L92 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/bucketsfiltersbucket.go b/typedapi/types/bucketsfiltersbucket.go index 87ea834bfd..136ee67b36 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]FiltersBucket // []FiltersBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsFiltersBucket any diff --git a/typedapi/types/bucketsfrequentitemsetsbucket.go b/typedapi/types/bucketsfrequentitemsetsbucket.go index bf71fb80a4..6696bce6cf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]FrequentItemSetsBucket // []FrequentItemSetsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsFrequentItemSetsBucket any diff --git a/typedapi/types/bucketsgeohashgridbucket.go b/typedapi/types/bucketsgeohashgridbucket.go index 3353bcb75c..8fa494e206 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]GeoHashGridBucket // []GeoHashGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsGeoHashGridBucket any diff --git a/typedapi/types/bucketsgeohexgridbucket.go b/typedapi/types/bucketsgeohexgridbucket.go index 766d7c2a57..c1471bf3f4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]GeoHexGridBucket // []GeoHexGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsGeoHexGridBucket any diff --git a/typedapi/types/bucketsgeotilegridbucket.go b/typedapi/types/bucketsgeotilegridbucket.go index bddc8039e2..f9494afe1e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]GeoTileGridBucket // []GeoTileGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsGeoTileGridBucket any diff --git a/typedapi/types/bucketshistogrambucket.go b/typedapi/types/bucketshistogrambucket.go index dcf9ee48f4..c3b6671d62 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]HistogramBucket // []HistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsHistogramBucket any diff --git a/typedapi/types/bucketsipprefixbucket.go b/typedapi/types/bucketsipprefixbucket.go index 20747fa465..333051ac9c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]IpPrefixBucket // []IpPrefixBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsIpPrefixBucket any diff --git a/typedapi/types/bucketsiprangebucket.go b/typedapi/types/bucketsiprangebucket.go index 5ed091352d..190c621a17 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]IpRangeBucket // []IpRangeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsIpRangeBucket any diff --git a/typedapi/types/bucketslongraretermsbucket.go b/typedapi/types/bucketslongraretermsbucket.go index 56f2367f57..655d0c23c2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]LongRareTermsBucket // []LongRareTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsLongRareTermsBucket any diff --git a/typedapi/types/bucketslongtermsbucket.go b/typedapi/types/bucketslongtermsbucket.go index 1cb669bbca..c8107d4744 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]LongTermsBucket // []LongTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsLongTermsBucket any diff --git a/typedapi/types/bucketsmultitermsbucket.go b/typedapi/types/bucketsmultitermsbucket.go index 7153b698d5..4286151ae9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]MultiTermsBucket // []MultiTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsMultiTermsBucket any diff --git a/typedapi/types/bucketsortaggregation.go b/typedapi/types/bucketsortaggregation.go index 115ca7eb78..43357d1232 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // BucketSortAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L169-L190 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/bucketspath.go b/typedapi/types/bucketspath.go index c977d21419..5c7bcc0b8b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ package types // []string // map[string]string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L53-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/pipeline.ts#L53-L59 type BucketsPath any diff --git a/typedapi/types/bucketsquery.go b/typedapi/types/bucketsquery.go index a2c78a7759..8d03bfd0ba 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]Query // []Query // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsQuery any diff --git a/typedapi/types/bucketsrangebucket.go b/typedapi/types/bucketsrangebucket.go index 15c237ae19..bbdeaa82b5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]RangeBucket // []RangeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsRangeBucket any diff --git a/typedapi/types/bucketssignificantlongtermsbucket.go b/typedapi/types/bucketssignificantlongtermsbucket.go index e71897f69a..4f6677e76f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]SignificantLongTermsBucket // []SignificantLongTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsSignificantLongTermsBucket any diff --git a/typedapi/types/bucketssignificantstringtermsbucket.go b/typedapi/types/bucketssignificantstringtermsbucket.go index 8a25ec0ddf..e65e91cb1b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]SignificantStringTermsBucket // []SignificantStringTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsSignificantStringTermsBucket any diff --git a/typedapi/types/bucketsstringraretermsbucket.go b/typedapi/types/bucketsstringraretermsbucket.go index 2f4e3b35f6..7b6b0ec0ef 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]StringRareTermsBucket // []StringRareTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsStringRareTermsBucket any diff --git a/typedapi/types/bucketsstringtermsbucket.go b/typedapi/types/bucketsstringtermsbucket.go index 14817d23f9..fe2026916f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]StringTermsBucket // []StringTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsStringTermsBucket any diff --git a/typedapi/types/bucketstimeseriesbucket.go b/typedapi/types/bucketstimeseriesbucket.go new file mode 100644 index 0000000000..b7eb7740b6 --- /dev/null +++ b/typedapi/types/bucketstimeseriesbucket.go @@ -0,0 +1,29 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +// BucketsTimeSeriesBucket holds the union for the following types: +// +// map[string]TimeSeriesBucket +// []TimeSeriesBucket +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 +type BucketsTimeSeriesBucket any diff --git a/typedapi/types/bucketsummary.go b/typedapi/types/bucketsummary.go index 76527d3dee..6421fb380f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BucketSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Bucket.ts#L31-L78 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/bucketsvariablewidthhistogrambucket.go b/typedapi/types/bucketsvariablewidthhistogrambucket.go index 1e07c69d8a..9198e9ed78 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]VariableWidthHistogramBucket // []VariableWidthHistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsVariableWidthHistogramBucket any diff --git a/typedapi/types/bucketsvoid.go b/typedapi/types/bucketsvoid.go index 6137beffcc..6ad00d93bd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // map[string]any // []any // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L316-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsVoid any diff --git a/typedapi/types/buildinformation.go b/typedapi/types/buildinformation.go index 8b5ee21358..8275fbf707 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BuildInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/info/types.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/info/types.ts#L24-L27 type BuildInformation struct { Date DateTime `json:"date"` Hash string `json:"hash"` diff --git a/typedapi/types/bulgariananalyzer.go b/typedapi/types/bulgariananalyzer.go new file mode 100644 index 0000000000..60020f6ff6 --- /dev/null +++ b/typedapi/types/bulgariananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// BulgarianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L95-L100 +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"` +} + +func (s *BulgarianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 BulgarianAnalyzer) MarshalJSON() ([]byte, error) { + type innerBulgarianAnalyzer BulgarianAnalyzer + tmp := innerBulgarianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "bulgarian" + + return json.Marshal(tmp) +} + +// NewBulgarianAnalyzer returns a BulgarianAnalyzer. +func NewBulgarianAnalyzer() *BulgarianAnalyzer { + r := &BulgarianAnalyzer{} + + return r +} diff --git a/typedapi/types/bulkerror.go b/typedapi/types/bulkerror.go index 4d8e26caa9..eaa61b11c7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BulkError type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Bulk.ts#L24-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Bulk.ts#L24-L33 type BulkError struct { // Count The number of errors Count int `json:"count"` diff --git a/typedapi/types/bulkindexbyscrollfailure.go b/typedapi/types/bulkindexbyscrollfailure.go index 97e915c446..d97fd77beb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BulkIndexByScrollFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Errors.ts#L60-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Errors.ts#L60-L66 type BulkIndexByScrollFailure struct { Cause ErrorCause `json:"cause"` Id string `json:"id"` diff --git a/typedapi/types/bulkstats.go b/typedapi/types/bulkstats.go index bfcd679409..8eb8fe09b0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BulkStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L68-L78 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L68-L78 type BulkStats struct { AvgSize ByteSize `json:"avg_size,omitempty"` AvgSizeInBytes int64 `json:"avg_size_in_bytes"` diff --git a/typedapi/types/bytenumberproperty.go b/typedapi/types/bytenumberproperty.go index 8b46b502cd..e051b64fa7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // ByteNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L172-L175 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L172-L175 type ByteNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -52,7 +52,6 @@ type ByteNumberProperty struct { OnScriptError *onscripterror.OnScriptError `json:"on_script_error,omitempty"` Properties map[string]Property `json:"properties,omitempty"` Script *Script `json:"script,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` // TimeSeriesDimension For internal use by Elastic only. Marks the field as a time series dimension. // Defaults to false. @@ -848,18 +847,6 @@ func (s *ByteNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Script", err) } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -921,7 +908,6 @@ func (s ByteNumberProperty) MarshalJSON() ([]byte, error) { OnScriptError: s.OnScriptError, Properties: s.Properties, Script: s.Script, - Similarity: s.Similarity, Store: s.Store, TimeSeriesDimension: s.TimeSeriesDimension, TimeSeriesMetric: s.TimeSeriesMetric, diff --git a/typedapi/types/bytesize.go b/typedapi/types/bytesize.go index 75877c9fd7..ce2a1dc55d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L96-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L97-L98 type ByteSize any diff --git a/typedapi/types/bytesprocessor.go b/typedapi/types/bytesprocessor.go index f8dc5203f5..b37846d27c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // BytesProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L392-L408 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L555-L571 type BytesProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/cachequeries.go b/typedapi/types/cachequeries.go index e8324ea7b1..5a7452445f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CacheQueries type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L407-L409 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L407-L409 type CacheQueries struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/cachestats.go b/typedapi/types/cachestats.go index a88422fe8b..97d8dccaa1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,13 +31,16 @@ import ( // CacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/stats/types.ts#L37-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/enrich/stats/types.ts#L38-L50 type CacheStats struct { - Count int `json:"count"` - Evictions int `json:"evictions"` - Hits int `json:"hits"` - Misses int `json:"misses"` - NodeId string `json:"node_id"` + Count int `json:"count"` + Evictions int `json:"evictions"` + Hits int `json:"hits"` + HitsTimeInMillis int64 `json:"hits_time_in_millis"` + Misses int `json:"misses"` + MissesTimeInMillis int64 `json:"misses_time_in_millis"` + NodeId string `json:"node_id"` + SizeInBytes int64 `json:"size_in_bytes"` } func (s *CacheStats) UnmarshalJSON(data []byte) error { @@ -103,6 +106,11 @@ func (s *CacheStats) UnmarshalJSON(data []byte) error { s.Hits = f } + case "hits_time_in_millis": + if err := dec.Decode(&s.HitsTimeInMillis); err != nil { + return fmt.Errorf("%s | %w", "HitsTimeInMillis", err) + } + case "misses": var tmp any @@ -119,11 +127,31 @@ func (s *CacheStats) UnmarshalJSON(data []byte) error { s.Misses = f } + case "misses_time_in_millis": + if err := dec.Decode(&s.MissesTimeInMillis); err != nil { + return fmt.Errorf("%s | %w", "MissesTimeInMillis", err) + } + case "node_id": if err := dec.Decode(&s.NodeId); err != nil { return fmt.Errorf("%s | %w", "NodeId", err) } + case "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", "SizeInBytes", err) + } + s.SizeInBytes = value + case float64: + f := int64(v) + s.SizeInBytes = f + } + } } return nil diff --git a/typedapi/types/calendar.go b/typedapi/types/calendar.go index 6808b97379..00100e124d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Calendar type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_calendars/types.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/get_calendars/types.ts#L22-L29 type Calendar struct { // CalendarId A string that uniquely identifies a calendar. CalendarId string `json:"calendar_id"` diff --git a/typedapi/types/calendarevent.go b/typedapi/types/calendarevent.go index 3ddf75961e..35425c7b80 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CalendarEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/CalendarEvent.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/CalendarEvent.ts#L23-L33 type CalendarEvent struct { // CalendarId A string that uniquely identifies a calendar. CalendarId *string `json:"calendar_id,omitempty"` diff --git a/typedapi/types/cardinalityaggregate.go b/typedapi/types/cardinalityaggregate.go index c9fa0387a5..5dbefe2f90 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CardinalityAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L138-L141 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L140-L143 type CardinalityAggregate struct { Meta Metadata `json:"meta,omitempty"` Value int64 `json:"value"` diff --git a/typedapi/types/cardinalityaggregation.go b/typedapi/types/cardinalityaggregation.go index a48e3dc8d6..4bcd9d8efb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // CardinalityAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L87-L99 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L87-L99 type CardinalityAggregation struct { // ExecutionHint Mechanism by which cardinality aggregations is run. ExecutionHint *cardinalityexecutionmode.CardinalityExecutionMode `json:"execution_hint,omitempty"` diff --git a/typedapi/types/catalananalyzer.go b/typedapi/types/catalananalyzer.go new file mode 100644 index 0000000000..e0b508d07d --- /dev/null +++ b/typedapi/types/catalananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CatalanAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L102-L107 +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"` +} + +func (s *CatalanAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 CatalanAnalyzer) MarshalJSON() ([]byte, error) { + type innerCatalanAnalyzer CatalanAnalyzer + tmp := innerCatalanAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "catalan" + + return json.Marshal(tmp) +} + +// NewCatalanAnalyzer returns a CatalanAnalyzer. +func NewCatalanAnalyzer() *CatalanAnalyzer { + r := &CatalanAnalyzer{} + + return r +} diff --git a/typedapi/types/catanonalydetectorcolumns.go b/typedapi/types/catanonalydetectorcolumns.go index 6f4bc1e44a..dffeb13950 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ import ( // CatAnonalyDetectorColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/_types/CatBase.ts#L402-L404 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/_types/CatBase.ts#L402-L404 type CatAnonalyDetectorColumns []catanomalydetectorcolumn.CatAnomalyDetectorColumn diff --git a/typedapi/types/catcomponenttemplate.go b/typedapi/types/catcomponenttemplate.go index 060091f977..9565723fc6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CatComponentTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/component_templates/types.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/component_templates/types.ts#L20-L28 type CatComponentTemplate struct { AliasCount string `json:"alias_count"` IncludedIn string `json:"included_in"` diff --git a/typedapi/types/catdatafeedcolumns.go b/typedapi/types/catdatafeedcolumns.go index 807f8707c3..05e3ac8222 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ import ( // CatDatafeedColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/_types/CatBase.ts#L559-L559 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/_types/CatBase.ts#L559-L559 type CatDatafeedColumns []catdatafeedcolumn.CatDatafeedColumn diff --git a/typedapi/types/catdfacolumns.go b/typedapi/types/catdfacolumns.go index 7dd34ae262..0384db5cae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ import ( // CatDfaColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/_types/CatBase.ts#L558-L558 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/_types/CatBase.ts#L558-L558 type CatDfaColumns []catdfacolumn.CatDfaColumn diff --git a/typedapi/types/categorizationanalyzer.go b/typedapi/types/categorizationanalyzer.go index 64665fc9cc..7ef149b9cc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // CategorizationAnalyzerDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Analysis.ts#L181-L182 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Analysis.ts#L181-L182 type CategorizationAnalyzer any diff --git a/typedapi/types/categorizationanalyzerdefinition.go b/typedapi/types/categorizationanalyzerdefinition.go index 0a5ff9c998..67f7a1b902 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,7 +29,7 @@ import ( // CategorizationAnalyzerDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Analysis.ts#L184-L197 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 @@ -450,6 +450,12 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return err } s.Tokenizer = *o + case "classic": + o := NewClassicTokenizer() + if err := localDec.Decode(&o); err != nil { + return err + } + s.Tokenizer = *o case "edge_ngram": o := NewEdgeNGramTokenizer() if err := localDec.Decode(&o); err != nil { @@ -480,14 +486,26 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return err } s.Tokenizer = *o - case "nori_tokenizer": - o := NewNoriTokenizer() + case "path_hierarchy": + o := NewPathHierarchyTokenizer() if err := localDec.Decode(&o); err != nil { return err } s.Tokenizer = *o - case "path_hierarchy": - o := NewPathHierarchyTokenizer() + case "pattern": + o := NewPatternTokenizer() + if err := localDec.Decode(&o); err != nil { + return err + } + s.Tokenizer = *o + case "simple_pattern": + o := NewSimplePatternTokenizer() + if err := localDec.Decode(&o); err != nil { + return err + } + s.Tokenizer = *o + case "simple_pattern_split": + o := NewSimplePatternSplitTokenizer() if err := localDec.Decode(&o); err != nil { return err } @@ -498,6 +516,12 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return err } s.Tokenizer = *o + case "thai": + o := NewThaiTokenizer() + if err := localDec.Decode(&o); err != nil { + return err + } + s.Tokenizer = *o case "uax_url_email": o := NewUaxEmailUrlTokenizer() if err := localDec.Decode(&o); err != nil { @@ -510,20 +534,20 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return err } s.Tokenizer = *o - case "kuromoji_tokenizer": - o := NewKuromojiTokenizer() + case "icu_tokenizer": + o := NewIcuTokenizer() if err := localDec.Decode(&o); err != nil { return err } s.Tokenizer = *o - case "pattern": - o := NewPatternTokenizer() + case "kuromoji_tokenizer": + o := NewKuromojiTokenizer() if err := localDec.Decode(&o); err != nil { return err } s.Tokenizer = *o - case "icu_tokenizer": - o := NewIcuTokenizer() + case "nori_tokenizer": + o := NewNoriTokenizer() if err := localDec.Decode(&o); err != nil { return err } diff --git a/typedapi/types/categorizetextaggregation.go b/typedapi/types/categorizetextaggregation.go index 1a2f4299b3..c1d9a0ba4a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CategorizeTextAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L1045-L1109 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L1117-L1182 type CategorizeTextAggregation struct { // CategorizationAnalyzer The categorization analyzer specifies how the text is analyzed and tokenized // before being categorized. diff --git a/typedapi/types/categorizetextanalyzer.go b/typedapi/types/categorizetextanalyzer.go index 1d55034c99..018be801fa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // CustomCategorizeTextAnalyzer // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L1111-L1114 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L1184-L1187 type CategorizeTextAnalyzer any diff --git a/typedapi/types/category.go b/typedapi/types/category.go index 6aa69b04ab..328159db13 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Category type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Category.ts#L23-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. @@ -103,16 +103,9 @@ func (s *Category) UnmarshalJSON(data []byte) error { } case "grok_pattern": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { + if err := dec.Decode(&s.GrokPattern); err != nil { return fmt.Errorf("%s | %w", "GrokPattern", err) } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.GrokPattern = &o case "job_id": if err := dec.Decode(&s.JobId); err != nil { diff --git a/typedapi/types/cattrainedmodelscolumns.go b/typedapi/types/cattrainedmodelscolumns.go index 269374f417..0c05e9d825 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ import ( // CatTrainedModelsColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/_types/CatBase.ts#L636-L638 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/_types/CatBase.ts#L636-L638 type CatTrainedModelsColumns []cattrainedmodelscolumn.CatTrainedModelsColumn diff --git a/typedapi/types/cattransformcolumns.go b/typedapi/types/cattransformcolumns.go index 1b021ec2ba..118dd9320f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ import ( // CatTransformColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/_types/CatBase.ts#L845-L845 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/_types/CatBase.ts#L845-L845 type CatTransformColumns []cattransformcolumn.CatTransformColumn diff --git a/typedapi/types/ccr.go b/typedapi/types/ccr.go index 2da846d135..4d588bff46 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Ccr type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L334-L337 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L332-L335 type Ccr struct { AutoFollowPatternsCount int `json:"auto_follow_patterns_count"` Available bool `json:"available"` diff --git a/typedapi/types/ccrshardstats.go b/typedapi/types/ccrshardstats.go index 93747a7e80..9e465a351d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CcrShardStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/_types/FollowIndexStats.ts#L35-L69 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/_types/FollowIndexStats.ts#L35-L69 type CcrShardStats struct { BytesRead int64 `json:"bytes_read"` FailedReadRequests int64 `json:"failed_read_requests"` diff --git a/typedapi/types/certificateinformation.go b/typedapi/types/certificateinformation.go index 4babc0a85a..3731d46595 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CertificateInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ssl/certificates/types.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ssl/certificates/types.ts#L22-L31 type CertificateInformation struct { Alias *string `json:"alias,omitempty"` Expiry DateTime `json:"expiry"` diff --git a/typedapi/types/cgroup.go b/typedapi/types/cgroup.go index 8f54679f05..9977da1efc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Cgroup type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L461-L474 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L497-L510 type Cgroup struct { // Cpu Contains statistics about `cpu` control group for the node. Cpu *CgroupCpu `json:"cpu,omitempty"` diff --git a/typedapi/types/cgroupcpu.go b/typedapi/types/cgroupcpu.go index bef77b70e1..672f317a70 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CgroupCpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L487-L504 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L523-L540 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 diff --git a/typedapi/types/cgroupcpustat.go b/typedapi/types/cgroupcpustat.go index 216a6cc3a2..3e195aafbb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CgroupCpuStat type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L506-L519 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L542-L555 type CgroupCpuStat struct { // NumberOfElapsedPeriods The number of reporting periods (as specified by `cfs_period_micros`) that // have elapsed. diff --git a/typedapi/types/cgroupmemory.go b/typedapi/types/cgroupmemory.go index f57c5b58ee..5fca7b31b9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CgroupMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L521-L537 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L557-L573 type CgroupMemory struct { // ControlGroup The `memory` control group to which the Elasticsearch process belongs. ControlGroup *string `json:"control_group,omitempty"` diff --git a/typedapi/types/chaininput.go b/typedapi/types/chaininput.go index 76719ad643..713a7887af 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ChainInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L35-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L35-L37 type ChainInput struct { Inputs []map[string]WatcherInput `json:"inputs"` } diff --git a/typedapi/types/charfilter.go b/typedapi/types/charfilter.go index ca2b2fba11..6190cf50bd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // CharFilterDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/char_filters.ts#L28-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/char_filters.ts#L28-L33 type CharFilter any diff --git a/typedapi/types/charfilterdefinition.go b/typedapi/types/charfilterdefinition.go index 40c0f54ce9..299b47a818 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -28,5 +28,5 @@ package types // IcuNormalizationCharFilter // KuromojiIterationMarkCharFilter // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/char_filters.ts#L32-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/char_filters.ts#L35-L44 type CharFilterDefinition any diff --git a/typedapi/types/charfilterdetail.go b/typedapi/types/charfilterdetail.go index fbc89c1858..493b3fdc91 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CharFilterDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/analyze/types.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/analyze/types.ts#L46-L49 type CharFilterDetail struct { FilteredText []string `json:"filtered_text"` Name string `json:"name"` diff --git a/typedapi/types/charfiltertypes.go b/typedapi/types/charfiltertypes.go index c446cda113..dfdff4ce5a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // CharFilterTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L228-L261 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L228-L261 type CharFilterTypes struct { // AnalyzerTypes Contains statistics about analyzer types used in selected nodes. AnalyzerTypes []FieldTypes `json:"analyzer_types"` diff --git a/typedapi/types/chargrouptokenizer.go b/typedapi/types/chargrouptokenizer.go index 211d0db2f2..ae60110014 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CharGroupTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L56-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L31-L38 type CharGroupTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` TokenizeOnChars []string `json:"tokenize_on_chars"` diff --git a/typedapi/types/checkpointing.go b/typedapi/types/checkpointing.go index c0b8cb830a..6f0c71109e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Checkpointing type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/get_transform_stats/types.ts#L85-L92 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/get_transform_stats/types.ts#L85-L92 type Checkpointing struct { ChangesLastDetectedAt *int64 `json:"changes_last_detected_at,omitempty"` ChangesLastDetectedAtDateTime DateTime `json:"changes_last_detected_at_date_time,omitempty"` diff --git a/typedapi/types/checkpointstats.go b/typedapi/types/checkpointstats.go index 27d28bccb1..87cdbcce36 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CheckpointStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/get_transform_stats/types.ts#L76-L83 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/get_transform_stats/types.ts#L76-L83 type CheckpointStats struct { Checkpoint int64 `json:"checkpoint"` CheckpointProgress *TransformProgress `json:"checkpoint_progress,omitempty"` diff --git a/typedapi/types/childrenaggregate.go b/typedapi/types/childrenaggregate.go index 44bd0c3d2e..802fae0257 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // ChildrenAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L783-L784 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L888-L892 type ChildrenAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *ChildrenAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/childrenaggregation.go b/typedapi/types/childrenaggregation.go index b2f1b14d72..416addd03c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ChildrenAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L113-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L121-L126 type ChildrenAggregation struct { // Type The child type that should be selected. Type *string `json:"type,omitempty"` diff --git a/typedapi/types/chineseanalyzer.go b/typedapi/types/chineseanalyzer.go new file mode 100644 index 0000000000..2e977159c2 --- /dev/null +++ b/typedapi/types/chineseanalyzer.go @@ -0,0 +1,113 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ChineseAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L109-L113 +type ChineseAnalyzer struct { + Stopwords []string `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` +} + +func (s *ChineseAnalyzer) 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": + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 ChineseAnalyzer) MarshalJSON() ([]byte, error) { + type innerChineseAnalyzer ChineseAnalyzer + tmp := innerChineseAnalyzer{ + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "chinese" + + return json.Marshal(tmp) +} + +// NewChineseAnalyzer returns a ChineseAnalyzer. +func NewChineseAnalyzer() *ChineseAnalyzer { + r := &ChineseAnalyzer{} + + return r +} diff --git a/typedapi/types/chisquareheuristic.go b/typedapi/types/chisquareheuristic.go index 3842cf16d9..b860b36700 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ChiSquareHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L737-L746 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/chunkingconfig.go b/typedapi/types/chunkingconfig.go index e3186c738d..73022db009 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // ChunkingConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Datafeed.ts#L238-L251 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/circleprocessor.go b/typedapi/types/circleprocessor.go index 06a022fb9d..71104120e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // CircleProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L410-L433 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L573-L596 type CircleProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/cjkanalyzer.go b/typedapi/types/cjkanalyzer.go new file mode 100644 index 0000000000..f2f2cd1fcd --- /dev/null +++ b/typedapi/types/cjkanalyzer.go @@ -0,0 +1,113 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CjkAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L115-L119 +type CjkAnalyzer struct { + Stopwords []string `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` +} + +func (s *CjkAnalyzer) 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": + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 CjkAnalyzer) MarshalJSON() ([]byte, error) { + type innerCjkAnalyzer CjkAnalyzer + tmp := innerCjkAnalyzer{ + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "cjk" + + return json.Marshal(tmp) +} + +// NewCjkAnalyzer returns a CjkAnalyzer. +func NewCjkAnalyzer() *CjkAnalyzer { + r := &CjkAnalyzer{} + + return r +} diff --git a/typedapi/types/classictokenizer.go b/typedapi/types/classictokenizer.go new file mode 100644 index 0000000000..a8d226c4aa --- /dev/null +++ b/typedapi/types/classictokenizer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ClassicTokenizer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L40-L46 +type ClassicTokenizer struct { + MaxTokenLength *int `json:"max_token_length,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *ClassicTokenizer) 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 "max_token_length": + + 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", "MaxTokenLength", err) + } + s.MaxTokenLength = &value + case float64: + f := int(v) + s.MaxTokenLength = &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) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s ClassicTokenizer) MarshalJSON() ([]byte, error) { + type innerClassicTokenizer ClassicTokenizer + tmp := innerClassicTokenizer{ + MaxTokenLength: s.MaxTokenLength, + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "classic" + + return json.Marshal(tmp) +} + +// NewClassicTokenizer returns a ClassicTokenizer. +func NewClassicTokenizer() *ClassicTokenizer { + r := &ClassicTokenizer{} + + return r +} diff --git a/typedapi/types/classificationinferenceoptions.go b/typedapi/types/classificationinferenceoptions.go index ad2dc0d04e..f15c5b3e38 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L93-L108 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L93-L108 type ClassificationInferenceOptions struct { // NumTopClasses Specifies the number of top class predictions to return. Defaults to 0. NumTopClasses *int `json:"num_top_classes,omitempty"` diff --git a/typedapi/types/cleanuprepositoryresults.go b/typedapi/types/cleanuprepositoryresults.go index 2f56a559a3..5c70cd5bb6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CleanupRepositoryResults type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L34 type CleanupRepositoryResults struct { // DeletedBlobs Number of binary large objects (blobs) removed during cleanup. DeletedBlobs int64 `json:"deleted_blobs"` diff --git a/typedapi/types/client.go b/typedapi/types/client.go index 8c4459473a..b6c7666bc8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Client type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L649-L696 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L720-L767 type Client struct { // Agent Reported agent for the HTTP client. // If unavailable, this property is not included in the response. diff --git a/typedapi/types/closeindexresult.go b/typedapi/types/closeindexresult.go index d0ec9c6ba3..ba78d754cc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CloseIndexResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/close/CloseIndexResponse.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/close/CloseIndexResponse.ts#L32-L35 type CloseIndexResult struct { Closed bool `json:"closed"` Shards map[string]CloseShardResult `json:"shards,omitempty"` diff --git a/typedapi/types/closeshardresult.go b/typedapi/types/closeshardresult.go index 1d1506c690..11e44190da 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // CloseShardResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/close/CloseIndexResponse.ts#L37-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/close/CloseIndexResponse.ts#L37-L39 type CloseShardResult struct { Failures []ShardFailure `json:"failures"` } diff --git a/typedapi/types/clusterappliedstats.go b/typedapi/types/clusterappliedstats.go index 67b22d663b..6edc9ae804 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ClusterAppliedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L221-L223 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L221-L223 type ClusterAppliedStats struct { Recordings []Recording `json:"recordings,omitempty"` } diff --git a/typedapi/types/clustercomponenttemplate.go b/typedapi/types/clustercomponenttemplate.go index 7d2b66e928..fb202e5e31 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ClusterComponentTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/_types/ComponentTemplate.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/_types/ComponentTemplate.ts#L27-L30 type ClusterComponentTemplate struct { ComponentTemplate ComponentTemplateNode `json:"component_template"` Name string `json:"name"` diff --git a/typedapi/types/clusterdetails.go b/typedapi/types/clusterdetails.go index eac4750f15..750a22c2c2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // ClusterDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L45-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L45-L52 type ClusterDetails struct { Failures []ShardFailure `json:"failures,omitempty"` Indices string `json:"indices"` diff --git a/typedapi/types/clusterfilesystem.go b/typedapi/types/clusterfilesystem.go index 137c64babc..1d46859980 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterFileSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L34-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L34-L49 type ClusterFileSystem struct { // AvailableInBytes Total number of bytes available to JVM in file stores across all selected // nodes. diff --git a/typedapi/types/clusterindexingpressure.go b/typedapi/types/clusterindexingpressure.go index 74ce82cab5..a2833352ae 100644 --- a/typedapi/types/clusterindexingpressure.go +++ b/typedapi/types/clusterindexingpressure.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ClusterIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L570-L572 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L570-L572 type ClusterIndexingPressure struct { Memory ClusterPressureMemory `json:"memory"` } diff --git a/typedapi/types/clusterindices.go b/typedapi/types/clusterindices.go index b6919380dc..e2163eb364 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterIndices type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L74-L107 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L74-L107 type ClusterIndices struct { // Analysis Contains statistics about analyzers and analyzer components used in selected // nodes. diff --git a/typedapi/types/clusterindicesshards.go b/typedapi/types/clusterindicesshards.go index 838d40cfe1..59790d16e5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterIndicesShards type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L60-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L60-L72 type ClusterIndicesShards struct { // Index Contains statistics about shards assigned to selected nodes. Index *ClusterIndicesShardsIndex `json:"index,omitempty"` diff --git a/typedapi/types/clusterindicesshardsindex.go b/typedapi/types/clusterindicesshardsindex.go index 5d527608d9..4aba6c365f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ClusterIndicesShardsIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L51-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L51-L58 type ClusterIndicesShardsIndex struct { // Primaries Contains statistics about the number of primary shards assigned to selected // nodes. diff --git a/typedapi/types/clusterinfo.go b/typedapi/types/clusterinfo.go index 0c858fc2b7..8025b7cd88 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ClusterInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L48-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/types.ts#L49-L55 type ClusterInfo struct { Nodes map[string]NodeDiskUsage `json:"nodes"` ReservedSizes []ReservedSize `json:"reserved_sizes"` diff --git a/typedapi/types/clusterinfotargets.go b/typedapi/types/clusterinfotargets.go index 00f4a974b8..6fc50c4a56 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ import ( // ClusterInfoTargets type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L389-L389 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L390-L390 type ClusterInfoTargets []clusterinfotarget.ClusterInfoTarget diff --git a/typedapi/types/clusteringest.go b/typedapi/types/clusteringest.go index 394809cd15..24e693caf6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L270-L273 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L270-L273 type ClusterIngest struct { NumberOfPipelines int `json:"number_of_pipelines"` ProcessorStats map[string]ClusterProcessor `json:"processor_stats"` diff --git a/typedapi/types/clusterjvm.go b/typedapi/types/clusterjvm.go index 2bf3fbfad7..e309fa8534 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterJvm type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L275-L292 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L275-L292 type ClusterJvm struct { // MaxUptimeInMillis Uptime duration, in milliseconds, since JVM last started. MaxUptimeInMillis int64 `json:"max_uptime_in_millis"` diff --git a/typedapi/types/clusterjvmmemory.go b/typedapi/types/clusterjvmmemory.go index 2afdfcd58c..8fee4df6f8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterJvmMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L294-L303 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L294-L303 type ClusterJvmMemory struct { // HeapMaxInBytes Maximum amount of memory, in bytes, available for use by the heap across all // selected nodes. diff --git a/typedapi/types/clusterjvmversion.go b/typedapi/types/clusterjvmversion.go index af528031cf..5043ee1484 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterJvmVersion type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L305-L335 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L305-L335 type ClusterJvmVersion struct { // BundledJdk Always `true`. All distributions come with a bundled Java Development Kit // (JDK). diff --git a/typedapi/types/clusternetworktypes.go b/typedapi/types/clusternetworktypes.go index c406feb99b..70d8602750 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ClusterNetworkTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L337-L346 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L337-L346 type ClusterNetworkTypes struct { // HttpTypes Contains statistics about the HTTP network types used by selected nodes. HttpTypes map[string]int `json:"http_types"` diff --git a/typedapi/types/clusternode.go b/typedapi/types/clusternode.go index 514e7998e1..9c127f6cdf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ClusterNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/ClusterNode.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/ClusterNode.ts#L22-L24 type ClusterNode struct { Name string `json:"name"` } diff --git a/typedapi/types/clusternodecount.go b/typedapi/types/clusternodecount.go index a9da7045cc..a5261a3bf6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterNodeCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L348-L367 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L348-L367 type ClusterNodeCount struct { CoordinatingOnly int `json:"coordinating_only"` Data int `json:"data"` diff --git a/typedapi/types/clusternodes.go b/typedapi/types/clusternodes.go index 6edb3c1d40..07ed528ee2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ClusterNodes type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L369-L402 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L369-L402 type ClusterNodes struct { // Count Contains counts for nodes selected by the request’s node filters. Count ClusterNodeCount `json:"count"` diff --git a/typedapi/types/clusteroperatingsystem.go b/typedapi/types/clusteroperatingsystem.go index cf3357ff77..ea453cfed9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L415-L442 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L415-L442 type ClusterOperatingSystem struct { // AllocatedProcessors Number of processors used to calculate thread pool size across all selected // nodes. diff --git a/typedapi/types/clusteroperatingsystemarchitecture.go b/typedapi/types/clusteroperatingsystemarchitecture.go index cc07cb904a..7b254164a5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemArchitecture type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L404-L413 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L404-L413 type ClusterOperatingSystemArchitecture struct { // Arch Name of an architecture used by one or more selected nodes. Arch string `json:"arch"` diff --git a/typedapi/types/clusteroperatingsystemname.go b/typedapi/types/clusteroperatingsystemname.go index 38783abd0b..12844ecf0b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemName type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L444-L453 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L444-L453 type ClusterOperatingSystemName struct { // Count Number of selected nodes using the operating system. Count int `json:"count"` diff --git a/typedapi/types/clusteroperatingsystemprettyname.go b/typedapi/types/clusteroperatingsystemprettyname.go index 7e33073185..7195694199 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemPrettyName type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L455-L464 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L455-L464 type ClusterOperatingSystemPrettyName struct { // Count Number of selected nodes using the operating system. Count int `json:"count"` diff --git a/typedapi/types/clusterpressurememory.go b/typedapi/types/clusterpressurememory.go index 451bae362f..c26a8b397d 100644 --- a/typedapi/types/clusterpressurememory.go +++ b/typedapi/types/clusterpressurememory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterPressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L574-L578 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L574-L578 type ClusterPressureMemory struct { Current IndexingPressureMemorySummary `json:"current"` LimitInBytes int64 `json:"limit_in_bytes"` diff --git a/typedapi/types/clusterprocess.go b/typedapi/types/clusterprocess.go index faa321eea8..a35051ae1c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ClusterProcess type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L466-L475 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L466-L475 type ClusterProcess struct { // Cpu Contains statistics about CPU used by selected nodes. Cpu ClusterProcessCpu `json:"cpu"` diff --git a/typedapi/types/clusterprocesscpu.go b/typedapi/types/clusterprocesscpu.go index 8bc7ec9bbc..2c2796aad3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterProcessCpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L477-L483 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L477-L483 type ClusterProcessCpu struct { // Percent Percentage of CPU used across all selected nodes. // Returns `-1` if not supported. diff --git a/typedapi/types/clusterprocessopenfiledescriptors.go b/typedapi/types/clusterprocessopenfiledescriptors.go index 91f137a22b..33cdb82b1f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterProcessOpenFileDescriptors type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L485-L501 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L485-L501 type ClusterProcessOpenFileDescriptors struct { // Avg Average number of concurrently open file descriptors. // Returns `-1` if not supported. diff --git a/typedapi/types/clusterprocessor.go b/typedapi/types/clusterprocessor.go index 2496edcd0a..73ebab4b23 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L503-L509 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L503-L509 type ClusterProcessor struct { Count int64 `json:"count"` Current int64 `json:"current"` diff --git a/typedapi/types/clusterremoteinfo.go b/typedapi/types/clusterremoteinfo.go index c5e67ab8c7..8b351175e6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // ClusterRemoteSniffInfo // ClusterRemoteProxyInfo // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L29-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L29-L30 type ClusterRemoteInfo any diff --git a/typedapi/types/clusterremoteproxyinfo.go b/typedapi/types/clusterremoteproxyinfo.go index d38c994060..5250c16527 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterRemoteProxyInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L42-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L42-L51 type ClusterRemoteProxyInfo struct { Connected bool `json:"connected"` InitialConnectTimeout Duration `json:"initial_connect_timeout"` diff --git a/typedapi/types/clusterremotesniffinfo.go b/typedapi/types/clusterremotesniffinfo.go index f123e27f61..7dfce8e1f2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterRemoteSniffInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L32-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L32-L40 type ClusterRemoteSniffInfo struct { Connected bool `json:"connected"` InitialConnectTimeout Duration `json:"initial_connect_timeout"` diff --git a/typedapi/types/clusterruntimefieldtypes.go b/typedapi/types/clusterruntimefieldtypes.go index 17f378f744..b2e7b322bd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterRuntimeFieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L169-L226 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L169-L226 type ClusterRuntimeFieldTypes struct { // CharsMax Maximum number of characters for a single runtime field script. CharsMax int `json:"chars_max"` diff --git a/typedapi/types/clustershardmetrics.go b/typedapi/types/clustershardmetrics.go index a30448367f..cd5f92b746 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterShardMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L511-L524 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L511-L524 type ClusterShardMetrics struct { // Avg Mean number of shards in an index, counting only shards assigned to selected // nodes. diff --git a/typedapi/types/clusterstatequeue.go b/typedapi/types/clusterstatequeue.go index 4b3eefeb00..d92932aec7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterStateQueue type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L248-L261 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L248-L261 type ClusterStateQueue struct { // Committed Number of committed cluster states in queue. Committed *int64 `json:"committed,omitempty"` diff --git a/typedapi/types/clusterstateupdate.go b/typedapi/types/clusterstateupdate.go index 3fe6aecaba..ebf09219b8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterStateUpdate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L278-L343 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L278-L343 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 diff --git a/typedapi/types/clusterstatistics.go b/typedapi/types/clusterstatistics.go index 5e3b92c6fd..1528febcea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ClusterStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L27-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L27-L35 type ClusterStatistics struct { Details map[string]ClusterDetails `json:"details,omitempty"` Failed int `json:"failed"` diff --git a/typedapi/types/collector.go b/typedapi/types/collector.go index 3778d0506b..88634faf1a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Collector type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L86-L91 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L94-L99 type Collector struct { Children []Collector `json:"children,omitempty"` Name string `json:"name"` diff --git a/typedapi/types/column.go b/typedapi/types/column.go index 75db9312ed..ab541d1a19 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Column type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/sql/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/sql/types.ts#L23-L26 type Column struct { Name string `json:"name"` Type string `json:"type"` diff --git a/typedapi/types/combinedfieldsquery.go b/typedapi/types/combinedfieldsquery.go index d60f804a30..8a96219ca4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // CombinedFieldsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/abstractions.ts#L465-L499 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/abstractions.ts#L465-L499 type CombinedFieldsQuery struct { // AutoGenerateSynonymsPhraseQuery If true, match phrase queries are automatically created for multi-term // synonyms. diff --git a/typedapi/types/command.go b/typedapi/types/command.go index 800db6e685..288c3098f3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Command type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/reroute/types.ts#L22-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/commandallocateprimaryaction.go b/typedapi/types/commandallocateprimaryaction.go index c948f0d5d4..3920225a1a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CommandAllocatePrimaryAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/reroute/types.ts#L78-L84 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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, diff --git a/typedapi/types/commandallocatereplicaaction.go b/typedapi/types/commandallocatereplicaaction.go index 36ca54c4bf..9593f0b5e1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CommandAllocateReplicaAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/reroute/types.ts#L69-L76 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/reroute/types.ts#L69-L76 type CommandAllocateReplicaAction struct { Index string `json:"index"` Node string `json:"node"` diff --git a/typedapi/types/commandcancelaction.go b/typedapi/types/commandcancelaction.go index e6d4234415..3cb634f205 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CommandCancelAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/reroute/types.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/reroute/types.ts#L45-L50 type CommandCancelAction struct { AllowPrimary *bool `json:"allow_primary,omitempty"` Index string `json:"index"` diff --git a/typedapi/types/commandmoveaction.go b/typedapi/types/commandmoveaction.go index 8e1f65f251..70ed9e519e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CommandMoveAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/reroute/types.ts#L60-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/reroute/types.ts#L60-L67 type CommandMoveAction struct { // FromNode The node to move the shard from FromNode string `json:"from_node"` diff --git a/typedapi/types/commoncatqueryparameters.go b/typedapi/types/commoncatqueryparameters.go index 9efc5506c9..a7559b1c7e 100644 --- a/typedapi/types/commoncatqueryparameters.go +++ b/typedapi/types/commoncatqueryparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CommonCatQueryParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_spec_utils/behaviors.ts#L86-L132 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_spec_utils/behaviors.ts#L86-L132 type CommonCatQueryParameters struct { // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. diff --git a/typedapi/types/commongramstokenfilter.go b/typedapi/types/commongramstokenfilter.go index 0d814b4f0b..bd16bf7481 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CommonGramsTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L175-L181 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L174-L180 type CommonGramsTokenFilter struct { CommonWords []string `json:"common_words,omitempty"` CommonWordsPath *string `json:"common_words_path,omitempty"` diff --git a/typedapi/types/commonqueryparameters.go b/typedapi/types/commonqueryparameters.go index ff2be6a10e..4b7bb460ea 100644 --- a/typedapi/types/commonqueryparameters.go +++ b/typedapi/types/commonqueryparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CommonQueryParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_spec_utils/behaviors.ts#L50-L84 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_spec_utils/behaviors.ts#L50-L84 type CommonQueryParameters struct { // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. diff --git a/typedapi/types/commontermsquery.go b/typedapi/types/commontermsquery.go index 21913d2dcc..cf279a00fd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // CommonTermsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L34-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/commontokenizationconfig.go b/typedapi/types/commontokenizationconfig.go new file mode 100644 index 0000000000..73c5cf84db --- /dev/null +++ b/typedapi/types/commontokenizationconfig.go @@ -0,0 +1,142 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tokenizationtruncate" +) + +// CommonTokenizationConfig type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L133-L159 +type CommonTokenizationConfig struct { + // DoLowerCase Should the tokenizer lower case the text + DoLowerCase *bool `json:"do_lower_case,omitempty"` + // MaxSequenceLength Maximum input sequence length for the model + MaxSequenceLength *int `json:"max_sequence_length,omitempty"` + // Span Tokenization spanning options. Special value of -1 indicates no spanning + // takes place + Span *int `json:"span,omitempty"` + // Truncate Should tokenization input be automatically truncated before sending to the + // model for inference + Truncate *tokenizationtruncate.TokenizationTruncate `json:"truncate,omitempty"` + // WithSpecialTokens Is tokenization completed with special tokens + WithSpecialTokens *bool `json:"with_special_tokens,omitempty"` +} + +func (s *CommonTokenizationConfig) 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 "do_lower_case": + 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", "DoLowerCase", err) + } + s.DoLowerCase = &value + case bool: + s.DoLowerCase = &v + } + + case "max_sequence_length": + + 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", "MaxSequenceLength", err) + } + s.MaxSequenceLength = &value + case float64: + f := int(v) + s.MaxSequenceLength = &f + } + + case "span": + + 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", "Span", err) + } + s.Span = &value + case float64: + f := int(v) + s.Span = &f + } + + case "truncate": + if err := dec.Decode(&s.Truncate); err != nil { + return fmt.Errorf("%s | %w", "Truncate", err) + } + + case "with_special_tokens": + 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", "WithSpecialTokens", err) + } + s.WithSpecialTokens = &value + case bool: + s.WithSpecialTokens = &v + } + + } + } + return nil +} + +// NewCommonTokenizationConfig returns a CommonTokenizationConfig. +func NewCommonTokenizationConfig() *CommonTokenizationConfig { + r := &CommonTokenizationConfig{} + + return r +} diff --git a/typedapi/types/communityidprocessor.go b/typedapi/types/communityidprocessor.go new file mode 100644 index 0000000000..c3f4327bb5 --- /dev/null +++ b/typedapi/types/communityidprocessor.go @@ -0,0 +1,233 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CommunityIDProcessor type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L598-L659 +type CommunityIDProcessor struct { + // Description Description of the processor. + // Useful for describing the purpose of the processor or its configuration. + Description *string `json:"description,omitempty"` + // DestinationIp Field containing the destination IP address. + DestinationIp *string `json:"destination_ip,omitempty"` + // DestinationPort Field containing the destination port. + DestinationPort *string `json:"destination_port,omitempty"` + // IanaNumber Field containing the IANA number. + IanaNumber *string `json:"iana_number,omitempty"` + // IcmpCode Field containing the ICMP code. + IcmpCode *string `json:"icmp_code,omitempty"` + // IcmpType Field containing the ICMP type. + IcmpType *string `json:"icmp_type,omitempty"` + // If Conditionally execute the processor. + If *string `json:"if,omitempty"` + // IgnoreFailure Ignore failures for the processor. + IgnoreFailure *bool `json:"ignore_failure,omitempty"` + // IgnoreMissing If true and any required fields are missing, the processor quietly exits + // without modifying the document. + IgnoreMissing *bool `json:"ignore_missing,omitempty"` + // OnFailure Handle failures for the processor. + OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // Seed Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The + // seed can prevent hash collisions between network domains, such as a staging + // and production network that use the same addressing scheme. + Seed *int `json:"seed,omitempty"` + // SourceIp Field containing the source IP address. + SourceIp *string `json:"source_ip,omitempty"` + // SourcePort Field containing the source port. + SourcePort *string `json:"source_port,omitempty"` + // Tag Identifier for the processor. + // Useful for debugging and metrics. + Tag *string `json:"tag,omitempty"` + // TargetField Output field for the community ID. + TargetField *string `json:"target_field,omitempty"` + // Transport Field containing the transport protocol name or number. Used only when the + // iana_number field is not present. The following protocol names are currently + // supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, + // udp + Transport *string `json:"transport,omitempty"` +} + +func (s *CommunityIDProcessor) 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 "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + case "destination_ip": + if err := dec.Decode(&s.DestinationIp); err != nil { + return fmt.Errorf("%s | %w", "DestinationIp", err) + } + + case "destination_port": + if err := dec.Decode(&s.DestinationPort); err != nil { + return fmt.Errorf("%s | %w", "DestinationPort", err) + } + + case "iana_number": + if err := dec.Decode(&s.IanaNumber); err != nil { + return fmt.Errorf("%s | %w", "IanaNumber", err) + } + + case "icmp_code": + if err := dec.Decode(&s.IcmpCode); err != nil { + return fmt.Errorf("%s | %w", "IcmpCode", err) + } + + case "icmp_type": + if err := dec.Decode(&s.IcmpType); err != nil { + return fmt.Errorf("%s | %w", "IcmpType", err) + } + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "ignore_failure": + 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", "IgnoreFailure", err) + } + s.IgnoreFailure = &value + case bool: + s.IgnoreFailure = &v + } + + case "ignore_missing": + 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", "IgnoreMissing", err) + } + s.IgnoreMissing = &value + case bool: + s.IgnoreMissing = &v + } + + case "on_failure": + if err := dec.Decode(&s.OnFailure); err != nil { + return fmt.Errorf("%s | %w", "OnFailure", err) + } + + case "seed": + + 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", "Seed", err) + } + s.Seed = &value + case float64: + f := int(v) + s.Seed = &f + } + + case "source_ip": + if err := dec.Decode(&s.SourceIp); err != nil { + return fmt.Errorf("%s | %w", "SourceIp", err) + } + + case "source_port": + if err := dec.Decode(&s.SourcePort); err != nil { + return fmt.Errorf("%s | %w", "SourcePort", err) + } + + case "tag": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Tag", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Tag = &o + + case "target_field": + if err := dec.Decode(&s.TargetField); err != nil { + return fmt.Errorf("%s | %w", "TargetField", err) + } + + case "transport": + if err := dec.Decode(&s.Transport); err != nil { + return fmt.Errorf("%s | %w", "Transport", err) + } + + } + } + return nil +} + +// NewCommunityIDProcessor returns a CommunityIDProcessor. +func NewCommunityIDProcessor() *CommunityIDProcessor { + r := &CommunityIDProcessor{} + + return r +} diff --git a/typedapi/types/compactnodeinfo.go b/typedapi/types/compactnodeinfo.go index 160f43317f..75584faa52 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // CompactNodeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L27-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L27-L29 type CompactNodeInfo struct { Name string `json:"name"` } diff --git a/typedapi/types/completioncontext.go b/typedapi/types/completioncontext.go index eb6a03a4a4..d881158cfb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CompletionContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L235-L264 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L235-L264 type CompletionContext struct { // Boost The factor by which the score of the suggestion should be boosted. // The score is computed by multiplying the boost with the suggestion weight. diff --git a/typedapi/types/completionproperty.go b/typedapi/types/completionproperty.go index 20ef376d1e..05d1b875f2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // CompletionProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/specialized.ts#L33-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/specialized.ts#L33-L41 type CompletionProperty struct { Analyzer *string `json:"analyzer,omitempty"` Contexts []SuggestContext `json:"contexts,omitempty"` @@ -49,7 +49,6 @@ type CompletionProperty struct { PreserveSeparators *bool `json:"preserve_separators,omitempty"` Properties map[string]Property `json:"properties,omitempty"` SearchAnalyzer *string `json:"search_analyzer,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -839,18 +838,6 @@ func (s *CompletionProperty) UnmarshalJSON(data []byte) error { } s.SearchAnalyzer = &o - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -892,7 +879,6 @@ func (s CompletionProperty) MarshalJSON() ([]byte, error) { PreserveSeparators: s.PreserveSeparators, Properties: s.Properties, SearchAnalyzer: s.SearchAnalyzer, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/completionresult.go b/typedapi/types/completionresult.go index 11e7e1c292..5713819ea4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CompletionResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/_types/Results.ts#L60-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/_types/Results.ts#L60-L65 type CompletionResult struct { Result string `json:"result"` } diff --git a/typedapi/types/completionstats.go b/typedapi/types/completionstats.go index 178d74a935..d5d164da8b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CompletionStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L80-L90 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L80-L90 type CompletionStats struct { Fields map[string]FieldSizeUsage `json:"fields,omitempty"` // Size Total amount of memory used for completion across all shards assigned to diff --git a/typedapi/types/completionsuggest.go b/typedapi/types/completionsuggest.go index e832422cbb..fe89bd6e9d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CompletionSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L48-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L48-L55 type CompletionSuggest struct { Length int `json:"length"` Offset int `json:"offset"` diff --git a/typedapi/types/completionsuggester.go b/typedapi/types/completionsuggester.go index 434cf876b5..2584a17ee4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CompletionSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L163-L181 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L163-L181 type CompletionSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. diff --git a/typedapi/types/completionsuggestoption.go b/typedapi/types/completionsuggestoption.go index e6caaa7a29..b5dda6daf2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CompletionSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L73-L84 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L73-L84 type CompletionSuggestOption struct { CollateMatch *bool `json:"collate_match,omitempty"` Contexts map[string][]Context `json:"contexts,omitempty"` diff --git a/typedapi/types/componenttemplatenode.go b/typedapi/types/componenttemplatenode.go index adcaec6ec9..4961344437 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ComponentTemplateNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/_types/ComponentTemplate.ts#L35-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/_types/ComponentTemplate.ts#L32-L37 type ComponentTemplateNode struct { Meta_ Metadata `json:"_meta,omitempty"` Template ComponentTemplateSummary `json:"template"` diff --git a/typedapi/types/componenttemplatesummary.go b/typedapi/types/componenttemplatesummary.go index ff8baa5eab..943b314577 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ComponentTemplateSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/_types/ComponentTemplate.ts#L42-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/_types/ComponentTemplate.ts#L39-L51 type ComponentTemplateSummary struct { Aliases map[string]AliasDefinition `json:"aliases,omitempty"` Lifecycle *DataStreamLifecycleWithRollover `json:"lifecycle,omitempty"` diff --git a/typedapi/types/compositeaggregate.go b/typedapi/types/compositeaggregate.go index b99ea3bdb2..eae19ae28c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // CompositeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L622-L627 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L698-L703 type CompositeAggregate struct { AfterKey CompositeAggregateKey `json:"after_key,omitempty"` Buckets BucketsCompositeBucket `json:"buckets"` diff --git a/typedapi/types/compositeaggregatekey.go b/typedapi/types/compositeaggregatekey.go index e7647b254a..c9823fcb37 100644 --- a/typedapi/types/compositeaggregatekey.go +++ b/typedapi/types/compositeaggregatekey.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // CompositeAggregateKey type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L120-L120 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L128-L128 type CompositeAggregateKey map[string]FieldValue diff --git a/typedapi/types/compositeaggregation.go b/typedapi/types/compositeaggregation.go index dfb5844a20..3e1bef89d7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CompositeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L122-L138 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/compositeaggregationsource.go b/typedapi/types/compositeaggregationsource.go index e74a39bfb3..d5b9824a54 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // CompositeAggregationSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L140-L157 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L151-L168 type CompositeAggregationSource struct { // DateHistogram A date histogram aggregation. DateHistogram *CompositeDateHistogramAggregation `json:"date_histogram,omitempty"` diff --git a/typedapi/types/compositebucket.go b/typedapi/types/compositebucket.go index f7440a3ade..3d4e1dab02 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // CompositeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L629-L631 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L705-L707 type CompositeBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *CompositeBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/compositedatehistogramaggregation.go b/typedapi/types/compositedatehistogramaggregation.go index 53c6e3d3e4..8d3ca4ef4b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // CompositeDateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L176-L184 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/compositegeotilegridaggregation.go b/typedapi/types/compositegeotilegridaggregation.go index da2a7be1d7..5270b95a42 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // CompositeGeoTileGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L186-L189 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L197-L200 type CompositeGeoTileGridAggregation struct { Bounds GeoBounds `json:"bounds,omitempty"` // Field Either `field` or `script` must be present diff --git a/typedapi/types/compositehistogramaggregation.go b/typedapi/types/compositehistogramaggregation.go index 90db1da0d4..382f74face 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // CompositeHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L172-L174 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L183-L185 type CompositeHistogramAggregation struct { // Field Either `field` or `script` must be present Field *string `json:"field,omitempty"` diff --git a/typedapi/types/compositesubfield.go b/typedapi/types/compositesubfield.go new file mode 100644 index 0000000000..c96846c1eb --- /dev/null +++ b/typedapi/types/compositesubfield.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/runtimefieldtype" +) + +// CompositeSubField type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/RuntimeFields.ts#L52-L54 +type CompositeSubField struct { + Type runtimefieldtype.RuntimeFieldType `json:"type"` +} + +// NewCompositeSubField returns a CompositeSubField. +func NewCompositeSubField() *CompositeSubField { + r := &CompositeSubField{} + + return r +} diff --git a/typedapi/types/compositetermsaggregation.go b/typedapi/types/compositetermsaggregation.go index e3e9532408..1c1873c8b7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // CompositeTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L170-L170 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L181-L181 type CompositeTermsAggregation struct { // Field Either `field` or `script` must be present Field *string `json:"field,omitempty"` diff --git a/typedapi/types/conditiontokenfilter.go b/typedapi/types/conditiontokenfilter.go index 3988f9be61..7ca656ffcf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ConditionTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L183-L187 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L182-L186 type ConditionTokenFilter struct { Filter []string `json:"filter"` Script Script `json:"script"` diff --git a/typedapi/types/configuration.go b/typedapi/types/configuration.go index e8eee95679..3587a70c58 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Configuration type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/_types/SnapshotLifecycle.ts#L99-L129 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/_types/SnapshotLifecycle.ts#L99-L129 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 diff --git a/typedapi/types/confusionmatrixitem.go b/typedapi/types/confusionmatrixitem.go index 627145ce5d..03c0086665 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L125-L130 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L125-L130 type ConfusionMatrixItem struct { ActualClass string `json:"actual_class"` ActualClassDocCount int `json:"actual_class_doc_count"` diff --git a/typedapi/types/confusionmatrixprediction.go b/typedapi/types/confusionmatrixprediction.go index 9d41088022..725389dee7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixPrediction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L132-L135 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L132-L135 type ConfusionMatrixPrediction struct { Count int `json:"count"` PredictedClass string `json:"predicted_class"` diff --git a/typedapi/types/confusionmatrixthreshold.go b/typedapi/types/confusionmatrixthreshold.go index 00501fc320..994fd87c3d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixThreshold type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L137-L158 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L137-L158 type ConfusionMatrixThreshold struct { // FalseNegative False Negative FalseNegative int `json:"fn"` diff --git a/typedapi/types/connection.go b/typedapi/types/connection.go index fa5e315871..d5418a2622 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Connection type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/graph/_types/Connection.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/graph/_types/Connection.ts#L22-L27 type Connection struct { DocCount int64 `json:"doc_count"` Source int64 `json:"source"` diff --git a/typedapi/types/connector.go b/typedapi/types/connector.go index 333929a9a3..0620ee2247 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // Connector type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L237-L268 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L237-L268 type Connector struct { ApiKeyId *string `json:"api_key_id,omitempty"` ApiKeySecretId *string `json:"api_key_secret_id,omitempty"` diff --git a/typedapi/types/connectorconfigproperties.go b/typedapi/types/connectorconfigproperties.go index 47d5e1b256..52ce4d1a9a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // ConnectorConfigProperties type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L83-L99 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L83-L99 type ConnectorConfigProperties struct { Category *string `json:"category,omitempty"` DefaultValue ScalarValue `json:"default_value"` diff --git a/typedapi/types/connectorconfiguration.go b/typedapi/types/connectorconfiguration.go index 34c23de760..81797b07c1 100644 --- a/typedapi/types/connectorconfiguration.go +++ b/typedapi/types/connectorconfiguration.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ConnectorConfiguration type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L101-L104 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L101-L104 type ConnectorConfiguration map[string]ConnectorConfigProperties diff --git a/typedapi/types/connectorcustomscheduling.go b/typedapi/types/connectorcustomscheduling.go index 3dbbbb1c4a..a2c014761a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ConnectorCustomScheduling type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L128-L128 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 48c06c4ca2..32c2af9022 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ConnectorFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L224-L229 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L224-L229 type ConnectorFeatures struct { DocumentLevelSecurity *FeatureEnabled `json:"document_level_security,omitempty"` IncrementalSync *FeatureEnabled `json:"incremental_sync,omitempty"` diff --git a/typedapi/types/connectorscheduling.go b/typedapi/types/connectorscheduling.go index 8f21fedaca..f26cb0a850 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ConnectorScheduling type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L106-L110 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L106-L110 type ConnectorScheduling struct { Enabled bool `json:"enabled"` // Interval The interval is expressed using the crontab syntax diff --git a/typedapi/types/connectorsyncjob.go b/typedapi/types/connectorsyncjob.go index 261c60d64b..8268d4f14c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // ConnectorSyncJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/SyncJob.ts#L53-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/SyncJob.ts#L53-L72 type ConnectorSyncJob struct { CancelationRequestedAt DateTime `json:"cancelation_requested_at,omitempty"` CanceledAt DateTime `json:"canceled_at,omitempty"` diff --git a/typedapi/types/constantkeywordproperty.go b/typedapi/types/constantkeywordproperty.go index efd2691ad8..f0185cf9d7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // ConstantKeywordProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/specialized.ts#L50-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/specialized.ts#L50-L53 type ConstantKeywordProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/constantscorequery.go b/typedapi/types/constantscorequery.go index d8af2ef08a..88a9e7f6f0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ConstantScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L70-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/context.go b/typedapi/types/context.go index 021b4a28af..dd8b1485b7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // GeoLocation // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L228-L233 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L228-L233 type Context any diff --git a/typedapi/types/contextmethod.go b/typedapi/types/contextmethod.go index 8fa7fe7e35..067e98d5bf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ContextMethod type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/get_script_context/types.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/get_script_context/types.ts#L27-L31 type ContextMethod struct { Name string `json:"name"` Params []ContextMethodParam `json:"params"` diff --git a/typedapi/types/contextmethodparam.go b/typedapi/types/contextmethodparam.go index 98051bff18..95b1f37abd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ContextMethodParam type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/get_script_context/types.ts#L33-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/get_script_context/types.ts#L33-L36 type ContextMethodParam struct { Name string `json:"name"` Type string `json:"type"` diff --git a/typedapi/types/convertprocessor.go b/typedapi/types/convertprocessor.go index 5c660d4375..4923761920 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // ConvertProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L445-L465 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L672-L692 type ConvertProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/coordinatorstats.go b/typedapi/types/coordinatorstats.go index ad82c6b23c..e656756616 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CoordinatorStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/stats/types.ts#L29-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/enrich/stats/types.ts#L30-L36 type CoordinatorStats struct { ExecutedSearchesTotal int64 `json:"executed_searches_total"` NodeId string `json:"node_id"` diff --git a/typedapi/types/coordsgeobounds.go b/typedapi/types/coordsgeobounds.go index 0d81bd7a85..b6e4cfe042 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CoordsGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L154-L159 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Geo.ts#L154-L159 type CoordsGeoBounds struct { Bottom Float64 `json:"bottom"` Left Float64 `json:"left"` diff --git a/typedapi/types/coreknnquery.go b/typedapi/types/coreknnquery.go index 574a318c89..11e9498faf 100644 --- a/typedapi/types/coreknnquery.go +++ b/typedapi/types/coreknnquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CoreKnnQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/knn_search/_types/Knn.ts#L24-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/knn_search/_types/Knn.ts#L24-L33 type CoreKnnQuery struct { // Field The name of the vector field to search against Field string `json:"field"` diff --git a/typedapi/types/counter.go b/typedapi/types/counter.go index 65f4278117..91cded92ea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Counter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L35-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L33-L36 type Counter struct { Active int64 `json:"active"` Total int64 `json:"total"` diff --git a/typedapi/types/countrecord.go b/typedapi/types/countrecord.go index 199c9cf113..f24fd22c49 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CountRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/count/types.ts#L23-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/count/types.ts#L23-L39 type CountRecord struct { // Count the document count Count *string `json:"count,omitempty"` diff --git a/typedapi/types/cpu.go b/typedapi/types/cpu.go index d6b162f634..a58d3ae122 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Cpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L539-L548 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L575-L584 type Cpu struct { LoadAverage map[string]Float64 `json:"load_average,omitempty"` Percent *int `json:"percent,omitempty"` diff --git a/typedapi/types/cpuacct.go b/typedapi/types/cpuacct.go index 40c0c1a5f5..a58eaa6e7e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CpuAcct type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L476-L485 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L512-L521 type CpuAcct struct { // ControlGroup The `cpuacct` control group to which the Elasticsearch process belongs. ControlGroup *string `json:"control_group,omitempty"` diff --git a/typedapi/types/createdstatus.go b/typedapi/types/createdstatus.go index d5c9f88737..a566cb2b18 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CreatedStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/CreatedStatus.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/CreatedStatus.ts#L20-L22 type CreatedStatus struct { Created bool `json:"created"` } diff --git a/typedapi/types/createoperation.go b/typedapi/types/createoperation.go index 0f1e094701..44b863b988 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // CreateOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/bulk/types.ts#L130-L130 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/bulk/types.ts#L130-L130 type CreateOperation struct { // DynamicTemplates A map from the full name of fields to the name of dynamic templates. // Defaults to an empty map. diff --git a/typedapi/types/csvprocessor.go b/typedapi/types/csvprocessor.go index 411c75bc22..40749bdb1f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CsvProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L467-L500 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L694-L727 type CsvProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/cumulativecardinalityaggregate.go b/typedapi/types/cumulativecardinalityaggregate.go index d86ebf103b..366ad8a337 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CumulativeCardinalityAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L754-L762 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L856-L864 type CumulativeCardinalityAggregate struct { Meta Metadata `json:"meta,omitempty"` Value int64 `json:"value"` diff --git a/typedapi/types/cumulativecardinalityaggregation.go b/typedapi/types/cumulativecardinalityaggregation.go index 9c2ff53d5f..8e9069c8e1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // CumulativeCardinalityAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L192-L192 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/cumulativesumaggregation.go b/typedapi/types/cumulativesumaggregation.go index bbc4f92eed..2a15ef89a6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // CumulativeSumAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L194-L194 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/currentnode.go b/typedapi/types/currentnode.go index 422bef6547..a1af8f62e6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -27,17 +27,20 @@ import ( "fmt" "io" "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/noderole" ) // CurrentNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L78-L84 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/types.ts#L79-L90 type CurrentNode struct { - Attributes map[string]string `json:"attributes"` - Id string `json:"id"` - Name string `json:"name"` - TransportAddress string `json:"transport_address"` - WeightRanking int `json:"weight_ranking"` + Attributes map[string]string `json:"attributes"` + Id string `json:"id"` + Name string `json:"name"` + Roles []noderole.NodeRole `json:"roles"` + TransportAddress string `json:"transport_address"` + WeightRanking int `json:"weight_ranking"` } func (s *CurrentNode) UnmarshalJSON(data []byte) error { @@ -73,6 +76,11 @@ func (s *CurrentNode) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Name", err) } + case "roles": + if err := dec.Decode(&s.Roles); err != nil { + return fmt.Errorf("%s | %w", "Roles", err) + } + case "transport_address": if err := dec.Decode(&s.TransportAddress); err != nil { return fmt.Errorf("%s | %w", "TransportAddress", err) diff --git a/typedapi/types/customanalyzer.go b/typedapi/types/customanalyzer.go index bc27355748..a6c736fe16 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CustomAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L28-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L28-L35 type CustomAnalyzer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` @@ -57,13 +57,35 @@ func (s *CustomAnalyzer) UnmarshalJSON(data []byte) error { switch t { case "char_filter": - if err := dec.Decode(&s.CharFilter); err != nil { - return fmt.Errorf("%s | %w", "CharFilter", 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", "CharFilter", err) + } + + s.CharFilter = append(s.CharFilter, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.CharFilter); err != nil { + return fmt.Errorf("%s | %w", "CharFilter", err) + } } case "filter": - if err := dec.Decode(&s.Filter); err != nil { - return fmt.Errorf("%s | %w", "Filter", 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", "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 "position_increment_gap": diff --git a/typedapi/types/customcategorizetextanalyzer.go b/typedapi/types/customcategorizetextanalyzer.go index dfd46db430..3790553dc1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CustomCategorizeTextAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L1116-L1120 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L1189-L1193 type CustomCategorizeTextAnalyzer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` diff --git a/typedapi/types/customnormalizer.go b/typedapi/types/customnormalizer.go index 821ba4c3e5..ce31dbc7a4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // CustomNormalizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/normalizers.ts#L30-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/normalizers.ts#L30-L34 type CustomNormalizer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` diff --git a/typedapi/types/customscheduling.go b/typedapi/types/customscheduling.go index 1696869bea..5b31eba4e8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CustomScheduling type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L120-L126 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L120-L126 type CustomScheduling struct { ConfigurationOverrides CustomSchedulingConfigurationOverrides `json:"configuration_overrides"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/customschedulingconfigurationoverrides.go b/typedapi/types/customschedulingconfigurationoverrides.go index 92bad17bac..4b29aa3b90 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // CustomSchedulingConfigurationOverrides type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L112-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L112-L118 type CustomSchedulingConfigurationOverrides struct { DomainAllowlist []string `json:"domain_allowlist,omitempty"` MaxCrawlDepth *int `json:"max_crawl_depth,omitempty"` diff --git a/typedapi/types/czechanalyzer.go b/typedapi/types/czechanalyzer.go new file mode 100644 index 0000000000..137b92c57b --- /dev/null +++ b/typedapi/types/czechanalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CzechAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L121-L126 +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"` +} + +func (s *CzechAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 CzechAnalyzer) MarshalJSON() ([]byte, error) { + type innerCzechAnalyzer CzechAnalyzer + tmp := innerCzechAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "czech" + + return json.Marshal(tmp) +} + +// NewCzechAnalyzer returns a CzechAnalyzer. +func NewCzechAnalyzer() *CzechAnalyzer { + r := &CzechAnalyzer{} + + return r +} diff --git a/typedapi/types/dailyschedule.go b/typedapi/types/dailyschedule.go index 56133cc173..8399a9b408 100644 --- a/typedapi/types/dailyschedule.go +++ b/typedapi/types/dailyschedule.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DailySchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Schedule.ts#L33-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Schedule.ts#L33-L35 type DailySchedule struct { At []ScheduleTimeOfDay `json:"at"` } diff --git a/typedapi/types/danglingindex.go b/typedapi/types/danglingindex.go index 62b8d64077..94f79760de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DanglingIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L29-L34 type DanglingIndex struct { CreationDateMillis int64 `json:"creation_date_millis"` IndexName string `json:"index_name"` diff --git a/typedapi/types/danishanalyzer.go b/typedapi/types/danishanalyzer.go new file mode 100644 index 0000000000..67b7b24eaa --- /dev/null +++ b/typedapi/types/danishanalyzer.go @@ -0,0 +1,113 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DanishAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L128-L132 +type DanishAnalyzer struct { + Stopwords []string `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` +} + +func (s *DanishAnalyzer) 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": + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 DanishAnalyzer) MarshalJSON() ([]byte, error) { + type innerDanishAnalyzer DanishAnalyzer + tmp := innerDanishAnalyzer{ + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "danish" + + return json.Marshal(tmp) +} + +// NewDanishAnalyzer returns a DanishAnalyzer. +func NewDanishAnalyzer() *DanishAnalyzer { + r := &DanishAnalyzer{} + + return r +} diff --git a/typedapi/types/databaseconfiguration.go b/typedapi/types/databaseconfiguration.go new file mode 100644 index 0000000000..47ade9a4dc --- /dev/null +++ b/typedapi/types/databaseconfiguration.go @@ -0,0 +1,80 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// DatabaseConfiguration type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Database.ts#L22-L29 +type DatabaseConfiguration struct { + // Maxmind The configuration necessary to identify which IP geolocation provider to use + // to download the database, as well as any provider-specific configuration + // necessary for such downloading. + // At present, the only supported provider is maxmind, and the maxmind provider + // requires that an account_id (string) is configured. + Maxmind Maxmind `json:"maxmind"` + // Name The provider-assigned name of the IP geolocation database to download. + Name string `json:"name"` +} + +func (s *DatabaseConfiguration) 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 "maxmind": + if err := dec.Decode(&s.Maxmind); err != nil { + return fmt.Errorf("%s | %w", "Maxmind", err) + } + + case "name": + if err := dec.Decode(&s.Name); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + + } + } + return nil +} + +// NewDatabaseConfiguration returns a DatabaseConfiguration. +func NewDatabaseConfiguration() *DatabaseConfiguration { + r := &DatabaseConfiguration{} + + return r +} diff --git a/typedapi/types/databaseconfigurationmetadata.go b/typedapi/types/databaseconfigurationmetadata.go new file mode 100644 index 0000000000..3ff9528e95 --- /dev/null +++ b/typedapi/types/databaseconfigurationmetadata.go @@ -0,0 +1,97 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DatabaseConfigurationMetadata type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L29-L34 +type DatabaseConfigurationMetadata struct { + Database DatabaseConfiguration `json:"database"` + Id string `json:"id"` + ModifiedDateMillis int64 `json:"modified_date_millis"` + Version int64 `json:"version"` +} + +func (s *DatabaseConfigurationMetadata) 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 "database": + if err := dec.Decode(&s.Database); err != nil { + return fmt.Errorf("%s | %w", "Database", err) + } + + case "id": + if err := dec.Decode(&s.Id); err != nil { + return fmt.Errorf("%s | %w", "Id", err) + } + + case "modified_date_millis": + if err := dec.Decode(&s.ModifiedDateMillis); err != nil { + return fmt.Errorf("%s | %w", "ModifiedDateMillis", err) + } + + case "version": + 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", "Version", err) + } + s.Version = value + case float64: + f := int64(v) + s.Version = f + } + + } + } + return nil +} + +// NewDatabaseConfigurationMetadata returns a DatabaseConfigurationMetadata. +func NewDatabaseConfigurationMetadata() *DatabaseConfigurationMetadata { + r := &DatabaseConfigurationMetadata{} + + return r +} diff --git a/typedapi/types/datacounts.go b/typedapi/types/datacounts.go index a3aea15850..8c2ea470de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Job.ts#L352-L372 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Job.ts#L352-L372 type DataCounts struct { BucketCount int64 `json:"bucket_count"` EarliestRecordTimestamp *int64 `json:"earliest_record_timestamp,omitempty"` diff --git a/typedapi/types/datadescription.go b/typedapi/types/datadescription.go index b6414c3a69..36606a36c5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataDescription type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Job.ts#L374-L390 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/dataemailattachment.go b/typedapi/types/dataemailattachment.go index 1e1b14cf4a..b2697aff53 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // DataEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L234-L236 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L234-L236 type DataEmailAttachment struct { Format *dataattachmentformat.DataAttachmentFormat `json:"format,omitempty"` } diff --git a/typedapi/types/datafeedauthorization.go b/typedapi/types/datafeedauthorization.go index 4e6775fbea..f72f42a318 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DatafeedAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Authorization.ts#L31-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/datafeedconfig.go b/typedapi/types/datafeedconfig.go index c00df989fa..fb1d5afb49 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DatafeedConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Datafeed.ts#L59-L116 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/datafeedrunningstate.go b/typedapi/types/datafeedrunningstate.go index 70ce741c41..d9faf785f5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DatafeedRunningState type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Datafeed.ts#L197-L211 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/datafeeds.go b/typedapi/types/datafeeds.go index ec7b96555f..2f70df1acc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Datafeeds type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/info/types.ts#L40-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/info/types.ts#L42-L44 type Datafeeds struct { ScrollSize int `json:"scroll_size"` } diff --git a/typedapi/types/datafeedsrecord.go b/typedapi/types/datafeedsrecord.go index 1c73474bca..c3fbb57884 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DatafeedsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/ml_datafeeds/types.ts#L22-L87 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/datafeedstats.go b/typedapi/types/datafeedstats.go index 95bc891dc0..698ebe0a89 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DatafeedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Datafeed.ts#L139-L168 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Datafeed.ts#L143-L172 type DatafeedStats struct { // AssignmentExplanation For started datafeeds only, contains messages relating to the selection of a // node. @@ -45,7 +45,7 @@ type DatafeedStats struct { DatafeedId string `json:"datafeed_id"` // Node For started datafeeds only, this information pertains to the node upon which // the datafeed is started. - Node *DiscoveryNode `json:"node,omitempty"` + Node *DiscoveryNodeCompact `json:"node,omitempty"` // RunningState An object containing the running state for this datafeed. // It is only provided if the datafeed is started. RunningState *DatafeedRunningState `json:"running_state,omitempty"` @@ -54,7 +54,7 @@ type DatafeedStats struct { State datafeedstate.DatafeedState `json:"state"` // TimingStats An object that provides statistical information about timing aspect of this // datafeed. - TimingStats DatafeedTimingStats `json:"timing_stats"` + TimingStats *DatafeedTimingStats `json:"timing_stats,omitempty"` } func (s *DatafeedStats) UnmarshalJSON(data []byte) error { diff --git a/typedapi/types/datafeedtimingstats.go b/typedapi/types/datafeedtimingstats.go index c0fbb60349..6bc6d910c1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,12 +31,13 @@ import ( // DatafeedTimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Datafeed.ts#L170-L195 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` // BucketCount The number of buckets processed. - BucketCount int64 `json:"bucket_count"` + BucketCount int64 `json:"bucket_count"` + ExponentialAverageCalculationContext *ExponentialAverageCalculationContext `json:"exponential_average_calculation_context,omitempty"` // ExponentialAverageSearchTimePerHourMs The exponential average search time per hour, in milliseconds. ExponentialAverageSearchTimePerHourMs Float64 `json:"exponential_average_search_time_per_hour_ms"` // JobId Identifier for the anomaly detection job. @@ -82,6 +83,11 @@ func (s *DatafeedTimingStats) UnmarshalJSON(data []byte) error { s.BucketCount = f } + case "exponential_average_calculation_context": + if err := dec.Decode(&s.ExponentialAverageCalculationContext); err != nil { + return fmt.Errorf("%s | %w", "ExponentialAverageCalculationContext", err) + } + case "exponential_average_search_time_per_hour_ms": if err := dec.Decode(&s.ExponentialAverageSearchTimePerHourMs); err != nil { return fmt.Errorf("%s | %w", "ExponentialAverageSearchTimePerHourMs", err) diff --git a/typedapi/types/dataframeanalysis.go b/typedapi/types/dataframeanalysis.go index 61ddb5d19a..d7fa4e8126 100644 --- a/typedapi/types/dataframeanalysis.go +++ b/typedapi/types/dataframeanalysis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysis type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L134-L213 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeAnalytics.ts#L134-L213 type DataframeAnalysis struct { // Alpha Advanced configuration option. Machine learning uses loss guided tree // growing, which means that the decision trees grow where the regularized loss diff --git a/typedapi/types/dataframeanalysisanalyzedfields.go b/typedapi/types/dataframeanalysisanalyzedfields.go index 73506cddab..c55edc7992 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataframeAnalysisAnalyzedFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L238-L244 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/dataframeanalysisclassification.go b/typedapi/types/dataframeanalysisclassification.go index a851ac93f5..ab7dbc8c94 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L227-L236 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/dataframeanalysiscontainer.go b/typedapi/types/dataframeanalysiscontainer.go index c4a213217e..7ff4174cfe 100644 --- a/typedapi/types/dataframeanalysiscontainer.go +++ b/typedapi/types/dataframeanalysiscontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DataframeAnalysisContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L84-L101 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeAnalytics.ts#L84-L101 type DataframeAnalysisContainer struct { // Classification The configuration information necessary to perform classification. Classification *DataframeAnalysisClassification `json:"classification,omitempty"` diff --git a/typedapi/types/dataframeanalysisfeatureprocessor.go b/typedapi/types/dataframeanalysisfeatureprocessor.go index 502064fa1f..f57788b0ae 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessor.go +++ b/typedapi/types/dataframeanalysisfeatureprocessor.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DataframeAnalysisFeatureProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L246-L258 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeAnalytics.ts#L246-L258 type DataframeAnalysisFeatureProcessor struct { // FrequencyEncoding The configuration information necessary to perform frequency encoding. FrequencyEncoding *DataframeAnalysisFeatureProcessorFrequencyEncoding `json:"frequency_encoding,omitempty"` diff --git a/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go b/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go index ab19f37459..3bd1506913 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataframeAnalysisFeatureProcessorFrequencyEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L260-L267 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeAnalytics.ts#L260-L267 type DataframeAnalysisFeatureProcessorFrequencyEncoding struct { // FeatureName The resulting feature name. FeatureName string `json:"feature_name"` diff --git a/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go b/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go index ffe323895c..29ecc21c69 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DataframeAnalysisFeatureProcessorMultiEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L269-L272 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go b/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go index c616d7d7e2..91c563736c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorNGramEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L274-L286 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeAnalytics.ts#L274-L286 type DataframeAnalysisFeatureProcessorNGramEncoding struct { Custom *bool `json:"custom,omitempty"` // FeaturePrefix The feature name prefix. Defaults to ngram__. diff --git a/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go b/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go index 3865b22af6..3c6fdfc83c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorOneHotEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L288-L293 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeAnalytics.ts#L288-L293 type DataframeAnalysisFeatureProcessorOneHotEncoding struct { // Field The name of the field to encode. Field string `json:"field"` diff --git a/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go b/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go index 2798a3f71b..ebeb62a240 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorTargetMeanEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L295-L304 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/dataframeanalysisoutlierdetection.go b/typedapi/types/dataframeanalysisoutlierdetection.go index aa4325cd8b..9a42eea6da 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L103-L132 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/dataframeanalysisregression.go b/typedapi/types/dataframeanalysisregression.go index 7b7cc9204a..fd845b8bff 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L215-L225 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/dataframeanalytics.go b/typedapi/types/dataframeanalytics.go index 7fe9a18da8..86723ab8e4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DataframeAnalytics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L324-L344 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/dataframeanalyticsauthorization.go b/typedapi/types/dataframeanalyticsauthorization.go index 087221320d..1504f32bfb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Authorization.ts#L45-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/dataframeanalyticsdestination.go b/typedapi/types/dataframeanalyticsdestination.go index 3bd050e6d7..4ee7f166dc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L77-L82 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/dataframeanalyticsfieldselection.go b/typedapi/types/dataframeanalyticsfieldselection.go index c614e38977..d95f85e3f8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsFieldSelection type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L55-L68 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/dataframeanalyticsmemoryestimation.go b/typedapi/types/dataframeanalyticsmemoryestimation.go index 217a801a84..3936c6c550 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsMemoryEstimation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L70-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/dataframeanalyticsrecord.go b/typedapi/types/dataframeanalyticsrecord.go index 27c5942ef5..9944cc5f0e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataFrameAnalyticsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/ml_data_frame_analytics/types.ts#L22-L102 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/dataframeanalyticssource.go b/typedapi/types/dataframeanalyticssource.go index 70f3db3a5d..57e71e7ce8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L39-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/dataframeanalyticsstatscontainer.go b/typedapi/types/dataframeanalyticsstatscontainer.go index 7db26960b4..8614d9f4e2 100644 --- a/typedapi/types/dataframeanalyticsstatscontainer.go +++ b/typedapi/types/dataframeanalyticsstatscontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DataframeAnalyticsStatsContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L373-L381 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeAnalytics.ts#L374-L382 type DataframeAnalyticsStatsContainer struct { // ClassificationStats An object containing information about the classification analysis job. ClassificationStats *DataframeAnalyticsStatsHyperparameters `json:"classification_stats,omitempty"` diff --git a/typedapi/types/dataframeanalyticsstatsdatacounts.go b/typedapi/types/dataframeanalyticsstatsdatacounts.go index 9d5976aae2..4d45bada28 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsDataCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L364-L371 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/dataframeanalyticsstatshyperparameters.go b/typedapi/types/dataframeanalyticsstatshyperparameters.go index dd5fee2942..97b0e2b9bb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsHyperparameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L383-L402 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/dataframeanalyticsstatsmemoryusage.go b/typedapi/types/dataframeanalyticsstatsmemoryusage.go index 44963d936d..72b3bc7421 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsMemoryUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L353-L362 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/dataframeanalyticsstatsoutlierdetection.go b/typedapi/types/dataframeanalyticsstatsoutlierdetection.go index 87d7bc9876..08d5452d08 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsStatsOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L404-L417 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/dataframeanalyticsstatsprogress.go b/typedapi/types/dataframeanalyticsstatsprogress.go index 33ea5646ee..68b039d397 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L346-L351 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeAnalytics.ts#L347-L352 type DataframeAnalyticsStatsProgress struct { // Phase Defines the phase of the data frame analytics job. Phase string `json:"phase"` diff --git a/typedapi/types/dataframeanalyticssummary.go b/typedapi/types/dataframeanalyticssummary.go index a41ce49beb..b099f425d8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L306-L322 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeAnalytics.ts#L306-L323 type DataframeAnalyticsSummary struct { AllowLazyStart *bool `json:"allow_lazy_start,omitempty"` Analysis DataframeAnalysisContainer `json:"analysis"` @@ -45,6 +45,7 @@ type DataframeAnalyticsSummary struct { Dest DataframeAnalyticsDestination `json:"dest"` Id string `json:"id"` MaxNumThreads *int `json:"max_num_threads,omitempty"` + Meta_ Metadata `json:"_meta,omitempty"` ModelMemoryLimit *string `json:"model_memory_limit,omitempty"` Source DataframeAnalyticsSource `json:"source"` Version *string `json:"version,omitempty"` @@ -137,6 +138,11 @@ func (s *DataframeAnalyticsSummary) UnmarshalJSON(data []byte) error { s.MaxNumThreads = &f } + case "_meta": + if err := dec.Decode(&s.Meta_); err != nil { + return fmt.Errorf("%s | %w", "Meta_", err) + } + case "model_memory_limit": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/dataframeclassificationsummary.go b/typedapi/types/dataframeclassificationsummary.go index ce34f84d76..c1b3c7ffc5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DataframeClassificationSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L44-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/dataframeclassificationsummaryaccuracy.go b/typedapi/types/dataframeclassificationsummaryaccuracy.go index 359c6226f8..b8fa004e93 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryAccuracy type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L111-L114 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L111-L114 type DataframeClassificationSummaryAccuracy struct { Classes []DataframeEvaluationClass `json:"classes"` OverallAccuracy Float64 `json:"overall_accuracy"` diff --git a/typedapi/types/dataframeclassificationsummarymulticlassconfusionmatrix.go b/typedapi/types/dataframeclassificationsummarymulticlassconfusionmatrix.go index 6e4290b9c9..178d219a07 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryMulticlassConfusionMatrix type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L120-L123 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L120-L123 type DataframeClassificationSummaryMulticlassConfusionMatrix struct { ConfusionMatrix []ConfusionMatrixItem `json:"confusion_matrix"` OtherActualClassCount int `json:"other_actual_class_count"` diff --git a/typedapi/types/dataframeclassificationsummaryprecision.go b/typedapi/types/dataframeclassificationsummaryprecision.go index eb2dfbfded..b10aa80bb9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryPrecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L101-L104 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L101-L104 type DataframeClassificationSummaryPrecision struct { AvgPrecision Float64 `json:"avg_precision"` Classes []DataframeEvaluationClass `json:"classes"` diff --git a/typedapi/types/dataframeclassificationsummaryrecall.go b/typedapi/types/dataframeclassificationsummaryrecall.go index 810de51cdc..6a51778a6e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryRecall type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L106-L109 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L106-L109 type DataframeClassificationSummaryRecall struct { AvgRecall Float64 `json:"avg_recall"` Classes []DataframeEvaluationClass `json:"classes"` diff --git a/typedapi/types/dataframeevaluationclass.go b/typedapi/types/dataframeevaluationclass.go index 66432c69d7..ad70200761 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationClass type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L116-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L116-L118 type DataframeEvaluationClass struct { ClassName string `json:"class_name"` Value Float64 `json:"value"` diff --git a/typedapi/types/dataframeevaluationclassification.go b/typedapi/types/dataframeevaluationclassification.go index 7e5ac80ed5..9f7f188cd1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeEvaluation.ts#L35-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/dataframeevaluationclassificationmetrics.go b/typedapi/types/dataframeevaluationclassificationmetrics.go index b1d97078d7..1d41513552 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationClassificationMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeEvaluation.ts#L73-L78 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go b/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go index 953a6fefa1..5a2b981830 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationClassificationMetricsAucRoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeEvaluation.ts#L85-L90 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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). diff --git a/typedapi/types/dataframeevaluationcontainer.go b/typedapi/types/dataframeevaluationcontainer.go index b8e28144c9..2f12ec863e 100644 --- a/typedapi/types/dataframeevaluationcontainer.go +++ b/typedapi/types/dataframeevaluationcontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DataframeEvaluationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeEvaluation.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeEvaluation.ts#L25-L33 type DataframeEvaluationContainer struct { // Classification Classification evaluation evaluates the results of a classification analysis // which outputs a prediction that identifies to which of the classes each diff --git a/typedapi/types/dataframeevaluationmetrics.go b/typedapi/types/dataframeevaluationmetrics.go index 28f0e0910a..12bcbcb088 100644 --- a/typedapi/types/dataframeevaluationmetrics.go +++ b/typedapi/types/dataframeevaluationmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeEvaluation.ts#L64-L71 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeEvaluation.ts#L64-L71 type DataframeEvaluationMetrics 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 diff --git a/typedapi/types/dataframeevaluationoutlierdetection.go b/typedapi/types/dataframeevaluationoutlierdetection.go index fc97f5bd09..f05527d19a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeEvaluation.ts#L46-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go b/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go index b4a6727b71..904a89b1e6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationOutlierDetectionMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeEvaluation.ts#L80-L83 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/dataframeevaluationregression.go b/typedapi/types/dataframeevaluationregression.go index 78d4bd8986..9f7e6662c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeEvaluation.ts#L55-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/dataframeevaluationregressionmetrics.go b/typedapi/types/dataframeevaluationregressionmetrics.go index 332f76fd22..cf582f837f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationRegressionMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeEvaluation.ts#L92-L110 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeEvaluation.ts#L92-L110 type DataframeEvaluationRegressionMetrics struct { // Huber Pseudo Huber loss function. Huber *DataframeEvaluationRegressionMetricsHuber `json:"huber,omitempty"` diff --git a/typedapi/types/dataframeevaluationregressionmetricshuber.go b/typedapi/types/dataframeevaluationregressionmetricshuber.go index 8b5f0a04a7..bf71312635 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationRegressionMetricsHuber type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeEvaluation.ts#L117-L120 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/dataframeevaluationregressionmetricsmsle.go b/typedapi/types/dataframeevaluationregressionmetricsmsle.go index c28fefff6f..79a7b1b4ad 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationRegressionMetricsMsle type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeEvaluation.ts#L112-L115 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/dataframeevaluationsummaryaucroc.go b/typedapi/types/dataframeevaluationsummaryaucroc.go index e691ab10a6..8393243330 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationSummaryAucRoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L91-L93 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L91-L93 type DataframeEvaluationSummaryAucRoc struct { Curve []DataframeEvaluationSummaryAucRocCurveItem `json:"curve,omitempty"` Value Float64 `json:"value"` diff --git a/typedapi/types/dataframeevaluationsummaryaucroccurveitem.go b/typedapi/types/dataframeevaluationsummaryaucroccurveitem.go index 47f2f089b0..6e9c763b23 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationSummaryAucRocCurveItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L95-L99 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L95-L99 type DataframeEvaluationSummaryAucRocCurveItem struct { Fpr Float64 `json:"fpr"` Threshold Float64 `json:"threshold"` diff --git a/typedapi/types/dataframeevaluationvalue.go b/typedapi/types/dataframeevaluationvalue.go index a4d64bca66..e6952ed62d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L87-L89 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L87-L89 type DataframeEvaluationValue struct { Value Float64 `json:"value"` } diff --git a/typedapi/types/dataframeoutlierdetectionsummary.go b/typedapi/types/dataframeoutlierdetectionsummary.go index 0b57568abc..5cc9750c7f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DataframeOutlierDetectionSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L24-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/dataframepreviewconfig.go b/typedapi/types/dataframepreviewconfig.go index 9043946ce2..6c04cce7b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataframePreviewConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/preview_data_frame_analytics/types.ts#L27-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/preview_data_frame_analytics/types.ts#L27-L33 type DataframePreviewConfig struct { Analysis DataframeAnalysisContainer `json:"analysis"` AnalyzedFields *DataframeAnalysisAnalyzedFields `json:"analyzed_fields,omitempty"` diff --git a/typedapi/types/dataframeregressionsummary.go b/typedapi/types/dataframeregressionsummary.go index f93850c881..70be640cce 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DataframeRegressionSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/evaluate_data_frame/types.ts#L68-L85 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/evaluate_data_frame/types.ts#L68-L85 type DataframeRegressionSummary struct { // Huber Pseudo Huber loss function. Huber *DataframeEvaluationValue `json:"huber,omitempty"` diff --git a/typedapi/types/datapathstats.go b/typedapi/types/datapathstats.go index df2580a20b..8226741c72 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataPathStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L550-L594 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L586-L630 type DataPathStats struct { // Available Total amount of disk space available to this Java virtual machine on this // file store. diff --git a/typedapi/types/datastream.go b/typedapi/types/datastream.go index a1cccd80fc..f2ec4ad81f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,10 +34,12 @@ import ( // DataStream type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/DataStream.ts#L39-L112 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/DataStream.ts#L45-L127 type DataStream struct { // AllowCustomRouting If `true`, the data stream allows custom routing on write request. AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` + // FailureStore Information about failure store backing indices + FailureStore *FailureStore `json:"failure_store,omitempty"` // Generation Current generation for the data stream. This number acts as a cumulative // count of the stream’s rollovers, starting at 1. Generation int `json:"generation"` @@ -75,6 +77,10 @@ type DataStream struct { // replication and the local cluster can not write into this data stream or // change its mappings. Replicated *bool `json:"replicated,omitempty"` + // RolloverOnWrite If `true`, the next write to this data stream will trigger a rollover first + // 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"` // 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. @@ -118,6 +124,11 @@ func (s *DataStream) UnmarshalJSON(data []byte) error { s.AllowCustomRouting = &v } + case "failure_store": + if err := dec.Decode(&s.FailureStore); err != nil { + return fmt.Errorf("%s | %w", "FailureStore", err) + } + case "generation": var tmp any @@ -206,6 +217,20 @@ func (s *DataStream) UnmarshalJSON(data []byte) error { s.Replicated = &v } + case "rollover_on_write": + 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", "RolloverOnWrite", err) + } + s.RolloverOnWrite = value + case bool: + s.RolloverOnWrite = v + } + case "status": if err := dec.Decode(&s.Status); err != nil { return fmt.Errorf("%s | %w", "Status", err) diff --git a/typedapi/types/datastreamindex.go b/typedapi/types/datastreamindex.go index 139ad07d72..ef07652ec4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DataStreamIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/DataStream.ts#L121-L142 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/DataStream.ts#L136-L157 type DataStreamIndex struct { // IlmPolicy Name of the current ILM lifecycle policy configured for this backing index. IlmPolicy *string `json:"ilm_policy,omitempty"` @@ -42,10 +42,10 @@ type DataStreamIndex struct { // IndexUuid Universally unique identifier (UUID) for the index. IndexUuid string `json:"index_uuid"` // ManagedBy Name of the lifecycle system that's currently managing this backing index. - ManagedBy managedby.ManagedBy `json:"managed_by"` + ManagedBy *managedby.ManagedBy `json:"managed_by,omitempty"` // PreferIlm Indicates if ILM should take precedence over DSL in case both are configured // to manage this index. - PreferIlm bool `json:"prefer_ilm"` + PreferIlm *bool `json:"prefer_ilm,omitempty"` } func (s *DataStreamIndex) UnmarshalJSON(data []byte) error { @@ -92,9 +92,9 @@ func (s *DataStreamIndex) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "PreferIlm", err) } - s.PreferIlm = value + s.PreferIlm = &value case bool: - s.PreferIlm = v + s.PreferIlm = &v } } diff --git a/typedapi/types/datastreamlifecycle.go b/typedapi/types/datastreamlifecycle.go index 29b6ea84dd..e7a7384c4d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataStreamLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/DataStreamLifecycle.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/DataStreamLifecycle.ts#L25-L31 type DataStreamLifecycle struct { DataRetention Duration `json:"data_retention,omitempty"` Downsampling *DataStreamLifecycleDownsampling `json:"downsampling,omitempty"` diff --git a/typedapi/types/datastreamlifecycledetails.go b/typedapi/types/datastreamlifecycledetails.go new file mode 100644 index 0000000000..90afbfa7c4 --- /dev/null +++ b/typedapi/types/datastreamlifecycledetails.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DataStreamLifecycleDetails type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L152-L156 +type DataStreamLifecycleDetails struct { + StagnatingBackingIndices []StagnatingBackingIndices `json:"stagnating_backing_indices,omitempty"` + StagnatingBackingIndicesCount int `json:"stagnating_backing_indices_count"` + TotalBackingIndicesInError int `json:"total_backing_indices_in_error"` +} + +func (s *DataStreamLifecycleDetails) 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 "stagnating_backing_indices": + if err := dec.Decode(&s.StagnatingBackingIndices); err != nil { + return fmt.Errorf("%s | %w", "StagnatingBackingIndices", err) + } + + case "stagnating_backing_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", "StagnatingBackingIndicesCount", err) + } + s.StagnatingBackingIndicesCount = value + case float64: + f := int(v) + s.StagnatingBackingIndicesCount = f + } + + case "total_backing_indices_in_error": + + 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", "TotalBackingIndicesInError", err) + } + s.TotalBackingIndicesInError = value + case float64: + f := int(v) + s.TotalBackingIndicesInError = f + } + + } + } + return nil +} + +// NewDataStreamLifecycleDetails returns a DataStreamLifecycleDetails. +func NewDataStreamLifecycleDetails() *DataStreamLifecycleDetails { + r := &DataStreamLifecycleDetails{} + + return r +} diff --git a/typedapi/types/datastreamlifecycledownsampling.go b/typedapi/types/datastreamlifecycledownsampling.go index 4d44a93e3d..8c6cbeb465 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DataStreamLifecycleDownsampling type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/DataStreamLifecycleDownsampling.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/DataStreamLifecycleDownsampling.ts#L22-L27 type DataStreamLifecycleDownsampling struct { // Rounds The list of downsampling rounds to execute as part of this downsampling // configuration diff --git a/typedapi/types/datastreamlifecycleexplain.go b/typedapi/types/datastreamlifecycleexplain.go index da55752fac..10b03ed140 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleExplain type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41 type DataStreamLifecycleExplain struct { Error *string `json:"error,omitempty"` GenerationTime Duration `json:"generation_time,omitempty"` diff --git a/typedapi/types/datastreamlifecycleindicator.go b/typedapi/types/datastreamlifecycleindicator.go new file mode 100644 index 0000000000..2b6948b020 --- /dev/null +++ b/typedapi/types/datastreamlifecycleindicator.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/indicatorhealthstatus" +) + +// DataStreamLifecycleIndicator type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L147-L151 +type DataStreamLifecycleIndicator struct { + Details *DataStreamLifecycleDetails `json:"details,omitempty"` + Diagnosis []Diagnosis `json:"diagnosis,omitempty"` + Impacts []Impact `json:"impacts,omitempty"` + Status indicatorhealthstatus.IndicatorHealthStatus `json:"status"` + Symptom string `json:"symptom"` +} + +func (s *DataStreamLifecycleIndicator) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "details": + if err := dec.Decode(&s.Details); err != nil { + return fmt.Errorf("%s | %w", "Details", err) + } + + case "diagnosis": + if err := dec.Decode(&s.Diagnosis); err != nil { + return fmt.Errorf("%s | %w", "Diagnosis", err) + } + + case "impacts": + if err := dec.Decode(&s.Impacts); err != nil { + return fmt.Errorf("%s | %w", "Impacts", err) + } + + case "status": + if err := dec.Decode(&s.Status); err != nil { + return fmt.Errorf("%s | %w", "Status", err) + } + + case "symptom": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Symptom", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Symptom = o + + } + } + return nil +} + +// NewDataStreamLifecycleIndicator returns a DataStreamLifecycleIndicator. +func NewDataStreamLifecycleIndicator() *DataStreamLifecycleIndicator { + r := &DataStreamLifecycleIndicator{} + + return r +} diff --git a/typedapi/types/datastreamlifecyclerolloverconditions.go b/typedapi/types/datastreamlifecyclerolloverconditions.go index dcaf4a344d..c13f2a34a6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleRolloverConditions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/DataStreamLifecycle.ts#L57-L69 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/DataStreamLifecycle.ts#L57-L69 type DataStreamLifecycleRolloverConditions struct { MaxAge *string `json:"max_age,omitempty"` MaxDocs *int64 `json:"max_docs,omitempty"` diff --git a/typedapi/types/datastreamlifecyclewithrollover.go b/typedapi/types/datastreamlifecyclewithrollover.go index 249304c743..c87a0a3c96 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataStreamLifecycleWithRollover type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/DataStreamLifecycle.ts#L33-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/DataStreamLifecycle.ts#L33-L55 type DataStreamLifecycleWithRollover struct { // DataRetention If defined, every document added to this data stream will be stored at least // for this time frame. diff --git a/typedapi/types/datastreamnames.go b/typedapi/types/datastreamnames.go index c80c357af7..c65599974e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DataStreamNames type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L94-L94 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L95-L95 type DataStreamNames []string diff --git a/typedapi/types/datastreams.go b/typedapi/types/datastreams.go index 7e5a7eacda..82e060716a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataStreams type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L81-L84 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L79-L82 type DataStreams struct { Available bool `json:"available"` DataStreams int64 `json:"data_streams"` diff --git a/typedapi/types/datastreamsstatsitem.go b/typedapi/types/datastreamsstatsitem.go index b899f895b2..d1aad04411 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataStreamsStatsItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L45-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/datastreamtimestamp.go b/typedapi/types/datastreamtimestamp.go index 96d0dc6199..febf6bec54 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataStreamTimestamp type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/TypeMapping.ts#L59-L61 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/TypeMapping.ts#L59-L61 type DataStreamTimestamp struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/datastreamtimestampfield.go b/typedapi/types/datastreamtimestampfield.go index 3706f07197..9fff9f09c8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataStreamTimestampField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/DataStream.ts#L114-L119 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/DataStream.ts#L129-L134 type DataStreamTimestampField struct { // Name Name of the timestamp field for the data stream, which must be `@timestamp`. // The `@timestamp` field must be included in every document indexed to the data diff --git a/typedapi/types/datastreamvisibility.go b/typedapi/types/datastreamvisibility.go index 85dcc35370..bfe6a51e35 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,9 +31,10 @@ import ( // DataStreamVisibility type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/DataStream.ts#L144-L146 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/DataStream.ts#L159-L162 type DataStreamVisibility struct { - Hidden *bool `json:"hidden,omitempty"` + AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` + Hidden *bool `json:"hidden,omitempty"` } func (s *DataStreamVisibility) UnmarshalJSON(data []byte) error { @@ -51,6 +52,20 @@ func (s *DataStreamVisibility) UnmarshalJSON(data []byte) error { switch t { + case "allow_custom_routing": + 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", "AllowCustomRouting", err) + } + s.AllowCustomRouting = &value + case bool: + s.AllowCustomRouting = &v + } + case "hidden": var tmp any dec.Decode(&tmp) diff --git a/typedapi/types/datastreamwithlifecycle.go b/typedapi/types/datastreamwithlifecycle.go index d309fe5143..5296abc5a3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DataStreamWithLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30 type DataStreamWithLifecycle struct { Lifecycle *DataStreamLifecycle `json:"lifecycle,omitempty"` Name string `json:"name"` diff --git a/typedapi/types/datatierphasestatistics.go b/typedapi/types/datatierphasestatistics.go index d14aff27b9..802b521c9b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataTierPhaseStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L86-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L84-L95 type DataTierPhaseStatistics struct { DocCount int64 `json:"doc_count"` IndexCount int64 `json:"index_count"` diff --git a/typedapi/types/datatiers.go b/typedapi/types/datatiers.go index 4d01071d98..8be6a0959f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DataTiers type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L339-L349 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L337-L347 type DataTiers struct { Available bool `json:"available"` DataCold DataTierPhaseStatistics `json:"data_cold"` diff --git a/typedapi/types/datedecayfunction.go b/typedapi/types/datedecayfunction.go index 9f4db28390..cbd52bc046 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,7 +29,7 @@ import ( // DateDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L196-L196 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/datedistancefeaturequery.go b/typedapi/types/datedistancefeaturequery.go index 9a7a7d46b0..46587e1be6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DateDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L72-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/datehistogramaggregate.go b/typedapi/types/datehistogramaggregate.go index e14bc8b0c6..4e72c67df4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DateHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L350-L351 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L383-L386 type DateHistogramAggregate struct { Buckets BucketsDateHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/datehistogramaggregation.go b/typedapi/types/datehistogramaggregation.go index 4e3b580faa..c35ad49e77 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // DateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L191-L249 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/datehistogrambucket.go b/typedapi/types/datehistogrambucket.go index d839342ca3..61629e3217 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // DateHistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L353-L356 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L388-L391 type DateHistogramBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -504,6 +504,13 @@ func (s *DateHistogramBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/datehistogramgrouping.go b/typedapi/types/datehistogramgrouping.go index 74e3c30990..99fd87f528 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DateHistogramGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/_types/Groupings.ts#L42-L73 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/dateindexnameprocessor.go b/typedapi/types/dateindexnameprocessor.go index af5b4ee9c3..476587b948 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DateIndexNameProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L502-L540 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L729-L767 type DateIndexNameProcessor struct { // DateFormats An array of the expected date formats for parsing dates / timestamps in the // document being preprocessed. diff --git a/typedapi/types/datenanosproperty.go b/typedapi/types/datenanosproperty.go index 293d9bcd0f..f1f4dc6ec4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DateNanosProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L79-L87 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L78-L86 type DateNanosProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -49,7 +49,6 @@ type DateNanosProperty struct { NullValue DateTime `json:"null_value,omitempty"` PrecisionStep *int `json:"precision_step,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -843,18 +842,6 @@ func (s *DateNanosProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -896,7 +883,6 @@ func (s DateNanosProperty) MarshalJSON() ([]byte, error) { NullValue: s.NullValue, PrecisionStep: s.PrecisionStep, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/dateprocessor.go b/typedapi/types/dateprocessor.go index ece4a4b6fe..c3221c38bc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DateProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L542-L569 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L769-L802 type DateProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -52,6 +52,9 @@ type DateProcessor struct { Locale *string `json:"locale,omitempty"` // OnFailure Handle failures for the processor. OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // OutputFormat The format to use when writing the date to target_field. Must be a valid + // java time pattern. + OutputFormat *string `json:"output_format,omitempty"` // Tag Identifier for the processor. // Useful for debugging and metrics. Tag *string `json:"tag,omitempty"` @@ -142,6 +145,18 @@ func (s *DateProcessor) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "OnFailure", err) } + case "output_format": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "OutputFormat", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.OutputFormat = &o + case "tag": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/dateproperty.go b/typedapi/types/dateproperty.go index 8bea067ec8..cca93842c1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DateProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L67-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L66-L76 type DateProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -51,7 +51,6 @@ type DateProperty struct { NullValue DateTime `json:"null_value,omitempty"` PrecisionStep *int `json:"precision_step,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -862,18 +861,6 @@ func (s *DateProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -917,7 +904,6 @@ func (s DateProperty) MarshalJSON() ([]byte, error) { NullValue: s.NullValue, PrecisionStep: s.PrecisionStep, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/daterangeaggregate.go b/typedapi/types/daterangeaggregate.go index c4f40ca8ec..ca1f43a096 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DateRangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L547-L552 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L609-L615 type DateRangeAggregate struct { Buckets BucketsRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/daterangeaggregation.go b/typedapi/types/daterangeaggregation.go index 200c7baa48..542e0dc0b2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DateRangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L270-L296 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/daterangeexpression.go b/typedapi/types/daterangeexpression.go index 67af5c2cc0..fd6b83918f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DateRangeExpression type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L307-L320 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L318-L331 type DateRangeExpression struct { // From Start of the range (inclusive). From FieldDateMath `json:"from,omitempty"` diff --git a/typedapi/types/daterangeproperty.go b/typedapi/types/daterangeproperty.go index 3cdfbeb794..83630c8132 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DateRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/range.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/range.ts#L29-L32 type DateRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -47,7 +47,6 @@ type DateRangeProperty struct { // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -820,18 +819,6 @@ func (s *DateRangeProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -871,7 +858,6 @@ func (s DateRangeProperty) MarshalJSON() ([]byte, error) { Index: s.Index, Meta: s.Meta, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/daterangequery.go b/typedapi/types/daterangequery.go index b4c16e2fb1..f23ef08726 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DateRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L146-L155 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L161-L170 type DateRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/datetime.go b/typedapi/types/datetime.go index 418927d1db..e096f48794 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // int64 // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Time.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Time.ts#L22-L27 type DateTime any diff --git a/typedapi/types/decayfunction.go b/typedapi/types/decayfunction.go index a1402209ad..bf69b019d0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -27,5 +27,5 @@ package types // NumericDecayFunction // GeoDecayFunction // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L202-L211 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/compound.ts#L215-L224 type DecayFunction any diff --git a/typedapi/types/decayfunctionbasedatemathduration.go b/typedapi/types/decayfunctionbasedatemathduration.go index 232b2f0a5c..1a40c0c5dd 100644 --- a/typedapi/types/decayfunctionbasedatemathduration.go +++ b/typedapi/types/decayfunctionbasedatemathduration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,7 +29,7 @@ import ( // DecayFunctionBaseDateMathDuration type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L178-L189 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/compound.ts#L191-L202 type DecayFunctionBaseDateMathDuration struct { DecayFunctionBaseDateMathDuration map[string]DecayPlacementDateMathDuration `json:"-"` // MultiValueMode Determines how the distance is calculated when a field used for computing the diff --git a/typedapi/types/decayfunctionbasedoubledouble.go b/typedapi/types/decayfunctionbasedoubledouble.go index 41ce83d337..a67e3d9a6c 100644 --- a/typedapi/types/decayfunctionbasedoubledouble.go +++ b/typedapi/types/decayfunctionbasedoubledouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,7 +29,7 @@ import ( // DecayFunctionBasedoubledouble type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L178-L189 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/compound.ts#L191-L202 type DecayFunctionBasedoubledouble struct { DecayFunctionBasedoubledouble map[string]DecayPlacementdoubledouble `json:"-"` // MultiValueMode Determines how the distance is calculated when a field used for computing the diff --git a/typedapi/types/decayfunctionbasegeolocationdistance.go b/typedapi/types/decayfunctionbasegeolocationdistance.go index f7fd6510bd..9e875eac55 100644 --- a/typedapi/types/decayfunctionbasegeolocationdistance.go +++ b/typedapi/types/decayfunctionbasegeolocationdistance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,7 +29,7 @@ import ( // DecayFunctionBaseGeoLocationDistance type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L178-L189 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/compound.ts#L191-L202 type DecayFunctionBaseGeoLocationDistance struct { DecayFunctionBaseGeoLocationDistance map[string]DecayPlacementGeoLocationDistance `json:"-"` // MultiValueMode Determines how the distance is calculated when a field used for computing the diff --git a/typedapi/types/decayplacement.go b/typedapi/types/decayplacement.go index f2b71aa268..c0e2b09f7b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DecayPlacement type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L157-L176 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/decayplacementdatemathduration.go b/typedapi/types/decayplacementdatemathduration.go index 8555d994eb..744b72929b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DecayPlacementDateMathDuration type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L157-L176 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/decayplacementdoubledouble.go b/typedapi/types/decayplacementdoubledouble.go index 9400cb0894..107622361a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DecayPlacementdoubledouble type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L157-L176 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/decayplacementgeolocationdistance.go b/typedapi/types/decayplacementgeolocationdistance.go index 396cbb7790..3d829b0c60 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DecayPlacementGeoLocationDistance type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L157-L176 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/defaults.go b/typedapi/types/defaults.go index 190a1267c6..58171974e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Defaults type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/info/types.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/info/types.ts#L24-L27 type Defaults struct { AnomalyDetectors AnomalyDetectors `json:"anomaly_detectors"` Datafeeds Datafeeds `json:"datafeeds"` diff --git a/typedapi/types/definition.go b/typedapi/types/definition.go index 436e190cc9..d840ca9ded 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Definition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L24-L29 type Definition struct { // Preprocessors Collection of preprocessors Preprocessors []Preprocessor `json:"preprocessors,omitempty"` diff --git a/typedapi/types/delayeddatacheckconfig.go b/typedapi/types/delayeddatacheckconfig.go index 222f735fde..fc667dc5e0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DelayedDataCheckConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Datafeed.ts#L118-L129 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/deleteaction.go b/typedapi/types/deleteaction.go index cd5e2b2c9d..87ae1d87d4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DeleteAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L152-L154 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L152-L154 type DeleteAction struct { DeleteSearchableSnapshot *bool `json:"delete_searchable_snapshot,omitempty"` } diff --git a/typedapi/types/deleteinferenceendpointresult.go b/typedapi/types/deleteinferenceendpointresult.go index de4d718439..06913ee0bd 100644 --- a/typedapi/types/deleteinferenceendpointresult.go +++ b/typedapi/types/deleteinferenceendpointresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DeleteInferenceEndpointResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/_types/Results.ts#L91-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/_types/Results.ts#L91-L96 type DeleteInferenceEndpointResult struct { // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. diff --git a/typedapi/types/deleteoperation.go b/typedapi/types/deleteoperation.go index 7faa9c7940..dba9f3a2cd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DeleteOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/bulk/types.ts#L134-L134 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/bulk/types.ts#L134-L134 type DeleteOperation struct { // Id_ The document ID. Id_ *string `json:"_id,omitempty"` diff --git a/typedapi/types/delimitedpayloadtokenfilter.go b/typedapi/types/delimitedpayloadtokenfilter.go index 716f94cc2c..fa4484d8f9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DelimitedPayloadTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L68-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L67-L71 type DelimitedPayloadTokenFilter struct { Delimiter *string `json:"delimiter,omitempty"` Encoding *delimitedpayloadencoding.DelimitedPayloadEncoding `json:"encoding,omitempty"` diff --git a/typedapi/types/densevectorindexoptions.go b/typedapi/types/densevectorindexoptions.go index 22691d4f1b..45908b6cc0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DenseVectorIndexOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/DenseVectorIndexOptions.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/DenseVectorIndexOptions.ts#L22-L27 type DenseVectorIndexOptions struct { ConfidenceInterval *float32 `json:"confidence_interval,omitempty"` EfConstruction *int `json:"ef_construction,omitempty"` diff --git a/typedapi/types/densevectorproperty.go b/typedapi/types/densevectorproperty.go index 6eaa552bcf..090a75c8b6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DenseVectorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/complex.ts#L52-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/complex.ts#L52-L59 type DenseVectorProperty struct { Dims *int `json:"dims,omitempty"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` diff --git a/typedapi/types/dependency.go b/typedapi/types/dependency.go index d39e321192..ae5fcdcb9b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Dependency type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L30-L33 type Dependency struct { Field string `json:"field"` Value ScalarValue `json:"value"` diff --git a/typedapi/types/deprecation.go b/typedapi/types/deprecation.go index 2dc6c51dc7..3944f81513 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,13 +33,15 @@ import ( // Deprecation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/migration/deprecations/types.ts#L29-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/migration/deprecations/types.ts#L32-L40 type Deprecation struct { - Details string `json:"details"` + Details *string `json:"details,omitempty"` // Level The level property describes the significance of the issue. - Level deprecationlevel.DeprecationLevel `json:"level"` - Message string `json:"message"` - Url string `json:"url"` + Level deprecationlevel.DeprecationLevel `json:"level"` + Message string `json:"message"` + Meta_ map[string]json.RawMessage `json:"_meta,omitempty"` + ResolveDuringRollingUpgrade bool `json:"resolve_during_rolling_upgrade"` + Url string `json:"url"` } func (s *Deprecation) UnmarshalJSON(data []byte) error { @@ -67,7 +69,7 @@ func (s *Deprecation) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Details = o + s.Details = &o case "level": if err := dec.Decode(&s.Level); err != nil { @@ -86,6 +88,28 @@ func (s *Deprecation) UnmarshalJSON(data []byte) error { } s.Message = o + case "_meta": + if s.Meta_ == nil { + s.Meta_ = make(map[string]json.RawMessage, 0) + } + if err := dec.Decode(&s.Meta_); err != nil { + return fmt.Errorf("%s | %w", "Meta_", err) + } + + case "resolve_during_rolling_upgrade": + 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", "ResolveDuringRollingUpgrade", err) + } + s.ResolveDuringRollingUpgrade = value + case bool: + s.ResolveDuringRollingUpgrade = v + } + case "url": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { @@ -105,7 +129,9 @@ func (s *Deprecation) UnmarshalJSON(data []byte) error { // NewDeprecation returns a Deprecation. func NewDeprecation() *Deprecation { - r := &Deprecation{} + r := &Deprecation{ + Meta_: make(map[string]json.RawMessage, 0), + } return r } diff --git a/typedapi/types/deprecationindexing.go b/typedapi/types/deprecationindexing.go index 719a5c807f..033375f0f1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DeprecationIndexing type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L144-L146 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L144-L146 type DeprecationIndexing struct { Enabled string `json:"enabled"` } diff --git a/typedapi/types/derivativeaggregate.go b/typedapi/types/derivativeaggregate.go index 05461583c9..467452b826 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DerivativeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L227-L231 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L241-L248 type DerivativeAggregate struct { Meta Metadata `json:"meta,omitempty"` NormalizedValue *Float64 `json:"normalized_value,omitempty"` diff --git a/typedapi/types/derivativeaggregation.go b/typedapi/types/derivativeaggregation.go index 1c1598fd7c..e81121269b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DerivativeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L196-L196 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/detectionrule.go b/typedapi/types/detectionrule.go index c35521860c..612e379e37 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // DetectionRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Rule.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/detector.go b/typedapi/types/detector.go index 8a74a92dfb..f3500ad5de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // Detector type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Detector.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/detectorread.go b/typedapi/types/detectorread.go index 71dee15e36..827861a69b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DetectorRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Detector.ts#L69-L125 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/detectorupdate.go b/typedapi/types/detectorupdate.go new file mode 100644 index 0000000000..3020fdee4a --- /dev/null +++ b/typedapi/types/detectorupdate.go @@ -0,0 +1,108 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DetectorUpdate type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. + // For example, a rule may dictate to the detector conditions under which + // results should be skipped. + // Kibana refers to custom rules as job rules. + CustomRules []DetectionRule `json:"custom_rules,omitempty"` + // Description A description of the detector. + Description *string `json:"description,omitempty"` + // DetectorIndex A unique identifier for the detector. + // This identifier is based on the order of the detectors in the + // `analysis_config`, starting at zero. + DetectorIndex int `json:"detector_index"` +} + +func (s *DetectorUpdate) 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_rules": + if err := dec.Decode(&s.CustomRules); err != nil { + return fmt.Errorf("%s | %w", "CustomRules", err) + } + + case "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + case "detector_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", "DetectorIndex", err) + } + s.DetectorIndex = value + case float64: + f := int(v) + s.DetectorIndex = f + } + + } + } + return nil +} + +// NewDetectorUpdate returns a DetectorUpdate. +func NewDetectorUpdate() *DetectorUpdate { + r := &DetectorUpdate{} + + return r +} diff --git a/typedapi/types/dfsknnprofile.go b/typedapi/types/dfsknnprofile.go new file mode 100644 index 0000000000..bae588b0d4 --- /dev/null +++ b/typedapi/types/dfsknnprofile.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DfsKnnProfile type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L181-L186 +type DfsKnnProfile struct { + Collector []KnnCollectorResult `json:"collector"` + Query []KnnQueryProfileResult `json:"query"` + RewriteTime int64 `json:"rewrite_time"` + VectorOperationsCount *int64 `json:"vector_operations_count,omitempty"` +} + +func (s *DfsKnnProfile) 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 "collector": + if err := dec.Decode(&s.Collector); err != nil { + return fmt.Errorf("%s | %w", "Collector", err) + } + + case "query": + if err := dec.Decode(&s.Query); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + + case "rewrite_time": + 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", "RewriteTime", err) + } + s.RewriteTime = value + case float64: + f := int64(v) + s.RewriteTime = f + } + + case "vector_operations_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", "VectorOperationsCount", err) + } + s.VectorOperationsCount = &value + case float64: + f := int64(v) + s.VectorOperationsCount = &f + } + + } + } + return nil +} + +// NewDfsKnnProfile returns a DfsKnnProfile. +func NewDfsKnnProfile() *DfsKnnProfile { + r := &DfsKnnProfile{} + + return r +} diff --git a/typedapi/types/dfsprofile.go b/typedapi/types/dfsprofile.go new file mode 100644 index 0000000000..a6b9381a48 --- /dev/null +++ b/typedapi/types/dfsprofile.go @@ -0,0 +1,36 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +// DfsProfile type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L154-L157 +type DfsProfile struct { + Knn []DfsKnnProfile `json:"knn,omitempty"` + Statistics *DfsStatisticsProfile `json:"statistics,omitempty"` +} + +// NewDfsProfile returns a DfsProfile. +func NewDfsProfile() *DfsProfile { + r := &DfsProfile{} + + return r +} diff --git a/typedapi/types/dfsstatisticsbreakdown.go b/typedapi/types/dfsstatisticsbreakdown.go new file mode 100644 index 0000000000..1588ca5db6 --- /dev/null +++ b/typedapi/types/dfsstatisticsbreakdown.go @@ -0,0 +1,191 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DfsStatisticsBreakdown type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L170-L179 +type DfsStatisticsBreakdown struct { + CollectionStatistics int64 `json:"collection_statistics"` + CollectionStatisticsCount int64 `json:"collection_statistics_count"` + CreateWeight int64 `json:"create_weight"` + CreateWeightCount int64 `json:"create_weight_count"` + Rewrite int64 `json:"rewrite"` + RewriteCount int64 `json:"rewrite_count"` + TermStatistics int64 `json:"term_statistics"` + TermStatisticsCount int64 `json:"term_statistics_count"` +} + +func (s *DfsStatisticsBreakdown) 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 "collection_statistics": + 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", "CollectionStatistics", err) + } + s.CollectionStatistics = value + case float64: + f := int64(v) + s.CollectionStatistics = f + } + + case "collection_statistics_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", "CollectionStatisticsCount", err) + } + s.CollectionStatisticsCount = value + case float64: + f := int64(v) + s.CollectionStatisticsCount = f + } + + case "create_weight": + 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", "CreateWeight", err) + } + s.CreateWeight = value + case float64: + f := int64(v) + s.CreateWeight = f + } + + case "create_weight_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", "CreateWeightCount", err) + } + s.CreateWeightCount = value + case float64: + f := int64(v) + s.CreateWeightCount = f + } + + case "rewrite": + 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", "Rewrite", err) + } + s.Rewrite = value + case float64: + f := int64(v) + s.Rewrite = f + } + + case "rewrite_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", "RewriteCount", err) + } + s.RewriteCount = value + case float64: + f := int64(v) + s.RewriteCount = f + } + + case "term_statistics": + 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", "TermStatistics", err) + } + s.TermStatistics = value + case float64: + f := int64(v) + s.TermStatistics = f + } + + case "term_statistics_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", "TermStatisticsCount", err) + } + s.TermStatisticsCount = value + case float64: + f := int64(v) + s.TermStatisticsCount = f + } + + } + } + return nil +} + +// NewDfsStatisticsBreakdown returns a DfsStatisticsBreakdown. +func NewDfsStatisticsBreakdown() *DfsStatisticsBreakdown { + r := &DfsStatisticsBreakdown{} + + return r +} diff --git a/typedapi/types/dfsstatisticsprofile.go b/typedapi/types/dfsstatisticsprofile.go new file mode 100644 index 0000000000..fe3ac9cf58 --- /dev/null +++ b/typedapi/types/dfsstatisticsprofile.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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DfsStatisticsProfile type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L159-L167 +type DfsStatisticsProfile struct { + Breakdown DfsStatisticsBreakdown `json:"breakdown"` + Children []DfsStatisticsProfile `json:"children,omitempty"` + Debug map[string]json.RawMessage `json:"debug,omitempty"` + Description string `json:"description"` + Time Duration `json:"time,omitempty"` + TimeInNanos int64 `json:"time_in_nanos"` + Type string `json:"type"` +} + +func (s *DfsStatisticsProfile) 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 "breakdown": + if err := dec.Decode(&s.Breakdown); err != nil { + return fmt.Errorf("%s | %w", "Breakdown", err) + } + + case "children": + if err := dec.Decode(&s.Children); err != nil { + return fmt.Errorf("%s | %w", "Children", err) + } + + case "debug": + if s.Debug == nil { + s.Debug = make(map[string]json.RawMessage, 0) + } + if err := dec.Decode(&s.Debug); err != nil { + return fmt.Errorf("%s | %w", "Debug", err) + } + + case "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = o + + case "time": + if err := dec.Decode(&s.Time); err != nil { + return fmt.Errorf("%s | %w", "Time", err) + } + + case "time_in_nanos": + if err := dec.Decode(&s.TimeInNanos); err != nil { + return fmt.Errorf("%s | %w", "TimeInNanos", 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 +} + +// NewDfsStatisticsProfile returns a DfsStatisticsProfile. +func NewDfsStatisticsProfile() *DfsStatisticsProfile { + r := &DfsStatisticsProfile{ + Debug: make(map[string]json.RawMessage, 0), + } + + return r +} diff --git a/typedapi/types/diagnosis.go b/typedapi/types/diagnosis.go index fa28e2b99c..5ca2bfc12c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Diagnosis type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L49-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L50-L56 type Diagnosis struct { Action string `json:"action"` AffectedResources DiagnosisAffectedResources `json:"affected_resources"` diff --git a/typedapi/types/diagnosisaffectedresources.go b/typedapi/types/diagnosisaffectedresources.go index a45019e10b..6056b5dcb8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DiagnosisAffectedResources type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L57-L63 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L58-L64 type DiagnosisAffectedResources struct { FeatureStates []string `json:"feature_states,omitempty"` Indices []string `json:"indices,omitempty"` diff --git a/typedapi/types/dictionarydecompoundertokenfilter.go b/typedapi/types/dictionarydecompoundertokenfilter.go index 6e954dbbfe..9cdfaa0e74 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DictionaryDecompounderTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L53-L55 type DictionaryDecompounderTokenFilter struct { HyphenationPatternsPath *string `json:"hyphenation_patterns_path,omitempty"` MaxSubwordSize *int `json:"max_subword_size,omitempty"` diff --git a/typedapi/types/directgenerator.go b/typedapi/types/directgenerator.go index c00019aace..7c4ef9321a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DirectGenerator type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L268-L331 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L268-L331 type DirectGenerator struct { // Field The field to fetch the candidate suggestions from. // Needs to be set globally or per suggestion. diff --git a/typedapi/types/discovery.go b/typedapi/types/discovery.go index 26b736957e..ccc89b13db 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Discovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L201-L219 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L201-L219 type Discovery struct { ClusterApplierStats *ClusterAppliedStats `json:"cluster_applier_stats,omitempty"` // ClusterStateQueue Contains statistics for the cluster state queue of the node. diff --git a/typedapi/types/discoverynode.go b/typedapi/types/discoverynode.go index e70456b38d..3196ebe9cd 100644 --- a/typedapi/types/discoverynode.go +++ b/typedapi/types/discoverynode.go @@ -16,82 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" -) - -// DiscoveryNode type. +// DiscoveryNode type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DiscoveryNode.ts#L24-L30 -type DiscoveryNode struct { - Attributes map[string]string `json:"attributes"` - EphemeralId string `json:"ephemeral_id"` - Id string `json:"id"` - Name string `json:"name"` - TransportAddress string `json:"transport_address"` -} - -func (s *DiscoveryNode) 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 "attributes": - if s.Attributes == nil { - s.Attributes = make(map[string]string, 0) - } - if err := dec.Decode(&s.Attributes); err != nil { - return fmt.Errorf("%s | %w", "Attributes", err) - } - - case "ephemeral_id": - if err := dec.Decode(&s.EphemeralId); err != nil { - return fmt.Errorf("%s | %w", "EphemeralId", err) - } - - case "id": - if err := dec.Decode(&s.Id); err != nil { - return fmt.Errorf("%s | %w", "Id", err) - } - - case "name": - if err := dec.Decode(&s.Name); err != nil { - return fmt.Errorf("%s | %w", "Name", err) - } - - case "transport_address": - if err := dec.Decode(&s.TransportAddress); err != nil { - return fmt.Errorf("%s | %w", "TransportAddress", err) - } - - } - } - return nil -} - -// NewDiscoveryNode returns a DiscoveryNode. -func NewDiscoveryNode() *DiscoveryNode { - r := &DiscoveryNode{ - Attributes: make(map[string]string, 0), - } - - return r -} +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DiscoveryNode.ts#L25-L25 +type DiscoveryNode map[string]DiscoveryNodeContent diff --git a/typedapi/types/discoverynodecompact.go b/typedapi/types/discoverynodecompact.go new file mode 100644 index 0000000000..98b5cfe6b2 --- /dev/null +++ b/typedapi/types/discoverynodecompact.go @@ -0,0 +1,97 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// DiscoveryNodeCompact type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DiscoveryNode.ts#L39-L48 +type DiscoveryNodeCompact struct { + Attributes map[string]string `json:"attributes"` + EphemeralId string `json:"ephemeral_id"` + Id string `json:"id"` + Name string `json:"name"` + TransportAddress string `json:"transport_address"` +} + +func (s *DiscoveryNodeCompact) 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 "attributes": + if s.Attributes == nil { + s.Attributes = make(map[string]string, 0) + } + if err := dec.Decode(&s.Attributes); err != nil { + return fmt.Errorf("%s | %w", "Attributes", err) + } + + case "ephemeral_id": + if err := dec.Decode(&s.EphemeralId); err != nil { + return fmt.Errorf("%s | %w", "EphemeralId", err) + } + + case "id": + if err := dec.Decode(&s.Id); err != nil { + return fmt.Errorf("%s | %w", "Id", err) + } + + case "name": + if err := dec.Decode(&s.Name); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + + case "transport_address": + if err := dec.Decode(&s.TransportAddress); err != nil { + return fmt.Errorf("%s | %w", "TransportAddress", err) + } + + } + } + return nil +} + +// NewDiscoveryNodeCompact returns a DiscoveryNodeCompact. +func NewDiscoveryNodeCompact() *DiscoveryNodeCompact { + r := &DiscoveryNodeCompact{ + Attributes: make(map[string]string, 0), + } + + return r +} diff --git a/typedapi/types/discoverynodecontent.go b/typedapi/types/discoverynodecontent.go new file mode 100644 index 0000000000..5cde34bd29 --- /dev/null +++ b/typedapi/types/discoverynodecontent.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DiscoveryNodeContent type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DiscoveryNode.ts#L27-L37 +type DiscoveryNodeContent struct { + Attributes map[string]string `json:"attributes"` + EphemeralId string `json:"ephemeral_id"` + ExternalId string `json:"external_id"` + MaxIndexVersion int `json:"max_index_version"` + MinIndexVersion int `json:"min_index_version"` + Name *string `json:"name,omitempty"` + Roles []string `json:"roles"` + TransportAddress string `json:"transport_address"` + Version string `json:"version"` +} + +func (s *DiscoveryNodeContent) 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 "attributes": + if s.Attributes == nil { + s.Attributes = make(map[string]string, 0) + } + if err := dec.Decode(&s.Attributes); err != nil { + return fmt.Errorf("%s | %w", "Attributes", err) + } + + case "ephemeral_id": + if err := dec.Decode(&s.EphemeralId); err != nil { + return fmt.Errorf("%s | %w", "EphemeralId", err) + } + + case "external_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ExternalId", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ExternalId = o + + case "max_index_version": + + 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", "MaxIndexVersion", err) + } + s.MaxIndexVersion = value + case float64: + f := int(v) + s.MaxIndexVersion = f + } + + case "min_index_version": + + 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", "MinIndexVersion", err) + } + s.MinIndexVersion = value + case float64: + f := int(v) + s.MinIndexVersion = f + } + + case "name": + if err := dec.Decode(&s.Name); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + + case "roles": + if err := dec.Decode(&s.Roles); err != nil { + return fmt.Errorf("%s | %w", "Roles", err) + } + + case "transport_address": + if err := dec.Decode(&s.TransportAddress); err != nil { + return fmt.Errorf("%s | %w", "TransportAddress", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// NewDiscoveryNodeContent returns a DiscoveryNodeContent. +func NewDiscoveryNodeContent() *DiscoveryNodeContent { + r := &DiscoveryNodeContent{ + Attributes: make(map[string]string, 0), + } + + return r +} diff --git a/typedapi/types/diskindicator.go b/typedapi/types/diskindicator.go index 09d42aa386..c98c73192a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DiskIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L122-L126 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L123-L127 type DiskIndicator struct { Details *DiskIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/diskindicatordetails.go b/typedapi/types/diskindicatordetails.go index d2043aff16..bd411a0bbd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DiskIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L127-L133 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L128-L134 type DiskIndicatorDetails struct { IndicesWithReadonlyBlock int64 `json:"indices_with_readonly_block"` NodesOverFloodStageWatermark int64 `json:"nodes_over_flood_stage_watermark"` diff --git a/typedapi/types/diskusage.go b/typedapi/types/diskusage.go index c988ad6bfd..4bda137666 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DiskUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L62-L69 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/types.ts#L63-L70 type DiskUsage struct { FreeBytes int64 `json:"free_bytes"` FreeDiskPercent Float64 `json:"free_disk_percent"` diff --git a/typedapi/types/dismaxquery.go b/typedapi/types/dismaxquery.go index def2ef8107..0e3a90b33f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DisMaxQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L79-L91 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/dissectprocessor.go b/typedapi/types/dissectprocessor.go index 0fa9f1de84..3d254db484 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DissectProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L571-L590 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L804-L823 type DissectProcessor struct { // AppendSeparator The character(s) that separate the appended fields. AppendSeparator *string `json:"append_separator,omitempty"` diff --git a/typedapi/types/distancefeaturequery.go b/typedapi/types/distancefeaturequery.go index 1c04345c37..0e16b7ef93 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ package types // GeoDistanceFeatureQuery // DateDistanceFeatureQuery // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L77-L85 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L76-L85 type DistanceFeatureQuery any diff --git a/typedapi/types/distancefeaturequerybasedatemathduration.go b/typedapi/types/distancefeaturequerybasedatemathduration.go index 267032b9c0..9c7bcb5041 100644 --- a/typedapi/types/distancefeaturequerybasedatemathduration.go +++ b/typedapi/types/distancefeaturequerybasedatemathduration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DistanceFeatureQueryBaseDateMathDuration type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L40-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L39-L59 type DistanceFeatureQueryBaseDateMathDuration struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/distancefeaturequerybasegeolocationdistance.go b/typedapi/types/distancefeaturequerybasegeolocationdistance.go index d6bae3171c..ea8045869a 100644 --- a/typedapi/types/distancefeaturequerybasegeolocationdistance.go +++ b/typedapi/types/distancefeaturequerybasegeolocationdistance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DistanceFeatureQueryBaseGeoLocationDistance type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L40-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L39-L59 type DistanceFeatureQueryBaseGeoLocationDistance struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/diversifiedsampleraggregation.go b/typedapi/types/diversifiedsampleraggregation.go index 04a05c0e98..527fd79fab 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DiversifiedSamplerAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L322-L343 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/docstats.go b/typedapi/types/docstats.go index 19f44d8362..a3208319ac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DocStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L97-L109 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L97-L109 type DocStats struct { // Count Total number of non-deleted documents across all primary shards assigned to // selected nodes. diff --git a/typedapi/types/document.go b/typedapi/types/document.go index 7a332b5964..3f82b5ef64 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Document type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/simulate/types.ts#L41-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/simulate/types.ts#L62-L76 type Document struct { // Id_ Unique identifier for the document. // This ID must be unique within the `_index`. diff --git a/typedapi/types/documentrating.go b/typedapi/types/documentrating.go index 96cfcdeb8b..8fecce01dd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DocumentRating type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L119-L126 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/rank_eval/types.ts#L119-L126 type DocumentRating struct { // Id_ The document ID. Id_ string `json:"_id"` diff --git a/typedapi/types/documentsimulation.go b/typedapi/types/documentsimulation.go index 31d0aa5c12..9dff493b3b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DocumentSimulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/simulate/types.ts#L57-L87 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/simulate/types.ts#L78-L108 type DocumentSimulation struct { DocumentSimulation map[string]string `json:"-"` // Id_ Unique identifier for the document. This ID must be unique within the diff --git a/typedapi/types/dotexpanderprocessor.go b/typedapi/types/dotexpanderprocessor.go index 9967217d24..7e7c3fce8a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DotExpanderProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L592-L603 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L825-L843 type DotExpanderProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -45,6 +45,13 @@ type DotExpanderProcessor struct { IgnoreFailure *bool `json:"ignore_failure,omitempty"` // OnFailure Handle failures for the processor. OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // Override Controls the behavior when there is already an existing nested object that + // conflicts with the expanded field. + // When `false`, the processor will merge conflicts by combining the old and the + // new values into an array. + // When `true`, the value from the expanded field will overwrite the existing + // value. + Override *bool `json:"override,omitempty"` // Path The field that contains the field to expand. // Only required if the field to expand is part another object field, because // the `field` option can only understand leaf fields. @@ -117,6 +124,20 @@ func (s *DotExpanderProcessor) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "OnFailure", err) } + case "override": + 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", "Override", err) + } + s.Override = &value + case bool: + s.Override = &v + } + case "path": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/doublenumberproperty.go b/typedapi/types/doublenumberproperty.go index aaa1938a43..bad1f63433 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // DoubleNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L152-L155 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L152-L155 type DoubleNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -52,7 +52,6 @@ type DoubleNumberProperty struct { OnScriptError *onscripterror.OnScriptError `json:"on_script_error,omitempty"` Properties map[string]Property `json:"properties,omitempty"` Script *Script `json:"script,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` // TimeSeriesDimension For internal use by Elastic only. Marks the field as a time series dimension. // Defaults to false. @@ -859,18 +858,6 @@ func (s *DoubleNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Script", err) } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -932,7 +919,6 @@ func (s DoubleNumberProperty) MarshalJSON() ([]byte, error) { OnScriptError: s.OnScriptError, Properties: s.Properties, Script: s.Script, - Similarity: s.Similarity, Store: s.Store, TimeSeriesDimension: s.TimeSeriesDimension, TimeSeriesMetric: s.TimeSeriesMetric, diff --git a/typedapi/types/doublerangeproperty.go b/typedapi/types/doublerangeproperty.go index 05db02b046..92fbf9bdcd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // DoubleRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/range.ts#L34-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/range.ts#L34-L36 type DoubleRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -46,7 +46,6 @@ type DoubleRangeProperty struct { // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -807,18 +806,6 @@ func (s *DoubleRangeProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -857,7 +844,6 @@ func (s DoubleRangeProperty) MarshalJSON() ([]byte, error) { Index: s.Index, Meta: s.Meta, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/doubletermsaggregate.go b/typedapi/types/doubletermsaggregate.go index 5a9a2c3fbc..4acc3ec3b9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DoubleTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L413-L418 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L451-L456 type DoubleTermsAggregate struct { Buckets BucketsDoubleTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/doubletermsbucket.go b/typedapi/types/doubletermsbucket.go index 5d67f15197..820b9acdea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // DoubleTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L420-L423 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L458-L461 type DoubleTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -531,6 +531,13 @@ func (s *DoubleTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/downsampleaction.go b/typedapi/types/downsampleaction.go index 5c4d21fcab..5c9796b101 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DownsampleAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L115-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L115-L118 type DownsampleAction struct { FixedInterval string `json:"fixed_interval"` WaitTimeout Duration `json:"wait_timeout,omitempty"` diff --git a/typedapi/types/downsampleconfig.go b/typedapi/types/downsampleconfig.go index 7a69e69e62..9924ccf49f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DownsampleConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/Downsample.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/downsamplinground.go b/typedapi/types/downsamplinground.go index 106f02d04a..782141cc3c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // DownsamplingRound type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/DownsamplingRound.ts#L23-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/dropprocessor.go b/typedapi/types/dropprocessor.go index 25b3cc8daa..cdc687917e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // DropProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L605-L605 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L845-L845 type DropProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/duration.go b/typedapi/types/duration.go index 156c7aa194..49f4fc53d5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -24,5 +24,5 @@ package types // // string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Time.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Time.ts#L52-L58 type Duration any diff --git a/typedapi/types/durationvalueunitfloatmillis.go b/typedapi/types/durationvalueunitfloatmillis.go index 3cd294ad7d..222759e310 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DurationValueUnitFloatMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Time.ts#L67-L67 type DurationValueUnitFloatMillis Float64 diff --git a/typedapi/types/durationvalueunitmillis.go b/typedapi/types/durationvalueunitmillis.go index d7c9da91f3..856ac8da2b 100644 --- a/typedapi/types/durationvalueunitmillis.go +++ b/typedapi/types/durationvalueunitmillis.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DurationValueUnitMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Time.ts#L67-L67 type DurationValueUnitMillis int64 diff --git a/typedapi/types/durationvalueunitnanos.go b/typedapi/types/durationvalueunitnanos.go index a483fb2487..d5b5c7a3f6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DurationValueUnitNanos type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Time.ts#L67-L67 type DurationValueUnitNanos int64 diff --git a/typedapi/types/durationvalueunitseconds.go b/typedapi/types/durationvalueunitseconds.go index 001a2fb539..1fdb397ea3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // DurationValueUnitSeconds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Time.ts#L67-L67 type DurationValueUnitSeconds int64 diff --git a/typedapi/types/dutchanalyzer.go b/typedapi/types/dutchanalyzer.go index 617ef0b8b4..574b0daff2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,14 +26,17 @@ import ( "errors" "fmt" "io" + "strconv" ) // DutchAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L61-L64 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L134-L139 type DutchAnalyzer struct { - Stopwords []string `json:"stopwords,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords []string `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *DutchAnalyzer) UnmarshalJSON(data []byte) error { @@ -51,6 +54,11 @@ func (s *DutchAnalyzer) UnmarshalJSON(data []byte) error { switch t { + case "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + case "stopwords": rawMsg := json.RawMessage{} dec.Decode(&rawMsg) @@ -67,6 +75,18 @@ func (s *DutchAnalyzer) UnmarshalJSON(data []byte) error { } } + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + case "type": if err := dec.Decode(&s.Type); err != nil { return fmt.Errorf("%s | %w", "Type", err) @@ -81,8 +101,10 @@ func (s *DutchAnalyzer) UnmarshalJSON(data []byte) error { func (s DutchAnalyzer) MarshalJSON() ([]byte, error) { type innerDutchAnalyzer DutchAnalyzer tmp := innerDutchAnalyzer{ - Stopwords: s.Stopwords, - Type: s.Type, + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, } tmp.Type = "dutch" diff --git a/typedapi/types/dynamicproperty.go b/typedapi/types/dynamicproperty.go index cf12c0cf61..d35424027a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -37,7 +37,7 @@ import ( // DynamicProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L300-L331 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L302-L333 type DynamicProperty struct { Analyzer *string `json:"analyzer,omitempty"` Boost *Float64 `json:"boost,omitempty"` @@ -67,7 +67,6 @@ type DynamicProperty struct { Script *Script `json:"script,omitempty"` SearchAnalyzer *string `json:"search_analyzer,omitempty"` SearchQuoteAnalyzer *string `json:"search_quote_analyzer,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` TermVector *termvectoroption.TermVectorOption `json:"term_vector,omitempty"` TimeSeriesMetric *timeseriesmetrictype.TimeSeriesMetricType `json:"time_series_metric,omitempty"` @@ -1017,18 +1016,6 @@ func (s *DynamicProperty) UnmarshalJSON(data []byte) error { } s.SearchQuoteAnalyzer = &o - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -1094,7 +1081,6 @@ func (s DynamicProperty) MarshalJSON() ([]byte, error) { Script: s.Script, SearchAnalyzer: s.SearchAnalyzer, SearchQuoteAnalyzer: s.SearchQuoteAnalyzer, - Similarity: s.Similarity, Store: s.Store, TermVector: s.TermVector, TimeSeriesMetric: s.TimeSeriesMetric, diff --git a/typedapi/types/dynamictemplate.go b/typedapi/types/dynamictemplate.go index 8c7a5b7923..92d38df968 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // DynamicTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/dynamic-template.ts#L22-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/dynamic-template.ts#L22-L42 type DynamicTemplate struct { Mapping Property `json:"mapping,omitempty"` Match []string `json:"match,omitempty"` diff --git a/typedapi/types/edgengramtokenfilter.go b/typedapi/types/edgengramtokenfilter.go index c3ccb552a4..4ae5c9031c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // EdgeNGramTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L79-L85 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L78-L84 type EdgeNGramTokenFilter struct { MaxGram *int `json:"max_gram,omitempty"` MinGram *int `json:"min_gram,omitempty"` diff --git a/typedapi/types/edgengramtokenizer.go b/typedapi/types/edgengramtokenizer.go index b0691c7038..7973448272 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,12 +33,12 @@ import ( // EdgeNGramTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L31-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L48-L57 type EdgeNGramTokenizer struct { CustomTokenChars *string `json:"custom_token_chars,omitempty"` - MaxGram int `json:"max_gram"` - MinGram int `json:"min_gram"` - TokenChars []tokenchar.TokenChar `json:"token_chars"` + MaxGram *int `json:"max_gram,omitempty"` + MinGram *int `json:"min_gram,omitempty"` + TokenChars []tokenchar.TokenChar `json:"token_chars,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` } @@ -80,10 +80,10 @@ func (s *EdgeNGramTokenizer) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "MaxGram", err) } - s.MaxGram = value + s.MaxGram = &value case float64: f := int(v) - s.MaxGram = f + s.MaxGram = &f } case "min_gram": @@ -96,10 +96,10 @@ func (s *EdgeNGramTokenizer) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "MinGram", err) } - s.MinGram = value + s.MinGram = &value case float64: f := int(v) - s.MinGram = f + s.MinGram = &f } case "token_chars": diff --git a/typedapi/types/elasticsearchversioninfo.go b/typedapi/types/elasticsearchversioninfo.go index 852c3a55ac..0dedfd8988 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ElasticsearchVersionInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Base.ts#L54-L64 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Base.ts#L54-L64 type ElasticsearchVersionInfo struct { BuildDate DateTime `json:"build_date"` BuildFlavor string `json:"build_flavor"` diff --git a/typedapi/types/elasticsearchversionmininfo.go b/typedapi/types/elasticsearchversionmininfo.go index 63249c54fe..38b51fef30 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ElasticsearchVersionMinInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Base.ts#L66-L74 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Base.ts#L66-L74 type ElasticsearchVersionMinInfo struct { BuildFlavor string `json:"build_flavor"` Int string `json:"number"` diff --git a/typedapi/types/elisiontokenfilter.go b/typedapi/types/elisiontokenfilter.go index 4ac6893ef9..81af028aa7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ElisionTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L189-L194 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L188-L193 type ElisionTokenFilter struct { Articles []string `json:"articles,omitempty"` ArticlesCase Stringifiedboolean `json:"articles_case,omitempty"` diff --git a/typedapi/types/email.go b/typedapi/types/email.go index 74e75c6a8b..a811fbb1f9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // Email type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L238-L250 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L238-L250 type Email struct { Attachments map[string]EmailAttachmentContainer `json:"attachments,omitempty"` Bcc []string `json:"bcc,omitempty"` diff --git a/typedapi/types/emailaction.go b/typedapi/types/emailaction.go index 08a7880f47..4153a13ab6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // EmailAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L252-L252 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L252-L252 type EmailAction struct { Attachments map[string]EmailAttachmentContainer `json:"attachments,omitempty"` Bcc []string `json:"bcc,omitempty"` diff --git a/typedapi/types/emailattachmentcontainer.go b/typedapi/types/emailattachmentcontainer.go index 14b11c7dea..e3441fb0d6 100644 --- a/typedapi/types/emailattachmentcontainer.go +++ b/typedapi/types/emailattachmentcontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // EmailAttachmentContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L211-L216 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L211-L216 type EmailAttachmentContainer struct { Data *DataEmailAttachment `json:"data,omitempty"` Http *HttpEmailAttachment `json:"http,omitempty"` diff --git a/typedapi/types/emailbody.go b/typedapi/types/emailbody.go index 5c59aea0c8..8ce31b13bd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // EmailBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L192-L195 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L192-L195 type EmailBody struct { Html *string `json:"html,omitempty"` Text *string `json:"text,omitempty"` diff --git a/typedapi/types/emailresult.go b/typedapi/types/emailresult.go index b4d97b58ff..bc6ed3f02c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // EmailResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L205-L209 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L205-L209 type EmailResult struct { Account *string `json:"account,omitempty"` Message Email `json:"message"` diff --git a/typedapi/types/emptyobject.go b/typedapi/types/emptyobject.go index 8f2a426800..7d13c8099f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // EmptyObject type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L160-L161 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L161-L162 type EmptyObject struct { } diff --git a/typedapi/types/englishanalyzer.go b/typedapi/types/englishanalyzer.go new file mode 100644 index 0000000000..98d4a3f434 --- /dev/null +++ b/typedapi/types/englishanalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// EnglishAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L141-L146 +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"` +} + +func (s *EnglishAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 EnglishAnalyzer) MarshalJSON() ([]byte, error) { + type innerEnglishAnalyzer EnglishAnalyzer + tmp := innerEnglishAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "english" + + return json.Marshal(tmp) +} + +// NewEnglishAnalyzer returns a EnglishAnalyzer. +func NewEnglishAnalyzer() *EnglishAnalyzer { + r := &EnglishAnalyzer{} + + return r +} diff --git a/typedapi/types/enrichpolicy.go b/typedapi/types/enrichpolicy.go index 12ccf3d743..b683ab7c41 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // EnrichPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/_types/Policy.ts#L34-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/enrich/_types/Policy.ts#L34-L41 type EnrichPolicy struct { ElasticsearchVersion *string `json:"elasticsearch_version,omitempty"` EnrichFields []string `json:"enrich_fields"` diff --git a/typedapi/types/enrichprocessor.go b/typedapi/types/enrichprocessor.go index 4f4549264b..90939505c9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // EnrichProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L607-L646 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L847-L886 type EnrichProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/ensemble.go b/typedapi/types/ensemble.go index e46f925269..22ec25f5a9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Ensemble type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L93-L99 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L93-L99 type Ensemble struct { AggregateOutput *AggregateOutput `json:"aggregate_output,omitempty"` ClassificationLabels []string `json:"classification_labels,omitempty"` diff --git a/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go b/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go index 987974e0e7..d1d9ae0b67 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package accesstokengranttype package accesstokengranttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_token/types.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_token/types.ts#L23-L28 type AccessTokenGrantType struct { Name string } diff --git a/typedapi/types/enums/acknowledgementoptions/acknowledgementoptions.go b/typedapi/types/enums/acknowledgementoptions/acknowledgementoptions.go index 49138de3bb..3de0240eff 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package acknowledgementoptions package acknowledgementoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Action.ts#L109-L113 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d2d4a15bfd..b7a86430cc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package actionexecutionmode package actionexecutionmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Action.ts#L73-L94 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 83383a5c76..2cf021021f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package actionstatusoptions package actionstatusoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Action.ts#L102-L107 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 44e0cecc16..28c32c076d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package actiontype package actiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Action.ts#L64-L71 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Action.ts#L58-L65 type ActionType struct { Name string } diff --git a/typedapi/types/enums/allocationexplaindecision/allocationexplaindecision.go b/typedapi/types/enums/allocationexplaindecision/allocationexplaindecision.go index 2e759582a2..23d363d771 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package allocationexplaindecision package allocationexplaindecision import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/types.ts#L33-L38 type AllocationExplainDecision struct { Name string } diff --git a/typedapi/types/enums/apikeygranttype/apikeygranttype.go b/typedapi/types/enums/apikeygranttype/apikeygranttype.go index 81296134c6..3443d66ede 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package apikeygranttype package apikeygranttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/grant_api_key/types.ts#L48-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/grant_api_key/types.ts#L48-L51 type ApiKeyGrantType struct { Name string } diff --git a/typedapi/types/enums/apikeytype/apikeytype.go b/typedapi/types/enums/apikeytype/apikeytype.go new file mode 100644 index 0000000000..3047b994a3 --- /dev/null +++ b/typedapi/types/enums/apikeytype/apikeytype.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Package apikeytype +package apikeytype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/ApiKey.ts#L115-L118 +type ApiKeyType struct { + Name string +} + +var ( + Rest = ApiKeyType{"rest"} + + Crosscluster = ApiKeyType{"cross_cluster"} +) + +func (a ApiKeyType) MarshalText() (text []byte, err error) { + return []byte(a.String()), nil +} + +func (a *ApiKeyType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "rest": + *a = Rest + case "cross_cluster": + *a = Crosscluster + default: + *a = ApiKeyType{string(text)} + } + + return nil +} + +func (a ApiKeyType) String() string { + return a.Name +} diff --git a/typedapi/types/enums/appliesto/appliesto.go b/typedapi/types/enums/appliesto/appliesto.go index ef2071f37f..4af4ac7a92 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package appliesto package appliesto import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Rule.ts#L67-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Rule.ts#L67-L72 type AppliesTo struct { Name string } diff --git a/typedapi/types/enums/boundaryscanner/boundaryscanner.go b/typedapi/types/enums/boundaryscanner/boundaryscanner.go index 9684edfc25..7ce81efa1e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package boundaryscanner package boundaryscanner import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/highlighting.ts#L27-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 b4c8b16ea1..e3bede9062 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package bytes package bytes import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L169-L181 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L170-L182 type Bytes struct { Name string } diff --git a/typedapi/types/enums/calendarinterval/calendarinterval.go b/typedapi/types/enums/calendarinterval/calendarinterval.go index 53df56e7f1..2036f45ed9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package calendarinterval package calendarinterval import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L251-L268 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 2c86be3147..c598f8e4e9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package cardinalityexecutionmode package cardinalityexecutionmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L64-L85 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L64-L85 type CardinalityExecutionMode struct { Name string } diff --git a/typedapi/types/enums/catanomalydetectorcolumn/catanomalydetectorcolumn.go b/typedapi/types/enums/catanomalydetectorcolumn/catanomalydetectorcolumn.go index 9e0821de5c..1a4643aa07 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package catanomalydetectorcolumn package catanomalydetectorcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/_types/CatBase.ts#L32-L401 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 736933ca75..9662d4dcea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package catdatafeedcolumn package catdatafeedcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/_types/CatBase.ts#L405-L471 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1097e00f52..ac53bdea93 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package catdfacolumn package catdfacolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/_types/CatBase.ts#L472-L557 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/_types/CatBase.ts#L472-L557 type CatDfaColumn struct { Name string } diff --git a/typedapi/types/enums/categorizationstatus/categorizationstatus.go b/typedapi/types/enums/categorizationstatus/categorizationstatus.go index a80b0f2fcb..a5b35a0051 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package categorizationstatus package categorizationstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Model.ts#L83-L86 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Model.ts#L84-L87 type CategorizationStatus struct { Name string } diff --git a/typedapi/types/enums/cattrainedmodelscolumn/cattrainedmodelscolumn.go b/typedapi/types/enums/cattrainedmodelscolumn/cattrainedmodelscolumn.go index ab392bdbc6..522e4d0582 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package cattrainedmodelscolumn package cattrainedmodelscolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/_types/CatBase.ts#L561-L635 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/_types/CatBase.ts#L561-L635 type CatTrainedModelsColumn struct { Name string } diff --git a/typedapi/types/enums/cattransformcolumn/cattransformcolumn.go b/typedapi/types/enums/cattransformcolumn/cattransformcolumn.go index 3e98315153..35967d9a18 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package cattransformcolumn package cattransformcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/_types/CatBase.ts#L640-L844 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/_types/CatBase.ts#L640-L844 type CatTransformColumn struct { Name string } diff --git a/typedapi/types/enums/childscoremode/childscoremode.go b/typedapi/types/enums/childscoremode/childscoremode.go index ce849581f0..c86a32252e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package childscoremode package childscoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/joining.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 87287ef46a..0f3e20a166 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package chunkingmode package chunkingmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Datafeed.ts#L232-L236 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Datafeed.ts#L245-L249 type ChunkingMode struct { Name string } diff --git a/typedapi/types/enums/clusterinfotarget/clusterinfotarget.go b/typedapi/types/enums/clusterinfotarget/clusterinfotarget.go index d9547c1d1b..e966018e92 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package clusterinfotarget package clusterinfotarget import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L381-L387 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L382-L388 type ClusterInfoTarget struct { Name string } diff --git a/typedapi/types/enums/clusterprivilege/clusterprivilege.go b/typedapi/types/enums/clusterprivilege/clusterprivilege.go index 7cd28074a2..5978e1bb14 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package clusterprivilege package clusterprivilege import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L42-L195 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L42-L199 type ClusterPrivilege struct { Name string } @@ -117,6 +117,8 @@ var ( Monitorsnapshot = ClusterPrivilege{"monitor_snapshot"} + Monitorstats = ClusterPrivilege{"monitor_stats"} + Monitortextstructure = ClusterPrivilege{"monitor_text_structure"} Monitortransform = ClusterPrivilege{"monitor_transform"} @@ -241,6 +243,8 @@ func (c *ClusterPrivilege) UnmarshalText(text []byte) error { *c = Monitorrollup case "monitor_snapshot": *c = Monitorsnapshot + case "monitor_stats": + *c = Monitorstats case "monitor_text_structure": *c = Monitortextstructure case "monitor_transform": diff --git a/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go b/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go index ce18ead4c2..eb1e5f1aa2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package clustersearchstatus package clustersearchstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L37-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L37-L43 type ClusterSearchStatus struct { Name string } diff --git a/typedapi/types/enums/combinedfieldsoperator/combinedfieldsoperator.go b/typedapi/types/enums/combinedfieldsoperator/combinedfieldsoperator.go index 7d1df5a360..b270067ed1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package combinedfieldsoperator package combinedfieldsoperator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/abstractions.ts#L509-L512 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/abstractions.ts#L512-L515 type CombinedFieldsOperator struct { Name string } diff --git a/typedapi/types/enums/combinedfieldszeroterms/combinedfieldszeroterms.go b/typedapi/types/enums/combinedfieldszeroterms/combinedfieldszeroterms.go index 2b9823d622..c471806b0a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package combinedfieldszeroterms package combinedfieldszeroterms import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/abstractions.ts#L514-L523 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/abstractions.ts#L517-L526 type CombinedFieldsZeroTerms struct { Name string } diff --git a/typedapi/types/enums/conditionop/conditionop.go b/typedapi/types/enums/conditionop/conditionop.go index f6f569281e..564ce9df99 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package conditionop package conditionop import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Conditions.ts#L41-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Conditions.ts#L41-L48 type ConditionOp struct { Name string } diff --git a/typedapi/types/enums/conditionoperator/conditionoperator.go b/typedapi/types/enums/conditionoperator/conditionoperator.go index ddbb089104..4d9ee94c4f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package conditionoperator package conditionoperator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Rule.ts#L74-L79 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 31d6537e50..a96f1c6359 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package conditiontype package conditiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Conditions.ts#L64-L70 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Conditions.ts#L64-L70 type ConditionType struct { Name string } diff --git a/typedapi/types/enums/conflicts/conflicts.go b/typedapi/types/enums/conflicts/conflicts.go index 6d57ffef00..18dfee2f23 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package conflicts package conflicts import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L183-L192 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L184-L193 type Conflicts struct { Name string } diff --git a/typedapi/types/enums/connectionscheme/connectionscheme.go b/typedapi/types/enums/connectionscheme/connectionscheme.go index a1972b6cb4..ff15290981 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package connectionscheme package connectionscheme import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e247e211d5..97dbb48f80 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package connectorfieldtype package connectorfieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L43-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 7df0e658ee..375ab816b5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package connectorstatus package connectorstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L130-L136 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 83578a07b2..bb541c302b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package converttype package converttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L435-L443 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L661-L670 type ConvertType struct { Name string } @@ -33,14 +33,16 @@ var ( Long = ConvertType{"long"} - Float = ConvertType{"float"} - Double = ConvertType{"double"} - String = ConvertType{"string"} + Float = ConvertType{"float"} Boolean = ConvertType{"boolean"} + Ip = ConvertType{"ip"} + + String = ConvertType{"string"} + Auto = ConvertType{"auto"} ) @@ -55,14 +57,16 @@ func (c *ConvertType) UnmarshalText(text []byte) error { *c = Integer case "long": *c = Long - case "float": - *c = Float case "double": *c = Double - case "string": - *c = String + case "float": + *c = Float case "boolean": *c = Boolean + case "ip": + *c = Ip + case "string": + *c = String case "auto": *c = Auto default: diff --git a/typedapi/types/enums/dataattachmentformat/dataattachmentformat.go b/typedapi/types/enums/dataattachmentformat/dataattachmentformat.go index 527dce8c13..54ca47f78d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package dataattachmentformat package dataattachmentformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L187-L190 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f4aae943e3..9ba585e6b5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package datafeedstate package datafeedstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Datafeed.ts#L132-L137 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 dc3fec20a7..722107b69e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package dataframestate package dataframestate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Dataframe.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ef45a6c358..d6ec7334a6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package day package day import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Schedule.ts#L37-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 52425c32ad..46521b60c9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package decision package decision import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L86-L95 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/types.ts#L92-L101 type Decision struct { Name string } diff --git a/typedapi/types/enums/delimitedpayloadencoding/delimitedpayloadencoding.go b/typedapi/types/enums/delimitedpayloadencoding/delimitedpayloadencoding.go index 0787b07dff..f2a102da79 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package delimitedpayloadencoding package delimitedpayloadencoding import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L62-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L61-L65 type DelimitedPayloadEncoding struct { Name string } diff --git a/typedapi/types/enums/deploymentallocationstate/deploymentallocationstate.go b/typedapi/types/enums/deploymentallocationstate/deploymentallocationstate.go index 6743608f53..c7fe175cae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package deploymentallocationstate package deploymentallocationstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L289-L302 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L318-L331 type DeploymentAllocationState struct { Name string } diff --git a/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go b/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go index a7b343c844..811f3ba8cb 100644 --- a/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go +++ b/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go @@ -16,23 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package deploymentassignmentstate package deploymentassignmentstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L304-L309 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L333-L350 type DeploymentAssignmentState struct { Name string } var ( - Starting = DeploymentAssignmentState{"starting"} - Started = DeploymentAssignmentState{"started"} + Starting = DeploymentAssignmentState{"starting"} + Stopping = DeploymentAssignmentState{"stopping"} Failed = DeploymentAssignmentState{"failed"} @@ -45,10 +45,10 @@ func (d DeploymentAssignmentState) MarshalText() (text []byte, err error) { func (d *DeploymentAssignmentState) UnmarshalText(text []byte) error { switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { - case "starting": - *d = Starting case "started": *d = Started + case "starting": + *d = Starting case "stopping": *d = Stopping case "failed": diff --git a/typedapi/types/enums/deprecationlevel/deprecationlevel.go b/typedapi/types/enums/deprecationlevel/deprecationlevel.go index 38630ba1e0..a33efda240 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package deprecationlevel package deprecationlevel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/migration/deprecations/types.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 532de93a25..9fcde10feb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package dfiindependencemeasure package dfiindependencemeasure import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Similarity.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 b1353ebd7f..034b76ebf9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package dfraftereffect package dfraftereffect import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Similarity.ts#L26-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 bbf2f8cf0b..b913cbdb23 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package dfrbasicmodel package dfrbasicmodel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Similarity.ts#L32-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f0016dba27..3156a68e8e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package displaytype package displaytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L35-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 3adf0f6e5e..55d93729be 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package distanceunit package distanceunit import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L30-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 3bfcf59438..00f5102059 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package dynamicmapping package dynamicmapping import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/dynamic-template.ts#L49-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/dynamic-template.ts#L49-L58 type DynamicMapping struct { Name string } diff --git a/typedapi/types/enums/edgengramside/edgengramside.go b/typedapi/types/enums/edgengramside/edgengramside.go index b17841f856..40d7be1e87 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package edgengramside package edgengramside import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L74-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L73-L76 type EdgeNGramSide struct { Name string } diff --git a/typedapi/types/enums/emailpriority/emailpriority.go b/typedapi/types/enums/emailpriority/emailpriority.go index db919669a8..0bafaeef1a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package emailpriority package emailpriority import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L197-L203 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 89716402f6..cad4271c81 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package enrichpolicyphase package enrichpolicyphase import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/execute_policy/types.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/enrich/execute_policy/types.ts#L24-L29 type EnrichPolicyPhase struct { Name string } diff --git a/typedapi/types/enums/esqlformat/esqlformat.go b/typedapi/types/enums/esqlformat/esqlformat.go new file mode 100644 index 0000000000..6c4fdcfab2 --- /dev/null +++ b/typedapi/types/enums/esqlformat/esqlformat.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Package esqlformat +package esqlformat + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/esql/query/QueryRequest.ts#L93-L102 +type EsqlFormat struct { + Name string +} + +var ( + Csv = EsqlFormat{"csv"} + + Json = EsqlFormat{"json"} + + Tsv = EsqlFormat{"tsv"} + + Txt = EsqlFormat{"txt"} + + Yaml = EsqlFormat{"yaml"} + + Cbor = EsqlFormat{"cbor"} + + Smile = EsqlFormat{"smile"} + + Arrow = EsqlFormat{"arrow"} +) + +func (e EsqlFormat) MarshalText() (text []byte, err error) { + return []byte(e.String()), nil +} + +func (e *EsqlFormat) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "csv": + *e = Csv + case "json": + *e = Json + case "tsv": + *e = Tsv + case "txt": + *e = Txt + case "yaml": + *e = Yaml + case "cbor": + *e = Cbor + case "smile": + *e = Smile + case "arrow": + *e = Arrow + default: + *e = EsqlFormat{string(text)} + } + + return nil +} + +func (e EsqlFormat) String() string { + return e.Name +} diff --git a/typedapi/types/enums/excludefrequent/excludefrequent.go b/typedapi/types/enums/excludefrequent/excludefrequent.go index 40ed2207cb..264ef5f2ec 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package excludefrequent package excludefrequent import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Detector.ts#L127-L132 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 fded6bd51c..b1c891c927 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package executionphase package executionphase import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Execution.ts#L49-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d449cb3cdb..00a37ffbdf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package executionstatus package executionstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Execution.ts#L38-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 7e17963878..c359487c9e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package expandwildcard package expandwildcard import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L201-L215 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L202-L216 type ExpandWildcard struct { Name string } diff --git a/typedapi/types/enums/feature/feature.go b/typedapi/types/enums/feature/feature.go index df58249335..2a214514d2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package feature package feature import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get/IndicesGetRequest.ts#L91-L95 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get/IndicesGetRequest.ts#L91-L95 type Feature struct { Name string } diff --git a/typedapi/types/enums/fieldsortnumerictype/fieldsortnumerictype.go b/typedapi/types/enums/fieldsortnumerictype/fieldsortnumerictype.go index d6705fb767..61f047de60 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package fieldsortnumerictype package fieldsortnumerictype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L37-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 87f2b48f6e..99e37b0afa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package fieldtype package fieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/Property.ts#L166-L213 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/Property.ts#L166-L213 type FieldType struct { Name string } diff --git a/typedapi/types/enums/fieldvaluefactormodifier/fieldvaluefactormodifier.go b/typedapi/types/enums/fieldvaluefactormodifier/fieldvaluefactormodifier.go index c9e587e100..c8c4c94296 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package fieldvaluefactormodifier package fieldvaluefactormodifier import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L310-L353 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 6dbff4f4dc..6a4a3181d2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package filteringpolicy package filteringpolicy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L155-L158 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 2bd6fa2ab6..be16c21fca 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package filteringrulerule package filteringrulerule import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L160-L168 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 99a53eadf9..e8fd530aa5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package filteringvalidationstate package filteringvalidationstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L186-L190 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e4fe783a38..21be702df3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package filtertype package filtertype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Filter.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 new file mode 100644 index 0000000000..a66c83ea79 --- /dev/null +++ b/typedapi/types/enums/fingerprintdigest/fingerprintdigest.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Package fingerprintdigest +package fingerprintdigest + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L896-L902 +type FingerprintDigest struct { + Name string +} + +var ( + Md5 = FingerprintDigest{"MD5"} + + Sha1 = FingerprintDigest{"SHA-1"} + + Sha256 = FingerprintDigest{"SHA-256"} + + Sha512 = FingerprintDigest{"SHA-512"} + + MurmurHash3 = FingerprintDigest{"MurmurHash3"} +) + +func (f FingerprintDigest) MarshalText() (text []byte, err error) { + return []byte(f.String()), nil +} + +func (f *FingerprintDigest) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "MD5": + *f = Md5 + case "SHA-1": + *f = Sha1 + case "SHA-256": + *f = Sha256 + case "SHA-512": + *f = Sha512 + case "MurmurHash3": + *f = MurmurHash3 + default: + *f = FingerprintDigest{string(text)} + } + + return nil +} + +func (f FingerprintDigest) String() string { + return f.Name +} diff --git a/typedapi/types/enums/followerindexstatus/followerindexstatus.go b/typedapi/types/enums/followerindexstatus/followerindexstatus.go index 90b9d9a5ea..89aee1d0cf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package followerindexstatus package followerindexstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/follow_info/types.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/follow_info/types.ts#L32-L35 type FollowerIndexStatus struct { Name string } diff --git a/typedapi/types/enums/functionboostmode/functionboostmode.go b/typedapi/types/enums/functionboostmode/functionboostmode.go index b159b01208..fdaf52c751 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package functionboostmode package functionboostmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L282-L308 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 650484638f..2756d5a340 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package functionscoremode package functionscoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L255-L280 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 89fa23205e..d0ebd3088b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package gappolicy package gappolicy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L61-L76 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 e6e6104931..dd0c5d9343 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package geodistancetype package geodistancetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L42-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 65bb2709b1..d2a2aec53d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package geoexecution package geoexecution import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/geo.ts#L55-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/geo.ts#L56-L59 type GeoExecution struct { Name string } diff --git a/typedapi/types/enums/geogridtargetformat/geogridtargetformat.go b/typedapi/types/enums/geogridtargetformat/geogridtargetformat.go new file mode 100644 index 0000000000..df94931e77 --- /dev/null +++ b/typedapi/types/enums/geogridtargetformat/geogridtargetformat.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Package geogridtargetformat +package geogridtargetformat + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L437-L440 +type GeoGridTargetFormat struct { + Name string +} + +var ( + Geojson = GeoGridTargetFormat{"geojson"} + + Wkt = GeoGridTargetFormat{"wkt"} +) + +func (g GeoGridTargetFormat) MarshalText() (text []byte, err error) { + return []byte(g.String()), nil +} + +func (g *GeoGridTargetFormat) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "geojson": + *g = Geojson + case "wkt": + *g = Wkt + default: + *g = GeoGridTargetFormat{string(text)} + } + + return nil +} + +func (g GeoGridTargetFormat) String() string { + return g.Name +} diff --git a/typedapi/types/enums/deploymentstate/deploymentstate.go b/typedapi/types/enums/geogridtiletype/geogridtiletype.go similarity index 55% rename from typedapi/types/enums/deploymentstate/deploymentstate.go rename to typedapi/types/enums/geogridtiletype/geogridtiletype.go index acca500212..a29bf680a5 100644 --- a/typedapi/types/enums/deploymentstate/deploymentstate.go +++ b/typedapi/types/enums/geogridtiletype/geogridtiletype.go @@ -16,46 +16,46 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 -// Package deploymentstate -package deploymentstate +// Package geogridtiletype +package geogridtiletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L274-L287 -type DeploymentState struct { +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L431-L435 +type GeoGridTileType struct { Name string } var ( - Started = DeploymentState{"started"} + Geotile = GeoGridTileType{"geotile"} - Starting = DeploymentState{"starting"} + Geohex = GeoGridTileType{"geohex"} - Stopping = DeploymentState{"stopping"} + Geohash = GeoGridTileType{"geohash"} ) -func (d DeploymentState) MarshalText() (text []byte, err error) { - return []byte(d.String()), nil +func (g GeoGridTileType) MarshalText() (text []byte, err error) { + return []byte(g.String()), nil } -func (d *DeploymentState) UnmarshalText(text []byte) error { +func (g *GeoGridTileType) UnmarshalText(text []byte) error { switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { - case "started": - *d = Started - case "starting": - *d = Starting - case "stopping": - *d = Stopping + case "geotile": + *g = Geotile + case "geohex": + *g = Geohex + case "geohash": + *g = Geohash default: - *d = DeploymentState{string(text)} + *g = GeoGridTileType{string(text)} } return nil } -func (d DeploymentState) String() string { - return d.Name +func (g GeoGridTileType) String() string { + return g.Name } diff --git a/typedapi/types/enums/geoorientation/geoorientation.go b/typedapi/types/enums/geoorientation/geoorientation.go index 477852d6a6..749a1587d9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package geoorientation package geoorientation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/geo.ts#L34-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/geo.ts#L34-L39 type GeoOrientation struct { Name string } diff --git a/typedapi/types/enums/geoshaperelation/geoshaperelation.go b/typedapi/types/enums/geoshaperelation/geoshaperelation.go index 1a3f9cc49c..9438923483 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package geoshaperelation package geoshaperelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L64-L82 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 778d0001dd..a79bca6b01 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package geostrategy package geostrategy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/geo.ts#L56-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/geo.ts#L56-L59 type GeoStrategy struct { Name string } diff --git a/typedapi/types/enums/geovalidationmethod/geovalidationmethod.go b/typedapi/types/enums/geovalidationmethod/geovalidationmethod.go index f9a3bf711a..6cc3ebc246 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package geovalidationmethod package geovalidationmethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/geo.ts#L159-L169 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/geo.ts#L163-L173 type GeoValidationMethod struct { Name string } diff --git a/typedapi/types/enums/granttype/granttype.go b/typedapi/types/enums/granttype/granttype.go index ac168ca265..b60dec45bd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package granttype package granttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/GrantType.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/GrantType.ts#L20-L29 type GrantType struct { Name string } diff --git a/typedapi/types/enums/gridaggregationtype/gridaggregationtype.go b/typedapi/types/enums/gridaggregationtype/gridaggregationtype.go index 412eea7626..2ead53fbfd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package gridaggregationtype package gridaggregationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search_mvt/_types/GridType.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 c998eeb1fb..d84013c952 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package gridtype package gridtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search_mvt/_types/GridType.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 16d2b33b0c..742c20cc54 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package groupby package groupby import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/tasks/_types/GroupBy.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 eff5e733ff..114087f99e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package healthstatus package healthstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L219-L239 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L220-L240 type HealthStatus struct { Name string } diff --git a/typedapi/types/enums/highlighterencoder/highlighterencoder.go b/typedapi/types/enums/highlighterencoder/highlighterencoder.go index 772d1650c4..9430d71c93 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package highlighterencoder package highlighterencoder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/highlighting.ts#L158-L161 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/highlighting.ts#L157-L160 type HighlighterEncoder struct { Name string } diff --git a/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go b/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go index 18f5ababc9..66b1780453 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package highlighterfragmenter package highlighterfragmenter import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/highlighting.ts#L163-L166 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/highlighting.ts#L162-L165 type HighlighterFragmenter struct { Name string } diff --git a/typedapi/types/enums/highlighterorder/highlighterorder.go b/typedapi/types/enums/highlighterorder/highlighterorder.go index d1c9526082..4eb14ba0cc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package highlighterorder package highlighterorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/highlighting.ts#L168-L170 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/highlighting.ts#L167-L169 type HighlighterOrder struct { Name string } diff --git a/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go b/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go index 0cfcce42a7..69929e5ae8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package highlightertagsschema package highlightertagsschema import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/highlighting.ts#L172-L174 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/highlighting.ts#L171-L173 type HighlighterTagsSchema struct { Name string } diff --git a/typedapi/types/enums/highlightertype/highlightertype.go b/typedapi/types/enums/highlightertype/highlightertype.go index c5dcf8ebc2..22c0ff98dc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package highlightertype package highlightertype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/highlighting.ts#L176-L191 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/highlighting.ts#L175-L190 type HighlighterType struct { Name string } diff --git a/typedapi/types/enums/holtwinterstype/holtwinterstype.go b/typedapi/types/enums/holtwinterstype/holtwinterstype.go index 41577f54b4..0397eef9a9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package holtwinterstype package holtwinterstype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L283-L286 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 c4e973c858..58e2392c00 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package httpinputmethod package httpinputmethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L59-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L59-L65 type HttpInputMethod struct { Name string } diff --git a/typedapi/types/enums/ibdistribution/ibdistribution.go b/typedapi/types/enums/ibdistribution/ibdistribution.go index 2cfed916e1..438773a725 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package ibdistribution package ibdistribution import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Similarity.ts#L42-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 fb84d165cc..12601e35fa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package iblambda package iblambda import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Similarity.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 642d31c2c3..fed9fdb96a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package icucollationalternate package icucollationalternate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L89-L92 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L89-L92 type IcuCollationAlternate struct { Name string } diff --git a/typedapi/types/enums/icucollationcasefirst/icucollationcasefirst.go b/typedapi/types/enums/icucollationcasefirst/icucollationcasefirst.go index 95e222e295..4f052fb1ed 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package icucollationcasefirst package icucollationcasefirst import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L94-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L94-L97 type IcuCollationCaseFirst struct { Name string } diff --git a/typedapi/types/enums/icucollationdecomposition/icucollationdecomposition.go b/typedapi/types/enums/icucollationdecomposition/icucollationdecomposition.go index cc1bfaded9..c1170ae432 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package icucollationdecomposition package icucollationdecomposition import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L99-L102 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L99-L102 type IcuCollationDecomposition struct { Name string } diff --git a/typedapi/types/enums/icucollationstrength/icucollationstrength.go b/typedapi/types/enums/icucollationstrength/icucollationstrength.go index 0cfca23c49..95d44b3dfc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package icucollationstrength package icucollationstrength import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L104-L110 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L104-L110 type IcuCollationStrength struct { Name string } diff --git a/typedapi/types/enums/icunormalizationmode/icunormalizationmode.go b/typedapi/types/enums/icunormalizationmode/icunormalizationmode.go index b977fb28f8..b7083461e6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package icunormalizationmode package icunormalizationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L78-L81 type IcuNormalizationMode struct { Name string } diff --git a/typedapi/types/enums/icunormalizationtype/icunormalizationtype.go b/typedapi/types/enums/icunormalizationtype/icunormalizationtype.go index a74b1fa8b4..09469c07ed 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package icunormalizationtype package icunormalizationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L83-L87 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L83-L87 type IcuNormalizationType struct { Name string } diff --git a/typedapi/types/enums/icutransformdirection/icutransformdirection.go b/typedapi/types/enums/icutransformdirection/icutransformdirection.go index 0a5dea67ee..1314e0f3ea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package icutransformdirection package icutransformdirection import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L73-L76 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L73-L76 type IcuTransformDirection struct { Name string } diff --git a/typedapi/types/enums/impactarea/impactarea.go b/typedapi/types/enums/impactarea/impactarea.go index 55b9d86f2f..12b504f881 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package impactarea package impactarea import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L72-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L73-L78 type ImpactArea struct { Name string } diff --git a/typedapi/types/enums/include/include.go b/typedapi/types/enums/include/include.go index 883443d4a4..32ed74deb3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package include package include import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Include.ts#L20-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 7852b2cfdd..17e5b85ee0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package indexcheckonstartup package indexcheckonstartup import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L262-L269 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L262-L269 type IndexCheckOnStartup struct { Name string } diff --git a/typedapi/types/enums/indexingjobstate/indexingjobstate.go b/typedapi/types/enums/indexingjobstate/indexingjobstate.go index c458d22e45..1846a66a8a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package indexingjobstate package indexingjobstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_jobs/types.ts#L66-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/get_jobs/types.ts#L66-L72 type IndexingJobState struct { Name string } diff --git a/typedapi/types/enums/indexmetadatastate/indexmetadatastate.go b/typedapi/types/enums/indexmetadatastate/indexmetadatastate.go index 6fa65e77f1..490026245d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package indexmetadatastate package indexmetadatastate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L225-L232 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L225-L232 type IndexMetadataState struct { Name string } diff --git a/typedapi/types/enums/indexoptions/indexoptions.go b/typedapi/types/enums/indexoptions/indexoptions.go index c91bd63b07..bcdef9a1f4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package indexoptions package indexoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L257-L262 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L258-L263 type IndexOptions struct { Name string } diff --git a/typedapi/types/enums/indexprivilege/indexprivilege.go b/typedapi/types/enums/indexprivilege/indexprivilege.go index 57fb358960..47121dcd59 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package indexprivilege package indexprivilege import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L292-L334 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L362-L404 type IndexPrivilege struct { Name string } diff --git a/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go b/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go index d09c9f58fe..fc1d29cefa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package indexroutingallocationoptions package indexroutingallocationoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexRouting.ts#L38-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ce0ffb61b5..9e74424b59 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package indexroutingrebalanceoptions package indexroutingrebalanceoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexRouting.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 3d5de14b01..3f874f9a76 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package indicatorhealthstatus package indicatorhealthstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L25-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L25-L30 type IndicatorHealthStatus struct { Name string } diff --git a/typedapi/types/enums/indicesblockoptions/indicesblockoptions.go b/typedapi/types/enums/indicesblockoptions/indicesblockoptions.go index ee331ecccf..ac9d4f6c1e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package indicesblockoptions package indicesblockoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/add_block/IndicesAddBlockRequest.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/add_block/IndicesAddBlockRequest.ts#L45-L50 type IndicesBlockOptions struct { Name string } diff --git a/typedapi/types/enums/inputtype/inputtype.go b/typedapi/types/enums/inputtype/inputtype.go index 410c75c53f..6aaae73c9c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package inputtype package inputtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L100-L104 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L100-L104 type InputType struct { Name string } diff --git a/typedapi/types/enums/jobblockedreason/jobblockedreason.go b/typedapi/types/enums/jobblockedreason/jobblockedreason.go index 4b24421a61..7a575f00fb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package jobblockedreason package jobblockedreason import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Job.ts#L397-L401 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 3611896c1d..ed55dbfa3d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package jobstate package jobstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Job.ts#L36-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 c897db940c..aebca65528 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package jsonprocessorconflictstrategy package jsonprocessorconflictstrategy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L849-L854 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1151-L1156 type JsonProcessorConflictStrategy struct { Name string } diff --git a/typedapi/types/enums/keeptypesmode/keeptypesmode.go b/typedapi/types/enums/keeptypesmode/keeptypesmode.go index e06b49ba2b..d36cf57b3f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package keeptypesmode package keeptypesmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L215-L218 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L214-L217 type KeepTypesMode struct { Name string } diff --git a/typedapi/types/enums/kuromojitokenizationmode/kuromojitokenizationmode.go b/typedapi/types/enums/kuromojitokenizationmode/kuromojitokenizationmode.go index fd99a9046f..50eea4686d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package kuromojitokenizationmode package kuromojitokenizationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/kuromoji-plugin.ts#L52-L56 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/kuromoji-plugin.ts#L52-L56 type KuromojiTokenizationMode struct { Name string } diff --git a/typedapi/types/enums/language/language.go b/typedapi/types/enums/language/language.go index b8ea254b47..f4fdff77b0 100644 --- a/typedapi/types/enums/language/language.go +++ b/typedapi/types/enums/language/language.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package language package language import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/languages.ts#L20-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/languages.ts#L20-L55 type Language struct { Name string } diff --git a/typedapi/types/enums/level/level.go b/typedapi/types/enums/level/level.go index d299dda75b..92abcec10e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package level package level import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L249-L253 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L250-L254 type Level struct { Name string } diff --git a/typedapi/types/enums/licensestatus/licensestatus.go b/typedapi/types/enums/licensestatus/licensestatus.go index c5bf3a7d36..194e0b1af8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package licensestatus package licensestatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/_types/License.ts#L35-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1669a3daca..56e37b733a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package licensetype package licensetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/_types/License.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 33ecb43d31..1326d30146 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package lifecycleoperationmode package lifecycleoperationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Lifecycle.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Lifecycle.ts#L20-L24 type LifecycleOperationMode struct { Name string } diff --git a/typedapi/types/enums/managedby/managedby.go b/typedapi/types/enums/managedby/managedby.go index 0226aa7ced..1d02cbd09d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package managedby package managedby import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/DataStream.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/DataStream.ts#L32-L37 type ManagedBy struct { Name string } diff --git a/typedapi/types/enums/matchtype/matchtype.go b/typedapi/types/enums/matchtype/matchtype.go index 367946f51c..3f8a230235 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package matchtype package matchtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/dynamic-template.ts#L44-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/dynamic-template.ts#L44-L47 type MatchType struct { Name string } diff --git a/typedapi/types/enums/memorystatus/memorystatus.go b/typedapi/types/enums/memorystatus/memorystatus.go index 97314b8aa7..86e7aa3edd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package memorystatus package memorystatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Model.ts#L88-L92 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 b7f92bf0bb..96510f7c81 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package metric package metric import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/_types/Metric.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 0e63ac6ef2..9d95c1685c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package migrationstatus package migrationstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 962326e4d4..7663040f80 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package minimuminterval package minimuminterval import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L104-L111 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 59ce6e1b83..e6a94038e3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package missingorder package missingorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/AggregationContainer.ts#L517-L521 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/AggregationContainer.ts#L536-L540 type MissingOrder struct { Name string } diff --git a/typedapi/types/enums/month/month.go b/typedapi/types/enums/month/month.go index db5bc52c35..c82ae9596a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package month package month import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Schedule.ts#L65-L78 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 94ec9bc4f2..96f29ea21f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package multivaluemode package multivaluemode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L355-L372 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 08074f6cc2..6d0db2cb9f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package noderole package noderole import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Node.ts#L77-L95 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 da8833763d..8d10fb93d6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package noridecompoundmode package noridecompoundmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L75-L79 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/nori-plugin.ts#L22-L26 type NoriDecompoundMode struct { Name string } diff --git a/typedapi/types/enums/normalization/normalization.go b/typedapi/types/enums/normalization/normalization.go index 5dadc90032..1ef1fe9008 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package normalization package normalization import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Similarity.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 3f49def2bf..8473289910 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package normalizemethod package normalizemethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L326-L352 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 daf74d9345..360dadf036 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package numericfielddataformat package numericfielddataformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/NumericFielddataFormat.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 a782188e2d..5fb866d631 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package onscripterror package onscripterror import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L137-L140 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L137-L140 type OnScriptError struct { Name string } diff --git a/typedapi/types/enums/operationtype/operationtype.go b/typedapi/types/enums/operationtype/operationtype.go index dd5eea4fcd..e0182f0f15 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package operationtype package operationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/bulk/types.ts#L83-L88 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/bulk/types.ts#L83-L88 type OperationType struct { Name string } diff --git a/typedapi/types/enums/operator/operator.go b/typedapi/types/enums/operator/operator.go index d6c5c24505..ce8b049914 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package operator package operator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/Operator.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1a4e883e6b..23fe37a528 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package optype package optype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L255-L264 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L256-L265 type OpType struct { Name string } diff --git a/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go b/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go index a8242b2059..d50fd3ecb0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package pagerdutycontexttype package pagerdutycontexttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L67-L70 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 6880bae0d6..1cf12ce4c8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package pagerdutyeventtype package pagerdutyeventtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L72-L76 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L72-L76 type PagerDutyEventType struct { Name string } diff --git a/typedapi/types/enums/phoneticencoder/phoneticencoder.go b/typedapi/types/enums/phoneticencoder/phoneticencoder.go index a5754e6cb4..9e9fc1b311 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package phoneticencoder package phoneticencoder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/phonetic-plugin.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 086bebaaac..8122bfff79 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package phoneticlanguage package phoneticlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/phonetic-plugin.ts#L38-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d2585b391b..d0a65f7ffe 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package phoneticnametype package phoneticnametype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/phonetic-plugin.ts#L53-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f5f2211b02..285c8a34ee 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package phoneticruletype package phoneticruletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/phonetic-plugin.ts#L59-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/phonetic-plugin.ts#L59-L62 type PhoneticRuleType struct { Name string } diff --git a/typedapi/types/enums/policytype/policytype.go b/typedapi/types/enums/policytype/policytype.go index a91d5d51b4..9f86d65f3d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package policytype package policytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/_types/Policy.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 703ce10ff5..ba1a89af64 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package quantifier package quantifier import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Conditions.ts#L74-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Conditions.ts#L74-L77 type Quantifier struct { Name string } diff --git a/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go b/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go index 0c3f7e2910..12cbe79082 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package queryrulecriteriatype package queryrulecriteriatype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/_types/QueryRuleset.ts#L54-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/_types/QueryRuleset.ts#L55-L68 type QueryRuleCriteriaType struct { Name string } diff --git a/typedapi/types/enums/queryruletype/queryruletype.go b/typedapi/types/enums/queryruletype/queryruletype.go index 2764992796..650269c665 100644 --- a/typedapi/types/enums/queryruletype/queryruletype.go +++ b/typedapi/types/enums/queryruletype/queryruletype.go @@ -16,20 +16,22 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package queryruletype package queryruletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/_types/QueryRuleset.ts#L44-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/_types/QueryRuleset.ts#L44-L47 type QueryRuleType struct { Name string } var ( Pinned = QueryRuleType{"pinned"} + + Exclude = QueryRuleType{"exclude"} ) func (q QueryRuleType) MarshalText() (text []byte, err error) { @@ -41,6 +43,8 @@ func (q *QueryRuleType) UnmarshalText(text []byte) error { case "pinned": *q = Pinned + case "exclude": + *q = Exclude default: *q = QueryRuleType{string(text)} } diff --git a/typedapi/types/enums/rangerelation/rangerelation.go b/typedapi/types/enums/rangerelation/rangerelation.go index 7af94fa1be..20109e956c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package rangerelation package rangerelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L172-L185 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L188-L201 type RangeRelation struct { Name string } diff --git a/typedapi/types/enums/ratemode/ratemode.go b/typedapi/types/enums/ratemode/ratemode.go index a89da80065..6bba191af3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package ratemode package ratemode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L243-L252 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L252-L261 type RateMode struct { Name string } diff --git a/typedapi/types/enums/refresh/refresh.go b/typedapi/types/enums/refresh/refresh.go index 80fde3805c..f475c17cf8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package refresh package refresh import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L266-L273 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L267-L274 type Refresh struct { Name string } diff --git a/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go b/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go new file mode 100644 index 0000000000..328ab3094d --- /dev/null +++ b/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Package remoteclusterprivilege +package remoteclusterprivilege + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L201-L214 +type RemoteClusterPrivilege struct { + Name string +} + +var ( + Monitorenrich = RemoteClusterPrivilege{"monitor_enrich"} + + Monitorstats = RemoteClusterPrivilege{"monitor_stats"} +) + +func (r RemoteClusterPrivilege) MarshalText() (text []byte, err error) { + return []byte(r.String()), nil +} + +func (r *RemoteClusterPrivilege) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "monitor_enrich": + *r = Monitorenrich + case "monitor_stats": + *r = Monitorstats + default: + *r = RemoteClusterPrivilege{string(text)} + } + + return nil +} + +func (r RemoteClusterPrivilege) String() string { + return r.Name +} diff --git a/typedapi/types/enums/responsecontenttype/responsecontenttype.go b/typedapi/types/enums/responsecontenttype/responsecontenttype.go index 68132f80c9..a6fc9b2415 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package responsecontenttype package responsecontenttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L106-L110 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L106-L110 type ResponseContentType struct { Name string } diff --git a/typedapi/types/enums/restrictionworkflow/restrictionworkflow.go b/typedapi/types/enums/restrictionworkflow/restrictionworkflow.go new file mode 100644 index 0000000000..de6333defc --- /dev/null +++ b/typedapi/types/enums/restrictionworkflow/restrictionworkflow.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Package restrictionworkflow +package restrictionworkflow + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/RoleDescriptor.ts#L134-L137 +type RestrictionWorkflow struct { + Name string +} + +var ( + Searchapplicationquery = RestrictionWorkflow{"search_application_query"} +) + +func (r RestrictionWorkflow) MarshalText() (text []byte, err error) { + return []byte(r.String()), nil +} + +func (r *RestrictionWorkflow) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "search_application_query": + *r = Searchapplicationquery + default: + *r = RestrictionWorkflow{string(text)} + } + + return nil +} + +func (r RestrictionWorkflow) String() string { + return r.Name +} diff --git a/typedapi/types/enums/result/result.go b/typedapi/types/enums/result/result.go index 361cf9f2c9..c68ecf121b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package result package result import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Result.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 c21a8447f9..d9182bf807 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package resultposition package resultposition import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/eql/search/types.ts#L20-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1b124dddbd..20f5e0035c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package routingstate package routingstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L351-L372 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L395-L416 type RoutingState struct { Name string } diff --git a/typedapi/types/enums/ruleaction/ruleaction.go b/typedapi/types/enums/ruleaction/ruleaction.go index 208beee5c3..2e771727eb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package ruleaction package ruleaction import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Rule.ts#L41-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1af195aa53..82556e157c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package runtimefieldtype package runtimefieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/RuntimeFields.ts#L56-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/RuntimeFields.ts#L62-L72 type RuntimeFieldType struct { Name string } diff --git a/typedapi/types/enums/sampleraggregationexecutionhint/sampleraggregationexecutionhint.go b/typedapi/types/enums/sampleraggregationexecutionhint/sampleraggregationexecutionhint.go index 79d299b326..294a0c48c3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package sampleraggregationexecutionhint package sampleraggregationexecutionhint import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L345-L358 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 7424641e2c..f87deeb29b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package scoremode package scoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/rescoring.ts#L64-L86 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/rescoring.ts#L64-L86 type ScoreMode struct { Name string } diff --git a/typedapi/types/enums/scriptlanguage/scriptlanguage.go b/typedapi/types/enums/scriptlanguage/scriptlanguage.go index d38acdd3ff..1c4b9804ab 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package scriptlanguage package scriptlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Scripting.ts#L24-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Scripting.ts#L24-L45 type ScriptLanguage struct { Name string } diff --git a/typedapi/types/enums/scriptsorttype/scriptsorttype.go b/typedapi/types/enums/scriptsorttype/scriptsorttype.go index 3aca1a929e..be9d2059b9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package scriptsorttype package scriptsorttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L81-L85 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 cdddc23524..d832f6fc27 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package searchtype package searchtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L275-L280 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L276-L281 type SearchType struct { Name string } diff --git a/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go b/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go index d004a85c46..7177b9bb83 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package segmentsortmissing package segmentsortmissing import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSegmentSort.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 044b8cd41f..517e80229c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package segmentsortmode package segmentsortmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSegmentSort.ts#L36-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ff68f673c4..9c26a60b80 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package segmentsortorder package segmentsortorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSegmentSort.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4f8e37019b..7f9bad0ef1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package shapetype package shapetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L1074-L1077 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1473-L1476 type ShapeType struct { Name string } diff --git a/typedapi/types/enums/shardroutingstate/shardroutingstate.go b/typedapi/types/enums/shardroutingstate/shardroutingstate.go index 1761d30a3d..a46fb06257 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package shardroutingstate package shardroutingstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L169-L174 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1689f90ccf..db3df86914 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package shardsstatsstage package shardsstatsstage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotShardsStatsStage.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotShardsStatsStage.ts#L20-L31 type ShardsStatsStage struct { Name string } diff --git a/typedapi/types/enums/shardstoreallocation/shardstoreallocation.go b/typedapi/types/enums/shardstoreallocation/shardstoreallocation.go index 173959cb56..8c80597d6c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package shardstoreallocation package shardstoreallocation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/shard_stores/types.ts#L48-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 40c15d504e..908b47436f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package shardstorestatus package shardstorestatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/shard_stores/types.ts#L63-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 aa54e6bd9b..84d4f9f64c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package shutdownstatus package shutdownstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 85ed14587d..5a116a1a0a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package shutdowntype package shutdowntype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 372ae6174f..6f38218f1b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package simplequerystringflag package simplequerystringflag import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L708-L763 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L729-L784 type SimpleQueryStringFlag struct { Name string } diff --git a/typedapi/types/enums/slicescalculation/slicescalculation.go b/typedapi/types/enums/slicescalculation/slicescalculation.go index f4f885c152..7cec9c35c9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package slicescalculation package slicescalculation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L371-L379 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L372-L380 type SlicesCalculation struct { Name string } diff --git a/typedapi/types/enums/snapshotsort/snapshotsort.go b/typedapi/types/enums/snapshotsort/snapshotsort.go index e37599e13f..8b94edef64 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package snapshotsort package snapshotsort import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotInfo.ts#L73-L93 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotInfo.ts#L73-L93 type SnapshotSort struct { Name string } diff --git a/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go b/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go index b04801f168..bd02245147 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package snapshotupgradestate package snapshotupgradestate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Model.ts#L94-L99 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 9cbdbd9c42..54fcabfe97 100644 --- a/typedapi/types/enums/snowballlanguage/snowballlanguage.go +++ b/typedapi/types/enums/snowballlanguage/snowballlanguage.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package snowballlanguage package snowballlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/languages.ts#L57-L80 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/languages.ts#L57-L80 type SnowballLanguage struct { Name string } diff --git a/typedapi/types/enums/sortmode/sortmode.go b/typedapi/types/enums/sortmode/sortmode.go index 052d75f531..4b367deb43 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package sortmode package sortmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L109-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 201fdab7f3..030d4b29d7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package sortorder package sortorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L120-L129 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 4d0f227577..84eebe3773 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package sourcefieldmode package sourcefieldmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/meta-fields.ts#L67-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/meta-fields.ts#L67-L75 type SourceFieldMode struct { Name string } diff --git a/typedapi/types/enums/sqlformat/sqlformat.go b/typedapi/types/enums/sqlformat/sqlformat.go new file mode 100644 index 0000000000..10da8a1d78 --- /dev/null +++ b/typedapi/types/enums/sqlformat/sqlformat.go @@ -0,0 +1,77 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Package sqlformat +package sqlformat + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/sql/query/QuerySqlRequest.ts#L126-L134 +type SqlFormat struct { + Name string +} + +var ( + Csv = SqlFormat{"csv"} + + Json = SqlFormat{"json"} + + Tsv = SqlFormat{"tsv"} + + Txt = SqlFormat{"txt"} + + Yaml = SqlFormat{"yaml"} + + Cbor = SqlFormat{"cbor"} + + Smile = SqlFormat{"smile"} +) + +func (s SqlFormat) MarshalText() (text []byte, err error) { + return []byte(s.String()), nil +} + +func (s *SqlFormat) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "csv": + *s = Csv + case "json": + *s = Json + case "tsv": + *s = Tsv + case "txt": + *s = Txt + case "yaml": + *s = Yaml + case "cbor": + *s = Cbor + case "smile": + *s = Smile + default: + *s = SqlFormat{string(text)} + } + + return nil +} + +func (s SqlFormat) String() string { + return s.Name +} diff --git a/typedapi/types/enums/statslevel/statslevel.go b/typedapi/types/enums/statslevel/statslevel.go index 2d9475236c..a34a79438e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package statslevel package statslevel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/searchable_snapshots/_types/stats.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/searchable_snapshots/_types/stats.ts#L20-L24 type StatsLevel struct { Name string } diff --git a/typedapi/types/enums/storagetype/storagetype.go b/typedapi/types/enums/storagetype/storagetype.go index 3981f57f18..3b19a71968 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package storagetype package storagetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L520-L548 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L520-L548 type StorageType struct { Name string } diff --git a/typedapi/types/enums/stringdistance/stringdistance.go b/typedapi/types/enums/stringdistance/stringdistance.go index 6a5e1fb411..e19de4f19e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package stringdistance package stringdistance import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L472-L493 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L472-L493 type StringDistance struct { Name string } diff --git a/typedapi/types/enums/suggestmode/suggestmode.go b/typedapi/types/enums/suggestmode/suggestmode.go index 01160b6bf0..683c3afd89 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package suggestmode package suggestmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L282-L295 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L283-L296 type SuggestMode struct { Name string } diff --git a/typedapi/types/enums/suggestsort/suggestsort.go b/typedapi/types/enums/suggestsort/suggestsort.go index 402d740da0..86cbc87b57 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package suggestsort package suggestsort import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L495-L504 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L495-L504 type SuggestSort struct { Name string } diff --git a/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go b/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go index bd210c01d5..0e29a84d47 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package syncjobtriggermethod package syncjobtriggermethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/SyncJob.ts#L48-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 b075c40d10..16f380c02f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package syncjobtype package syncjobtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/SyncJob.ts#L42-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 8428b1c7f4..cac6886af0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package syncstatus package syncstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L138-L146 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 839b28e1e5..e47284da21 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package synonymformat package synonymformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L105-L108 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L104-L107 type SynonymFormat struct { Name string } diff --git a/typedapi/types/enums/tasktype/tasktype.go b/typedapi/types/enums/tasktype/tasktype.go index 7dd1d59bd7..e105363cf3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package tasktype package tasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/_types/TaskType.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/_types/TaskType.ts#L20-L28 type TaskType struct { Name string } diff --git a/typedapi/types/enums/templateformat/templateformat.go b/typedapi/types/enums/templateformat/templateformat.go index 36d1281a02..3bbff44086 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package templateformat package templateformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/RoleTemplate.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 2c75574d54..b22c7f3131 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package termsaggregationcollectmode package termsaggregationcollectmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L987-L996 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 8ce4e9544e..051f7f179e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package termsaggregationexecutionhint package termsaggregationexecutionhint import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L998-L1003 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 08e57674ef..3fdb7aa580 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package termvectoroption package termvectoroption import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/TermVectorOption.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 a2334191df..ea2b7f2e10 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package textquerytype package textquerytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L541-L567 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L559-L585 type TextQueryType struct { Name string } diff --git a/typedapi/types/enums/threadtype/threadtype.go b/typedapi/types/enums/threadtype/threadtype.go index e033c4426b..7df9883ee7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package threadtype package threadtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L297-L303 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L298-L304 type ThreadType struct { Name string } diff --git a/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go b/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go index 7e8f3e99f1..39765b736b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package timeseriesmetrictype package timeseriesmetrictype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/TimeSeriesMetricType.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ebac5dfc4a..c4f317ae74 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package timeunit package timeunit import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Time.ts#L69-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 f01c27a96a..b4ea5f5405 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package tokenchar package tokenchar import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L47-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L59-L66 type TokenChar struct { Name string } diff --git a/typedapi/types/enums/tokenizationtruncate/tokenizationtruncate.go b/typedapi/types/enums/tokenizationtruncate/tokenizationtruncate.go index d3d5214417..c8644cfab1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package tokenizationtruncate package tokenizationtruncate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L350-L354 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L338-L342 type TokenizationTruncate struct { Name string } diff --git a/typedapi/types/enums/totalhitsrelation/totalhitsrelation.go b/typedapi/types/enums/totalhitsrelation/totalhitsrelation.go index 839e8772c3..214b583de6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package totalhitsrelation package totalhitsrelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/hits.ts#L100-L105 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/hits.ts#L101-L106 type TotalHitsRelation struct { Name string } diff --git a/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go b/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go index ff68a3fd04..b3f8bf36ae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package trainedmodeltype package trainedmodeltype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L258-L272 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L302-L316 type TrainedModelType struct { Name string } diff --git a/typedapi/types/enums/trainingpriority/trainingpriority.go b/typedapi/types/enums/trainingpriority/trainingpriority.go index 2a8f0b3bfe..29a1d6ea38 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package trainingpriority package trainingpriority import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L311-L314 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L352-L355 type TrainingPriority struct { Name string } diff --git a/typedapi/types/enums/translogdurability/translogdurability.go b/typedapi/types/enums/translogdurability/translogdurability.go index 9532ad6699..d96b4fdd74 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package translogdurability package translogdurability import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L365-L380 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L365-L380 type TranslogDurability struct { Name string } diff --git a/typedapi/types/enums/ttesttype/ttesttype.go b/typedapi/types/enums/ttesttype/ttesttype.go index 0597e5e052..90af003a17 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package ttesttype package ttesttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L322-L335 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L331-L344 type TTestType struct { Name string } diff --git a/typedapi/types/enums/type_/type_.go b/typedapi/types/enums/type_/type_.go index 148fa6e1f2..36a495ce06 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package type_ package type_ import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/shutdown/_types/types.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 ff94f3a009..de30497227 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package unassignedinformationreason package unassignedinformationreason import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L127-L146 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 0de99fab25..aa2e0a901c 100644 --- a/typedapi/types/enums/useragentproperty/useragentproperty.go +++ b/typedapi/types/enums/useragentproperty/useragentproperty.go @@ -16,38 +16,28 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package useragentproperty package useragentproperty import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L266-L277 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L547-L553 type UserAgentProperty struct { Name string } var ( - NAME = UserAgentProperty{"NAME"} + Name = UserAgentProperty{"name"} - MAJOR = UserAgentProperty{"MAJOR"} + Os = UserAgentProperty{"os"} - MINOR = UserAgentProperty{"MINOR"} + Device = UserAgentProperty{"device"} - PATCH = UserAgentProperty{"PATCH"} + Original = UserAgentProperty{"original"} - OS = UserAgentProperty{"OS"} - - OSNAME = UserAgentProperty{"OS_NAME"} - - OSMAJOR = UserAgentProperty{"OS_MAJOR"} - - OSMINOR = UserAgentProperty{"OS_MINOR"} - - DEVICE = UserAgentProperty{"DEVICE"} - - BUILD = UserAgentProperty{"BUILD"} + Version = UserAgentProperty{"version"} ) func (u UserAgentProperty) MarshalText() (text []byte, err error) { @@ -57,26 +47,16 @@ func (u UserAgentProperty) MarshalText() (text []byte, err error) { func (u *UserAgentProperty) UnmarshalText(text []byte) error { switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { - case "NAME": - *u = NAME - case "MAJOR": - *u = MAJOR - case "MINOR": - *u = MINOR - case "PATCH": - *u = PATCH - case "OS": - *u = OS - case "OS_NAME": - *u = OSNAME - case "OS_MAJOR": - *u = OSMAJOR - case "OS_MINOR": - *u = OSMINOR - case "DEVICE": - *u = DEVICE - case "BUILD": - *u = BUILD + case "name": + *u = Name + case "os": + *u = Os + case "device": + *u = Device + case "original": + *u = Original + case "version": + *u = Version default: *u = UserAgentProperty{string(text)} } diff --git a/typedapi/types/enums/valuetype/valuetype.go b/typedapi/types/enums/valuetype/valuetype.go index 81ba193315..e8af82766f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package valuetype package valuetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L424-L435 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L436-L447 type ValueType struct { Name string } diff --git a/typedapi/types/enums/versiontype/versiontype.go b/typedapi/types/enums/versiontype/versiontype.go index 6e6a317d54..b458c598a0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package versiontype package versiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L106-L122 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L107-L123 type VersionType struct { Name string } diff --git a/typedapi/types/enums/waitforactiveshardoptions/waitforactiveshardoptions.go b/typedapi/types/enums/waitforactiveshardoptions/waitforactiveshardoptions.go index e758ce5eaf..b4bd747f92 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package waitforactiveshardoptions package waitforactiveshardoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L305-L309 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L306-L310 type WaitForActiveShardOptions struct { Name string } diff --git a/typedapi/types/enums/waitforevents/waitforevents.go b/typedapi/types/enums/waitforevents/waitforevents.go index 0ef4932725..87b02572cf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package waitforevents package waitforevents import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L311-L318 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L312-L319 type WaitForEvents struct { Name string } diff --git a/typedapi/types/enums/watchermetric/watchermetric.go b/typedapi/types/enums/watchermetric/watchermetric.go index 5d0b89a5db..bc293c1c53 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package watchermetric package watchermetric import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/stats/types.ts#L42-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/stats/types.ts#L42-L48 type WatcherMetric struct { Name string } diff --git a/typedapi/types/enums/watcherstate/watcherstate.go b/typedapi/types/enums/watcherstate/watcherstate.go index b4dcbceb87..16b3a8cc8b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package watcherstate package watcherstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/stats/types.ts#L26-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/stats/types.ts#L26-L31 type WatcherState struct { Name string } diff --git a/typedapi/types/enums/xpackcategory/xpackcategory.go b/typedapi/types/enums/xpackcategory/xpackcategory.go new file mode 100644 index 0000000000..61afddb6ed --- /dev/null +++ b/typedapi/types/enums/xpackcategory/xpackcategory.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +// Package xpackcategory +package xpackcategory + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/info/XPackInfoRequest.ts#L44-L48 +type XPackCategory struct { + Name string +} + +var ( + Build = XPackCategory{"build"} + + Features = XPackCategory{"features"} + + License = XPackCategory{"license"} +) + +func (x XPackCategory) MarshalText() (text []byte, err error) { + return []byte(x.String()), nil +} + +func (x *XPackCategory) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "build": + *x = Build + case "features": + *x = Features + case "license": + *x = License + default: + *x = XPackCategory{string(text)} + } + + return nil +} + +func (x XPackCategory) String() string { + return x.Name +} diff --git a/typedapi/types/enums/zerotermsquery/zerotermsquery.go b/typedapi/types/enums/zerotermsquery/zerotermsquery.go index 9608a32b96..828a36f8d8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Package zerotermsquery package zerotermsquery import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L569-L578 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L587-L596 type ZeroTermsQuery struct { Name string } diff --git a/typedapi/types/epochtimeunitmillis.go b/typedapi/types/epochtimeunitmillis.go index aa85fabf36..a9859c230b 100644 --- a/typedapi/types/epochtimeunitmillis.go +++ b/typedapi/types/epochtimeunitmillis.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // EpochTimeUnitMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Time.ts#L40-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Time.ts#L40-L40 type EpochTimeUnitMillis int64 diff --git a/typedapi/types/epochtimeunitseconds.go b/typedapi/types/epochtimeunitseconds.go index d424c74655..c80d7ceb7d 100644 --- a/typedapi/types/epochtimeunitseconds.go +++ b/typedapi/types/epochtimeunitseconds.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // EpochTimeUnitSeconds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Time.ts#L40-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Time.ts#L40-L40 type EpochTimeUnitSeconds int64 diff --git a/typedapi/types/eql.go b/typedapi/types/eql.go index d3fcadfdd6..6e74275169 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Eql type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L351-L354 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L349-L352 type Eql struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/eqlfeatures.go b/typedapi/types/eqlfeatures.go index 9279082127..ec36670c2f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // EqlFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L99-L107 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L97-L105 type EqlFeatures struct { Event uint `json:"event"` Join uint `json:"join"` diff --git a/typedapi/types/eqlfeaturesjoin.go b/typedapi/types/eqlfeaturesjoin.go index 0e280ba84f..3c9577a28d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // EqlFeaturesJoin type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L109-L115 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L107-L113 type EqlFeaturesJoin struct { JoinQueriesFiveOrMore uint `json:"join_queries_five_or_more"` JoinQueriesFour uint `json:"join_queries_four"` diff --git a/typedapi/types/eqlfeatureskeys.go b/typedapi/types/eqlfeatureskeys.go index ad3c332ae0..b0ae3f039e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // EqlFeaturesKeys type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L117-L123 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L115-L121 type EqlFeaturesKeys struct { JoinKeysFiveOrMore uint `json:"join_keys_five_or_more"` JoinKeysFour uint `json:"join_keys_four"` diff --git a/typedapi/types/eqlfeaturespipes.go b/typedapi/types/eqlfeaturespipes.go index ac520b5c35..76d6fafd79 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // EqlFeaturesPipes type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L125-L128 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L123-L126 type EqlFeaturesPipes struct { PipeHead uint `json:"pipe_head"` PipeTail uint `json:"pipe_tail"` diff --git a/typedapi/types/eqlfeaturessequences.go b/typedapi/types/eqlfeaturessequences.go index ef91e4fcb6..0ee2711556 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // EqlFeaturesSequences type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L130-L137 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L128-L135 type EqlFeaturesSequences struct { SequenceMaxspan uint `json:"sequence_maxspan"` SequenceQueriesFiveOrMore uint `json:"sequence_queries_five_or_more"` diff --git a/typedapi/types/eqlhits.go b/typedapi/types/eqlhits.go index d3ecf59135..d6a39dd674 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // EqlHits type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/eql/_types/EqlHits.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/errorcause.go b/typedapi/types/errorcause.go index 0af7ec5927..7d02719121 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ErrorCause type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Errors.ts#L25-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Errors.ts#L25-L50 type ErrorCause struct { CausedBy *ErrorCause `json:"caused_by,omitempty"` Metadata map[string]json.RawMessage `json:"-"` diff --git a/typedapi/types/errorresponsebase.go b/typedapi/types/errorresponsebase.go index 548e7c5ef5..7a8493e8fb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ErrorResponseBase type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Base.ts#L76-L85 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Base.ts#L76-L85 type ErrorResponseBase struct { Error ErrorCause `json:"error"` Status int `json:"status"` diff --git a/typedapi/types/esqlcolumns.go b/typedapi/types/esqlcolumns.go index 4112561fb8..7be7ea5653 100644 --- a/typedapi/types/esqlcolumns.go +++ b/typedapi/types/esqlcolumns.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // EsqlColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Binary.ts#L24-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Binary.ts#L24-L24 type EsqlColumns []byte diff --git a/typedapi/types/estoniananalyzer.go b/typedapi/types/estoniananalyzer.go new file mode 100644 index 0000000000..ed1d81a1fd --- /dev/null +++ b/typedapi/types/estoniananalyzer.go @@ -0,0 +1,113 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// EstonianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L148-L152 +type EstonianAnalyzer struct { + Stopwords []string `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` +} + +func (s *EstonianAnalyzer) 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": + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 EstonianAnalyzer) MarshalJSON() ([]byte, error) { + type innerEstonianAnalyzer EstonianAnalyzer + tmp := innerEstonianAnalyzer{ + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "estonian" + + return json.Marshal(tmp) +} + +// NewEstonianAnalyzer returns a EstonianAnalyzer. +func NewEstonianAnalyzer() *EstonianAnalyzer { + r := &EstonianAnalyzer{} + + return r +} diff --git a/typedapi/types/eventdatastream.go b/typedapi/types/eventdatastream.go index 1f64fdc8d9..012438cec8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // EventDataStream type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/_types/BehavioralAnalytics.ts#L29-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/_types/BehavioralAnalytics.ts#L29-L31 type EventDataStream struct { Name string `json:"name"` } diff --git a/typedapi/types/ewmamodelsettings.go b/typedapi/types/ewmamodelsettings.go index 6eee6f70e4..03f53fa7ee 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // EwmaModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L267-L269 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/pipeline.ts#L293-L295 type EwmaModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` } diff --git a/typedapi/types/ewmamovingaverageaggregation.go b/typedapi/types/ewmamovingaverageaggregation.go index eda0e17872..f69de82686 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // EwmaMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L252-L255 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/executeenrichpolicystatus.go b/typedapi/types/executeenrichpolicystatus.go index 05716ca284..c9c6f9b46d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // ExecuteEnrichPolicyStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/execute_policy/types.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/enrich/execute_policy/types.ts#L20-L22 type ExecuteEnrichPolicyStatus struct { Phase enrichpolicyphase.EnrichPolicyPhase `json:"phase"` } diff --git a/typedapi/types/executingpolicy.go b/typedapi/types/executingpolicy.go index fd658c54ca..adeda290ed 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ExecutingPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/stats/types.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/enrich/stats/types.ts#L25-L28 type ExecutingPolicy struct { Name string `json:"name"` Task TaskInfo `json:"task"` diff --git a/typedapi/types/executionresult.go b/typedapi/types/executionresult.go index e160ccb0ba..7b0bf1e5e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ExecutionResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Execution.ts#L60-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Execution.ts#L60-L66 type ExecutionResult struct { Actions []ExecutionResultAction `json:"actions"` Condition ExecutionResultCondition `json:"condition"` diff --git a/typedapi/types/executionresultaction.go b/typedapi/types/executionresultaction.go index e2827159aa..e8d4080b55 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // ExecutionResultAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Execution.ts#L74-L86 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Execution.ts#L74-L86 type ExecutionResultAction struct { Email *EmailResult `json:"email,omitempty"` Error *ErrorCause `json:"error,omitempty"` diff --git a/typedapi/types/executionresultcondition.go b/typedapi/types/executionresultcondition.go index a373d38bb8..18189a76e6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // ExecutionResultCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Execution.ts#L68-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Execution.ts#L68-L72 type ExecutionResultCondition struct { Met bool `json:"met"` Status actionstatusoptions.ActionStatusOptions `json:"status"` diff --git a/typedapi/types/executionresultinput.go b/typedapi/types/executionresultinput.go index 4b6e2e4d31..d4b041dfc9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,7 +29,7 @@ import ( // ExecutionResultInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Execution.ts#L88-L92 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Execution.ts#L88-L92 type ExecutionResultInput struct { Payload map[string]json.RawMessage `json:"payload"` Status actionstatusoptions.ActionStatusOptions `json:"status"` diff --git a/typedapi/types/executionstate.go b/typedapi/types/executionstate.go index df45c8ff58..d8e9f063d2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ExecutionState type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Action.ts#L120-L124 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Action.ts#L114-L118 type ExecutionState struct { Reason *string `json:"reason,omitempty"` Successful bool `json:"successful"` diff --git a/typedapi/types/executionthreadpool.go b/typedapi/types/executionthreadpool.go index d9f463b775..ac568ae580 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ExecutionThreadPool type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Execution.ts#L94-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Execution.ts#L94-L97 type ExecutionThreadPool struct { MaxSize int64 `json:"max_size"` QueueSize int64 `json:"queue_size"` diff --git a/typedapi/types/existsquery.go b/typedapi/types/existsquery.go index aada53340b..8edd1838e1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ExistsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L37-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/expandwildcards.go b/typedapi/types/expandwildcards.go index 324dca7bac..774f4f4a4f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ import ( // ExpandWildcards type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L217-L217 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L218-L218 type ExpandWildcards []expandwildcard.ExpandWildcard diff --git a/typedapi/types/explainanalyzetoken.go b/typedapi/types/explainanalyzetoken.go index ea2bd1a2b6..a148a7f3f9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ExplainAnalyzeToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/analyze/types.ts#L52-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/analyze/types.ts#L52-L67 type ExplainAnalyzeToken struct { Bytes string `json:"bytes"` EndOffset int64 `json:"end_offset"` diff --git a/typedapi/types/explanation.go b/typedapi/types/explanation.go index ebc11c829b..50f42502cd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Explanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/explain/types.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/explain/types.ts#L22-L26 type Explanation struct { Description string `json:"description"` Details []ExplanationDetail `json:"details"` diff --git a/typedapi/types/explanationdetail.go b/typedapi/types/explanationdetail.go index cdd7f1fa6c..8b4d7d48fd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ExplanationDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/explain/types.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/explain/types.ts#L28-L32 type ExplanationDetail struct { Description string `json:"description"` Details []ExplanationDetail `json:"details,omitempty"` diff --git a/typedapi/types/explorecontrols.go b/typedapi/types/explorecontrols.go index a45b4b4be8..36049f5a79 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ExploreControls type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/graph/_types/ExploreControls.ts#L24-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/exponentialaveragecalculationcontext.go b/typedapi/types/exponentialaveragecalculationcontext.go new file mode 100644 index 0000000000..f6ce0e4637 --- /dev/null +++ b/typedapi/types/exponentialaveragecalculationcontext.go @@ -0,0 +1,80 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ExponentialAverageCalculationContext type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Datafeed.ts#L204-L208 +type ExponentialAverageCalculationContext struct { + IncrementalMetricValueMs Float64 `json:"incremental_metric_value_ms"` + LatestTimestamp *int64 `json:"latest_timestamp,omitempty"` + PreviousExponentialAverageMs Float64 `json:"previous_exponential_average_ms,omitempty"` +} + +func (s *ExponentialAverageCalculationContext) 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 "incremental_metric_value_ms": + if err := dec.Decode(&s.IncrementalMetricValueMs); err != nil { + return fmt.Errorf("%s | %w", "IncrementalMetricValueMs", err) + } + + case "latest_timestamp": + if err := dec.Decode(&s.LatestTimestamp); err != nil { + return fmt.Errorf("%s | %w", "LatestTimestamp", err) + } + + case "previous_exponential_average_ms": + if err := dec.Decode(&s.PreviousExponentialAverageMs); err != nil { + return fmt.Errorf("%s | %w", "PreviousExponentialAverageMs", err) + } + + } + } + return nil +} + +// NewExponentialAverageCalculationContext returns a ExponentialAverageCalculationContext. +func NewExponentialAverageCalculationContext() *ExponentialAverageCalculationContext { + r := &ExponentialAverageCalculationContext{} + + return r +} diff --git a/typedapi/types/extendedboundsdouble.go b/typedapi/types/extendedboundsdouble.go index 8951eb8c62..c2d809d98b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ExtendedBoundsdouble type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L491-L500 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L508-L517 type ExtendedBoundsdouble struct { // Max Maximum value for the bound. Max *Float64 `json:"max,omitempty"` diff --git a/typedapi/types/extendedboundsfielddatemath.go b/typedapi/types/extendedboundsfielddatemath.go index 67444c9601..22f24a7af9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ExtendedBoundsFieldDateMath type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L491-L500 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L508-L517 type ExtendedBoundsFieldDateMath struct { // Max Maximum value for the bound. Max FieldDateMath `json:"max,omitempty"` diff --git a/typedapi/types/extendedmemorystats.go b/typedapi/types/extendedmemorystats.go index a3b729bcd7..220072b5d3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ExtendedMemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L622-L631 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L658-L667 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 diff --git a/typedapi/types/extendedstatsaggregate.go b/typedapi/types/extendedstatsaggregate.go index 1a606b165b..c56e0c5b60 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L278-L296 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L299-L320 type ExtendedStatsAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` diff --git a/typedapi/types/extendedstatsaggregation.go b/typedapi/types/extendedstatsaggregation.go index aa0c0488ca..21ac613023 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L101-L106 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L101-L106 type ExtendedStatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/extendedstatsbucketaggregate.go b/typedapi/types/extendedstatsbucketaggregate.go index 661f6dd762..aa8b116fc1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L298-L299 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L322-L323 type ExtendedStatsBucketAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` diff --git a/typedapi/types/extendedstatsbucketaggregation.go b/typedapi/types/extendedstatsbucketaggregation.go index b524523648..55ff4e4a9c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // ExtendedStatsBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L198-L203 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/failprocessor.go b/typedapi/types/failprocessor.go index aa85c4aaca..d0613e1704 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FailProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L648-L654 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L888-L894 type FailProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/failurestore.go b/typedapi/types/failurestore.go new file mode 100644 index 0000000000..4a98c6c5b5 --- /dev/null +++ b/typedapi/types/failurestore.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// FailureStore type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/DataStream.ts#L39-L43 +type FailureStore struct { + Enabled bool `json:"enabled"` + Indices []DataStreamIndex `json:"indices"` + RolloverOnWrite bool `json:"rollover_on_write"` +} + +func (s *FailureStore) 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 "indices": + if err := dec.Decode(&s.Indices); err != nil { + return fmt.Errorf("%s | %w", "Indices", err) + } + + case "rollover_on_write": + 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", "RolloverOnWrite", err) + } + s.RolloverOnWrite = value + case bool: + s.RolloverOnWrite = v + } + + } + } + return nil +} + +// NewFailureStore returns a FailureStore. +func NewFailureStore() *FailureStore { + r := &FailureStore{} + + return r +} diff --git a/typedapi/types/feature.go b/typedapi/types/feature.go index cad70da81c..1988e841e4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Feature type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/features/_types/Feature.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/features/_types/Feature.ts#L20-L23 type Feature struct { Description string `json:"description"` Name string `json:"name"` diff --git a/typedapi/types/featureenabled.go b/typedapi/types/featureenabled.go index 0f776f9c26..65ed2a8c20 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FeatureEnabled type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L215-L217 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L215-L217 type FeatureEnabled struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/features.go b/typedapi/types/features.go index 64e3e9f59b..8e685713c1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ import ( // Features type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get/IndicesGetRequest.ts#L96-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get/IndicesGetRequest.ts#L96-L96 type Features []feature.Feature diff --git a/typedapi/types/featuretoggle.go b/typedapi/types/featuretoggle.go index f59bd3f573..055f74d551 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FeatureToggle type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L40-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L38-L40 type FeatureToggle struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/fetchprofile.go b/typedapi/types/fetchprofile.go index 4895a9eb5a..835f607afd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FetchProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L139-L146 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L230-L237 type FetchProfile struct { Breakdown FetchProfileBreakdown `json:"breakdown"` Children []FetchProfile `json:"children,omitempty"` diff --git a/typedapi/types/fetchprofilebreakdown.go b/typedapi/types/fetchprofilebreakdown.go index a629a82870..bd1c0695f5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FetchProfileBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L148-L157 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L239-L248 type FetchProfileBreakdown struct { LoadSource *int `json:"load_source,omitempty"` LoadSourceCount *int `json:"load_source_count,omitempty"` diff --git a/typedapi/types/fetchprofiledebug.go b/typedapi/types/fetchprofiledebug.go index 5e425d74ea..1ecd9b8b49 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FetchProfileDebug type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L159-L162 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L250-L253 type FetchProfileDebug struct { FastPath *int `json:"fast_path,omitempty"` StoredFields []string `json:"stored_fields,omitempty"` diff --git a/typedapi/types/fieldaliasproperty.go b/typedapi/types/fieldaliasproperty.go index 8b0325fb36..2e9f6a7164 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // FieldAliasProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/specialized.ts#L55-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/specialized.ts#L55-L58 type FieldAliasProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/fieldandformat.go b/typedapi/types/fieldandformat.go index 980819b71e..8ad828fea3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FieldAndFormat type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/abstractions.ts#L525-L539 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/abstractions.ts#L528-L542 type FieldAndFormat struct { // Field Wildcard pattern. The request returns values for field names matching this // pattern. diff --git a/typedapi/types/fieldcapability.go b/typedapi/types/fieldcapability.go index 06c7fe5a4a..33f3286c91 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // FieldCapability type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/field_caps/types.ts#L23-L81 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/fieldcollapse.go b/typedapi/types/fieldcollapse.go index 33e2a633f4..e46e0d8068 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FieldCollapse type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/FieldCollapse.ts#L24-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/fielddatafrequencyfilter.go b/typedapi/types/fielddatafrequencyfilter.go index e62b9189d9..c751cbc0e9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FielddataFrequencyFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/FielddataFrequencyFilter.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/FielddataFrequencyFilter.ts#L22-L26 type FielddataFrequencyFilter struct { Max Float64 `json:"max"` Min Float64 `json:"min"` diff --git a/typedapi/types/fielddatarecord.go b/typedapi/types/fielddatarecord.go index c94a6a6ade..fcec155204 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FielddataRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/fielddata/types.ts#L20-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/fielddata/types.ts#L20-L48 type FielddataRecord struct { // Field field name Field *string `json:"field,omitempty"` diff --git a/typedapi/types/fielddatastats.go b/typedapi/types/fielddatastats.go index e49906bfb8..4fbe276b5d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FielddataStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L111-L116 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L111-L116 type FielddataStats struct { Evictions *int64 `json:"evictions,omitempty"` Fields map[string]FieldMemoryUsage `json:"fields,omitempty"` diff --git a/typedapi/types/fielddatemath.go b/typedapi/types/fielddatemath.go index cf8bcc85d3..e0dced34fd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // Float64 // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L298-L305 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L309-L316 type FieldDateMath any diff --git a/typedapi/types/fieldlookup.go b/typedapi/types/fieldlookup.go index f32439d19a..b785ac42df 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // FieldLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/abstractions.ts#L429-L446 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/abstractions.ts#L429-L446 type FieldLookup struct { // Id `id` of the document. Id string `json:"id"` diff --git a/typedapi/types/fieldmapping.go b/typedapi/types/fieldmapping.go index 34e620a134..487c276c75 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FieldMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/meta-fields.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/meta-fields.ts#L24-L27 type FieldMapping struct { FullName string `json:"full_name"` Mapping map[string]Property `json:"mapping"` diff --git a/typedapi/types/fieldmemoryusage.go b/typedapi/types/fieldmemoryusage.go index c0ac59a956..3c55bb465e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FieldMemoryUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L118-L121 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L118-L121 type FieldMemoryUsage struct { MemorySize ByteSize `json:"memory_size,omitempty"` MemorySizeInBytes int64 `json:"memory_size_in_bytes"` diff --git a/typedapi/types/fieldmetric.go b/typedapi/types/fieldmetric.go index 1af6176855..f2ad3b4188 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // FieldMetric type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/_types/Metric.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/fieldnamesfield.go b/typedapi/types/fieldnamesfield.go index 9c590e137a..666ac290c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FieldNamesField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/meta-fields.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/meta-fields.ts#L42-L44 type FieldNamesField struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/fieldrule.go b/typedapi/types/fieldrule.go index f10ff247a3..13609fdafc 100644 --- a/typedapi/types/fieldrule.go +++ b/typedapi/types/fieldrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // FieldRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/RoleMappingRule.ts#L36-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/RoleMappingRule.ts#L35-L43 type FieldRule struct { Dn []string `json:"dn,omitempty"` Groups []string `json:"groups,omitempty"` diff --git a/typedapi/types/fields.go b/typedapi/types/fields.go index ed1c75a5f4..03c9f70e3d 100644 --- a/typedapi/types/fields.go +++ b/typedapi/types/fields.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Fields type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L140-L140 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L141-L141 type Fields []string diff --git a/typedapi/types/fieldsecurity.go b/typedapi/types/fieldsecurity.go index 66cc1cafe3..96009d028e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // FieldSecurity type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/FieldSecurity.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/FieldSecurity.ts#L22-L25 type FieldSecurity struct { Except []string `json:"except,omitempty"` Grant []string `json:"grant,omitempty"` diff --git a/typedapi/types/fieldsizeusage.go b/typedapi/types/fieldsizeusage.go index 05140a305e..9a5e85256a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FieldSizeUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L92-L95 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L92-L95 type FieldSizeUsage struct { Size ByteSize `json:"size,omitempty"` SizeInBytes int64 `json:"size_in_bytes"` diff --git a/typedapi/types/fieldsort.go b/typedapi/types/fieldsort.go index 8be94ba723..2298051ac4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -36,7 +36,7 @@ import ( // FieldSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L44-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/sort.ts#L43-L52 type FieldSort struct { Format *string `json:"format,omitempty"` Missing Missing `json:"missing,omitempty"` diff --git a/typedapi/types/fieldstat.go b/typedapi/types/fieldstat.go index 08ff3323b0..d4c37397e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FieldStat type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/text_structure/find_structure/types.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/text_structure/find_structure/types.ts#L23-L33 type FieldStat struct { Cardinality int `json:"cardinality"` Count int `json:"count"` diff --git a/typedapi/types/fieldstatistics.go b/typedapi/types/fieldstatistics.go index b83a81b22c..a53965124f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FieldStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/termvectors/types.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/termvectors/types.ts#L28-L32 type FieldStatistics struct { DocCount int `json:"doc_count"` SumDocFreq int64 `json:"sum_doc_freq"` diff --git a/typedapi/types/fieldsuggester.go b/typedapi/types/fieldsuggester.go index 54781df19e..2f4273d994 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FieldSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L109-L142 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L109-L142 type FieldSuggester struct { // Completion Provides auto-complete/search-as-you-type functionality. Completion *CompletionSuggester `json:"completion,omitempty"` diff --git a/typedapi/types/fieldsummary.go b/typedapi/types/fieldsummary.go index 5487fa9505..0991322494 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // FieldSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L57-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L57-L66 type FieldSummary struct { Any uint `json:"any"` DocValues uint `json:"doc_values"` diff --git a/typedapi/types/fieldsusagebody.go b/typedapi/types/fieldsusagebody.go index 5c9153c800..e939e9fda0 100644 --- a/typedapi/types/fieldsusagebody.go +++ b/typedapi/types/fieldsusagebody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -27,7 +27,7 @@ import ( // FieldsUsageBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L32-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L32-L39 type FieldsUsageBody struct { FieldsUsageBody map[string]UsageStatsIndex `json:"-"` Shards_ ShardStatistics `json:"_shards"` diff --git a/typedapi/types/fieldtypes.go b/typedapi/types/fieldtypes.go index e1366e222e..40ebf348e8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L136-L167 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L136-L167 type FieldTypes struct { // Count The number of occurrences of the field type in selected nodes. Count int `json:"count"` diff --git a/typedapi/types/fieldtypesmappings.go b/typedapi/types/fieldtypesmappings.go index eb01ab2a48..ad86d39f7b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FieldTypesMappings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L109-L134 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L109-L134 type FieldTypesMappings struct { // FieldTypes Contains statistics about field data types used in selected nodes. FieldTypes []FieldTypes `json:"field_types"` diff --git a/typedapi/types/fieldvalue.go b/typedapi/types/fieldvalue.go index 71e412852b..0a6186dfb4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,5 +29,5 @@ package types // nil // json.RawMessage // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L25-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L25-L37 type FieldValue any diff --git a/typedapi/types/fieldvaluefactorscorefunction.go b/typedapi/types/fieldvaluefactorscorefunction.go index 5aac134dba..b0fe18aed2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // FieldValueFactorScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L136-L155 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/filecountsnapshotstats.go b/typedapi/types/filecountsnapshotstats.go index e1aed2cdd7..679e077eda 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FileCountSnapshotStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/FileCountSnapshotStats.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/FileCountSnapshotStats.ts#L22-L25 type FileCountSnapshotStats struct { FileCount int `json:"file_count"` SizeInBytes int64 `json:"size_in_bytes"` diff --git a/typedapi/types/filedetails.go b/typedapi/types/filedetails.go index de8a556532..f80df4f3f5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FileDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/recovery/types.ts#L50-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/recovery/types.ts#L50-L54 type FileDetails struct { Length int64 `json:"length"` Name string `json:"name"` diff --git a/typedapi/types/filesystem.go b/typedapi/types/filesystem.go index 42419416e1..869e9cea92 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FileSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L698-L716 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L769-L787 type FileSystem struct { // Data List of all file stores. Data []DataPathStats `json:"data,omitempty"` diff --git a/typedapi/types/filesystemtotal.go b/typedapi/types/filesystemtotal.go index caf16b7bfc..e7cf32a40c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FileSystemTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L757-L786 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L828-L857 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 diff --git a/typedapi/types/fillmaskinferenceoptions.go b/typedapi/types/fillmaskinferenceoptions.go index 624ba9f92d..c694df8586 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FillMaskInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L266-L280 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L253-L268 type FillMaskInferenceOptions struct { // MaskToken The string/token which will be removed from incoming documents and replaced // with the inference prediction(s). @@ -50,6 +50,7 @@ type FillMaskInferenceOptions struct { ResultsField *string `json:"results_field,omitempty"` // Tokenization The tokenization options to update when inferring Tokenization *TokenizationConfigContainer `json:"tokenization,omitempty"` + Vocabulary Vocabulary `json:"vocabulary"` } func (s *FillMaskInferenceOptions) UnmarshalJSON(data []byte) error { @@ -112,6 +113,11 @@ func (s *FillMaskInferenceOptions) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Tokenization", err) } + case "vocabulary": + if err := dec.Decode(&s.Vocabulary); err != nil { + return fmt.Errorf("%s | %w", "Vocabulary", err) + } + } } return nil diff --git a/typedapi/types/fillmaskinferenceupdateoptions.go b/typedapi/types/fillmaskinferenceupdateoptions.go index 7b10344aa1..95d566f497 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FillMaskInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L411-L418 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L399-L406 type FillMaskInferenceUpdateOptions struct { // NumTopClasses Specifies the number of top class predictions to return. Defaults to 0. NumTopClasses *int `json:"num_top_classes,omitempty"` diff --git a/typedapi/types/filteraggregate.go b/typedapi/types/filteraggregate.go index e0f4db99ae..d7b1100407 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // FilterAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L499-L500 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L552-L556 type FilterAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *FilterAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/filteringadvancedsnippet.go b/typedapi/types/filteringadvancedsnippet.go index fe86222482..ac535c3e79 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,11 +30,11 @@ import ( // FilteringAdvancedSnippet type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L192-L196 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L192-L196 type FilteringAdvancedSnippet struct { - CreatedAt DateTime `json:"created_at,omitempty"` - UpdatedAt DateTime `json:"updated_at,omitempty"` - Value map[string]json.RawMessage `json:"value"` + CreatedAt DateTime `json:"created_at,omitempty"` + UpdatedAt DateTime `json:"updated_at,omitempty"` + Value json.RawMessage `json:"value,omitempty"` } func (s *FilteringAdvancedSnippet) UnmarshalJSON(data []byte) error { @@ -63,9 +63,6 @@ func (s *FilteringAdvancedSnippet) UnmarshalJSON(data []byte) error { } case "value": - if s.Value == nil { - s.Value = make(map[string]json.RawMessage, 0) - } if err := dec.Decode(&s.Value); err != nil { return fmt.Errorf("%s | %w", "Value", err) } @@ -77,9 +74,7 @@ func (s *FilteringAdvancedSnippet) UnmarshalJSON(data []byte) error { // NewFilteringAdvancedSnippet returns a FilteringAdvancedSnippet. func NewFilteringAdvancedSnippet() *FilteringAdvancedSnippet { - r := &FilteringAdvancedSnippet{ - Value: make(map[string]json.RawMessage, 0), - } + r := &FilteringAdvancedSnippet{} return r } diff --git a/typedapi/types/filteringconfig.go b/typedapi/types/filteringconfig.go index abc9c6befa..31e51b4f34 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FilteringConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L209-L213 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L209-L213 type FilteringConfig struct { Active FilteringRules `json:"active"` Domain *string `json:"domain,omitempty"` diff --git a/typedapi/types/filteringrule.go b/typedapi/types/filteringrule.go index 6484e233e3..bd25911e51 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // FilteringRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L170-L179 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L170-L179 type FilteringRule struct { CreatedAt DateTime `json:"created_at,omitempty"` Field string `json:"field"` diff --git a/typedapi/types/filteringrules.go b/typedapi/types/filteringrules.go index 4ab744343f..e1377d9b24 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // FilteringRules type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L203-L207 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L203-L207 type FilteringRules struct { AdvancedSnippet FilteringAdvancedSnippet `json:"advanced_snippet"` Rules []FilteringRule `json:"rules"` diff --git a/typedapi/types/filteringrulesvalidation.go b/typedapi/types/filteringrulesvalidation.go index a4ef477914..773c67ae3a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // FilteringRulesValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L198-L201 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L198-L201 type FilteringRulesValidation struct { Errors []FilteringValidation `json:"errors"` State filteringvalidationstate.FilteringValidationState `json:"state"` diff --git a/typedapi/types/filteringvalidation.go b/typedapi/types/filteringvalidation.go index 0e9374221a..d7067cc0fa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // FilteringValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L181-L184 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L181-L184 type FilteringValidation struct { Ids []string `json:"ids"` Messages []string `json:"messages"` diff --git a/typedapi/types/filterref.go b/typedapi/types/filterref.go index ce150bd578..5687ce84da 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // FilterRef type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Filter.ts#L31-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Filter.ts#L31-L41 type FilterRef struct { // FilterId The identifier for the filter. FilterId string `json:"filter_id"` diff --git a/typedapi/types/filtersaggregate.go b/typedapi/types/filtersaggregate.go index 179b043daf..9954d96e36 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // FiltersAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L572-L573 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L639-L643 type FiltersAggregate struct { Buckets BucketsFiltersBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/filtersaggregation.go b/typedapi/types/filtersaggregation.go index 3d7d88aad0..d853087523 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FiltersAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L360-L380 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L374-L394 type FiltersAggregation struct { // Filters Collection of queries from which to build buckets. Filters BucketsQuery `json:"filters,omitempty"` diff --git a/typedapi/types/filtersbucket.go b/typedapi/types/filtersbucket.go index 65a6aef0c4..f02cd560b8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // FiltersBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L575-L575 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L645-L645 type FiltersBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -485,6 +485,13 @@ func (s *FiltersBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/fingerprintanalyzer.go b/typedapi/types/fingerprintanalyzer.go index 82c664407d..c501fe7500 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FingerprintAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L37-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L37-L45 type FingerprintAnalyzer struct { MaxOutputSize int `json:"max_output_size"` PreserveOriginal bool `json:"preserve_original"` diff --git a/typedapi/types/fingerprintprocessor.go b/typedapi/types/fingerprintprocessor.go new file mode 100644 index 0000000000..2e620b406a --- /dev/null +++ b/typedapi/types/fingerprintprocessor.go @@ -0,0 +1,198 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/fingerprintdigest" +) + +// FingerprintProcessor type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L904-L932 +type FingerprintProcessor struct { + // Description Description of the processor. + // Useful for describing the purpose of the processor or its configuration. + Description *string `json:"description,omitempty"` + // Fields Array of fields to include in the fingerprint. For objects, the processor + // hashes both the field key and value. For other fields, the processor hashes + // only the field value. + Fields []string `json:"fields"` + // If Conditionally execute the processor. + If *string `json:"if,omitempty"` + // IgnoreFailure Ignore failures for the processor. + IgnoreFailure *bool `json:"ignore_failure,omitempty"` + // IgnoreMissing If true, the processor ignores any missing fields. If all fields are + // missing, the processor silently exits without modifying the document. + IgnoreMissing *bool `json:"ignore_missing,omitempty"` + // Method The hash method used to compute the fingerprint. Must be one of MD5, SHA-1, + // SHA-256, SHA-512, or MurmurHash3. + Method *fingerprintdigest.FingerprintDigest `json:"method,omitempty"` + // OnFailure Handle failures for the processor. + OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // Salt Salt value for the hash function. + Salt *string `json:"salt,omitempty"` + // Tag Identifier for the processor. + // Useful for debugging and metrics. + Tag *string `json:"tag,omitempty"` + // TargetField Output field for the fingerprint. + TargetField *string `json:"target_field,omitempty"` +} + +func (s *FingerprintProcessor) 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 "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + 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) + } + } + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "ignore_failure": + 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", "IgnoreFailure", err) + } + s.IgnoreFailure = &value + case bool: + s.IgnoreFailure = &v + } + + case "ignore_missing": + 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", "IgnoreMissing", err) + } + s.IgnoreMissing = &value + case bool: + s.IgnoreMissing = &v + } + + case "method": + if err := dec.Decode(&s.Method); err != nil { + return fmt.Errorf("%s | %w", "Method", err) + } + + case "on_failure": + if err := dec.Decode(&s.OnFailure); err != nil { + return fmt.Errorf("%s | %w", "OnFailure", err) + } + + case "salt": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Salt", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Salt = &o + + case "tag": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Tag", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Tag = &o + + case "target_field": + if err := dec.Decode(&s.TargetField); err != nil { + return fmt.Errorf("%s | %w", "TargetField", err) + } + + } + } + return nil +} + +// NewFingerprintProcessor returns a FingerprintProcessor. +func NewFingerprintProcessor() *FingerprintProcessor { + r := &FingerprintProcessor{} + + return r +} diff --git a/typedapi/types/fingerprinttokenfilter.go b/typedapi/types/fingerprinttokenfilter.go index 8396ae10ab..c130b11774 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FingerprintTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L196-L200 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L195-L199 type FingerprintTokenFilter struct { MaxOutputSize *int `json:"max_output_size,omitempty"` Separator *string `json:"separator,omitempty"` diff --git a/typedapi/types/finnishanalyzer.go b/typedapi/types/finnishanalyzer.go new file mode 100644 index 0000000000..277088d083 --- /dev/null +++ b/typedapi/types/finnishanalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// FinnishAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L154-L159 +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"` +} + +func (s *FinnishAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 FinnishAnalyzer) MarshalJSON() ([]byte, error) { + type innerFinnishAnalyzer FinnishAnalyzer + tmp := innerFinnishAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "finnish" + + return json.Marshal(tmp) +} + +// NewFinnishAnalyzer returns a FinnishAnalyzer. +func NewFinnishAnalyzer() *FinnishAnalyzer { + r := &FinnishAnalyzer{} + + return r +} diff --git a/typedapi/types/flattened.go b/typedapi/types/flattened.go index a2fd911f7c..e64f898180 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Flattened type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L356-L358 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L354-L356 type Flattened struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/flattenedproperty.go b/typedapi/types/flattenedproperty.go index 9d9fe6384e..f041a54e58 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // FlattenedProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/complex.ts#L26-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/complex.ts#L26-L37 type FlattenedProperty struct { Boost *Float64 `json:"boost,omitempty"` DepthLimit *int `json:"depth_limit,omitempty"` diff --git a/typedapi/types/floatnumberproperty.go b/typedapi/types/floatnumberproperty.go index a17c6c09ce..d6354b9cc2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // FloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L142-L145 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L142-L145 type FloatNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -52,7 +52,6 @@ type FloatNumberProperty struct { OnScriptError *onscripterror.OnScriptError `json:"on_script_error,omitempty"` Properties map[string]Property `json:"properties,omitempty"` Script *Script `json:"script,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` // TimeSeriesDimension For internal use by Elastic only. Marks the field as a time series dimension. // Defaults to false. @@ -859,18 +858,6 @@ func (s *FloatNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Script", err) } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -932,7 +919,6 @@ func (s FloatNumberProperty) MarshalJSON() ([]byte, error) { OnScriptError: s.OnScriptError, Properties: s.Properties, Script: s.Script, - Similarity: s.Similarity, Store: s.Store, TimeSeriesDimension: s.TimeSeriesDimension, TimeSeriesMetric: s.TimeSeriesMetric, diff --git a/typedapi/types/floatrangeproperty.go b/typedapi/types/floatrangeproperty.go index efa5e6d575..13545225d2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // FloatRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/range.ts#L38-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/range.ts#L38-L40 type FloatRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -46,7 +46,6 @@ type FloatRangeProperty struct { // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -807,18 +806,6 @@ func (s *FloatRangeProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -857,7 +844,6 @@ func (s FloatRangeProperty) MarshalJSON() ([]byte, error) { Index: s.Index, Meta: s.Meta, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/flushstats.go b/typedapi/types/flushstats.go index 3923c75d38..9718ae5848 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FlushStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L123-L128 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L123-L128 type FlushStats struct { Periodic int64 `json:"periodic"` Total int64 `json:"total"` diff --git a/typedapi/types/followerindex.go b/typedapi/types/followerindex.go index c14110213f..5af229c1e8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // FollowerIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/follow_info/types.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/follow_info/types.ts#L24-L30 type FollowerIndex struct { FollowerIndex string `json:"follower_index"` LeaderIndex string `json:"leader_index"` diff --git a/typedapi/types/followerindexparameters.go b/typedapi/types/followerindexparameters.go index ed29541cbd..92c2db6a09 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FollowerIndexParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/follow_info/types.ts#L38-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/follow_info/types.ts#L37-L48 type FollowerIndexParameters struct { MaxOutstandingReadRequests int `json:"max_outstanding_read_requests"` MaxOutstandingWriteRequests int `json:"max_outstanding_write_requests"` diff --git a/typedapi/types/followindexstats.go b/typedapi/types/followindexstats.go index 8cc8daee5d..fa5a66ec8a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // FollowIndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/_types/FollowIndexStats.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/_types/FollowIndexStats.ts#L30-L33 type FollowIndexStats struct { Index string `json:"index"` Shards []CcrShardStats `json:"shards"` diff --git a/typedapi/types/followstats.go b/typedapi/types/followstats.go index b70607f36e..660c8bdf46 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // FollowStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/stats/types.ts.ts#L41-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/stats/types.ts.ts#L40-L42 type FollowStats struct { Indices []FollowIndexStats `json:"indices"` } diff --git a/typedapi/types/forcemergeaction.go b/typedapi/types/forcemergeaction.go index 1277ddf081..a1e79627d4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ForceMergeAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L126-L129 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L126-L129 type ForceMergeAction struct { IndexCodec *string `json:"index_codec,omitempty"` MaxNumSegments int `json:"max_num_segments"` diff --git a/typedapi/types/forcemergeresponsebody.go b/typedapi/types/forcemergeresponsebody.go index 32eba1d758..57a9588790 100644 --- a/typedapi/types/forcemergeresponsebody.go +++ b/typedapi/types/forcemergeresponsebody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,9 +31,9 @@ import ( // ForceMergeResponseBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/forcemerge/_types/response.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/forcemerge/_types/response.ts#L22-L28 type ForceMergeResponseBody struct { - Shards_ ShardStatistics `json:"_shards"` + Shards_ *ShardStatistics `json:"_shards,omitempty"` // Task task contains a task id returned when wait_for_completion=false, // you can use the task_id to get the status of the task at _tasks/ Task *string `json:"task,omitempty"` diff --git a/typedapi/types/foreachprocessor.go b/typedapi/types/foreachprocessor.go index 77c5ea1ff8..448111e37e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ForeachProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L656-L670 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L934-L948 type ForeachProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/formattablemetricaggregation.go b/typedapi/types/formattablemetricaggregation.go index 9201728f04..47c8f2adeb 100644 --- a/typedapi/types/formattablemetricaggregation.go +++ b/typedapi/types/formattablemetricaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FormattableMetricAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L51-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L51-L53 type FormattableMetricAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/foundstatus.go b/typedapi/types/foundstatus.go index c46d812c0f..c323c9d29d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FoundStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/delete_privileges/types.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/delete_privileges/types.ts#L20-L22 type FoundStatus struct { Found bool `json:"found"` } diff --git a/typedapi/types/frenchanalyzer.go b/typedapi/types/frenchanalyzer.go new file mode 100644 index 0000000000..385ec64a51 --- /dev/null +++ b/typedapi/types/frenchanalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// FrenchAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L161-L166 +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"` +} + +func (s *FrenchAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 FrenchAnalyzer) MarshalJSON() ([]byte, error) { + type innerFrenchAnalyzer FrenchAnalyzer + tmp := innerFrenchAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "french" + + return json.Marshal(tmp) +} + +// NewFrenchAnalyzer returns a FrenchAnalyzer. +func NewFrenchAnalyzer() *FrenchAnalyzer { + r := &FrenchAnalyzer{} + + return r +} diff --git a/typedapi/types/frequencyencodingpreprocessor.go b/typedapi/types/frequencyencodingpreprocessor.go index 605a65bd66..baa1d439ec 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FrequencyEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L38-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L38-L42 type FrequencyEncodingPreprocessor struct { FeatureName string `json:"feature_name"` Field string `json:"field"` diff --git a/typedapi/types/frequentitemsetsaggregate.go b/typedapi/types/frequentitemsetsaggregate.go index 58e52d4618..4b8ad86aa3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // FrequentItemSetsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L643-L644 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L722-L723 type FrequentItemSetsAggregate struct { Buckets BucketsFrequentItemSetsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/frequentitemsetsaggregation.go b/typedapi/types/frequentitemsetsaggregation.go index 1c28fce790..35369e57a6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FrequentItemSetsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L1167-L1191 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L1240-L1267 type FrequentItemSetsAggregation struct { // Fields Fields to analyze. Fields []FrequentItemSetsField `json:"fields"` diff --git a/typedapi/types/frequentitemsetsbucket.go b/typedapi/types/frequentitemsetsbucket.go index fb0fe76f0c..e6fed0f20d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // FrequentItemSetsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L646-L649 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L725-L728 type FrequentItemSetsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -511,6 +511,13 @@ func (s *FrequentItemSetsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/frequentitemsetsfield.go b/typedapi/types/frequentitemsetsfield.go index d40f47e3ab..690d813fbb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // FrequentItemSetsField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L1153-L1165 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L1226-L1238 type FrequentItemSetsField struct { // Exclude Values to exclude. // Can be regular expression strings or arrays of strings of exact terms. diff --git a/typedapi/types/frozenindices.go b/typedapi/types/frozenindices.go index 675d82d0b2..a841995152 100644 --- a/typedapi/types/frozenindices.go +++ b/typedapi/types/frozenindices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FrozenIndices type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L360-L362 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L358-L360 type FrozenIndices struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/functionscore.go b/typedapi/types/functionscore.go index 9a252ed4fa..ac0b01aebd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FunctionScore type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L213-L253 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/compound.ts#L226-L266 type FunctionScore struct { // Exp Function that scores a document with a exponential decay, depending on the // distance of a numeric field value of the document from an origin. diff --git a/typedapi/types/functionscorequery.go b/typedapi/types/functionscorequery.go index 76526325d6..1ce3d353c0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // FunctionScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L93-L122 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/fuzziness.go b/typedapi/types/fuzziness.go index 65d89ac7f2..5f165a19c3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // int // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L133-L134 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L134-L135 type Fuzziness any diff --git a/typedapi/types/fuzzyquery.go b/typedapi/types/fuzzyquery.go index 5d10376d59..c989355095 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // FuzzyQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L44-L79 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/galiciananalyzer.go b/typedapi/types/galiciananalyzer.go new file mode 100644 index 0000000000..69943e2db5 --- /dev/null +++ b/typedapi/types/galiciananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// GalicianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L168-L173 +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"` +} + +func (s *GalicianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 GalicianAnalyzer) MarshalJSON() ([]byte, error) { + type innerGalicianAnalyzer GalicianAnalyzer + tmp := innerGalicianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "galician" + + return json.Marshal(tmp) +} + +// NewGalicianAnalyzer returns a GalicianAnalyzer. +func NewGalicianAnalyzer() *GalicianAnalyzer { + r := &GalicianAnalyzer{} + + return r +} diff --git a/typedapi/types/garbagecollector.go b/typedapi/types/garbagecollector.go index f93f88d797..fa79ba47d4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // GarbageCollector type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L923-L928 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L994-L999 type GarbageCollector struct { // Collectors Contains statistics about JVM garbage collectors for the node. Collectors map[string]GarbageCollectorTotal `json:"collectors,omitempty"` diff --git a/typedapi/types/garbagecollectortotal.go b/typedapi/types/garbagecollectortotal.go index a41b77d995..c23321b302 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GarbageCollectorTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L930-L943 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L1001-L1014 type GarbageCollectorTotal struct { // CollectionCount Total number of JVM garbage collectors that collect objects. CollectionCount *int64 `json:"collection_count,omitempty"` diff --git a/typedapi/types/gcsrepository.go b/typedapi/types/gcsrepository.go index 768911e087..5abf434c61 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GcsRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L45-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L45-L48 type GcsRepository struct { Settings GcsRepositorySettings `json:"settings"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/gcsrepositorysettings.go b/typedapi/types/gcsrepositorysettings.go index a276c3b2b5..d8103a618d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GcsRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L85-L91 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L85-L91 type GcsRepositorySettings struct { ApplicationName *string `json:"application_name,omitempty"` BasePath *string `json:"base_path,omitempty"` diff --git a/typedapi/types/geoboundingboxquery.go b/typedapi/types/geoboundingboxquery.go index 134f326b31..a2a3635104 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // GeoBoundingBoxQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/geo.ts#L32-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/geo.ts#L32-L54 type GeoBoundingBoxQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/geobounds.go b/typedapi/types/geobounds.go index 0c89235074..f5da3817a8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -27,5 +27,5 @@ package types // TopRightBottomLeftGeoBounds // WktGeoBounds // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L135-L148 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Geo.ts#L135-L148 type GeoBounds any diff --git a/typedapi/types/geoboundsaggregate.go b/typedapi/types/geoboundsaggregate.go index e0599d8bf4..e5b65b90ea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GeoBoundsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L303-L306 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L327-L333 type GeoBoundsAggregate struct { Bounds GeoBounds `json:"bounds,omitempty"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geoboundsaggregation.go b/typedapi/types/geoboundsaggregation.go index da05b3b2e3..429f195d46 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeoBoundsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L108-L114 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L108-L117 type GeoBoundsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/geocentroidaggregate.go b/typedapi/types/geocentroidaggregate.go index e9898180a6..fe33d31e12 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeoCentroidAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L308-L312 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L335-L342 type GeoCentroidAggregate struct { Count int64 `json:"count"` Location GeoLocation `json:"location,omitempty"` diff --git a/typedapi/types/geocentroidaggregation.go b/typedapi/types/geocentroidaggregation.go index 5fda07b133..71e62c5a79 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeoCentroidAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L116-L119 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L119-L122 type GeoCentroidAggregation struct { Count *int64 `json:"count,omitempty"` // Field The field on which to run the aggregation. diff --git a/typedapi/types/geodecayfunction.go b/typedapi/types/geodecayfunction.go index 7032078565..7419bf1071 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,7 +29,7 @@ import ( // GeoDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L197-L200 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/geodistanceaggregate.go b/typedapi/types/geodistanceaggregate.go index e2f2f0fd69..eeba402f56 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GeoDistanceAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L554-L558 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L617-L622 type GeoDistanceAggregate struct { Buckets BucketsRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geodistanceaggregation.go b/typedapi/types/geodistanceaggregation.go index 4615ff3402..996af22e16 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // GeoDistanceAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L382-L405 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L396-L419 type GeoDistanceAggregation struct { // DistanceType The distance calculation type. DistanceType *geodistancetype.GeoDistanceType `json:"distance_type,omitempty"` diff --git a/typedapi/types/geodistancefeaturequery.go b/typedapi/types/geodistancefeaturequery.go index 43621cf475..9e2cd1bf0b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeoDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L67-L70 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/geodistancequery.go b/typedapi/types/geodistancequery.go index 7ab6d5e316..083d077902 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // GeoDistanceQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/geo.ts#L60-L91 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/geo.ts#L61-L93 type GeoDistanceQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/geodistancesort.go b/typedapi/types/geodistancesort.go index 349cda2548..8ab7fea435 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -36,7 +36,7 @@ import ( // GeoDistanceSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L59-L71 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/sort.ts#L58-L70 type GeoDistanceSort struct { DistanceType *geodistancetype.GeoDistanceType `json:"distance_type,omitempty"` GeoDistanceSort map[string][]GeoLocation `json:"-"` diff --git a/typedapi/types/geogridprocessor.go b/typedapi/types/geogridprocessor.go new file mode 100644 index 0000000000..3522368909 --- /dev/null +++ b/typedapi/types/geogridprocessor.go @@ -0,0 +1,217 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/geogridtargetformat" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/geogridtiletype" +) + +// GeoGridProcessor type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L388-L429 +type GeoGridProcessor struct { + // ChildrenField If specified and children tiles exist, save those tile addresses to this + // field as an array of strings. + ChildrenField *string `json:"children_field,omitempty"` + // Description Description of the processor. + // Useful for describing the purpose of the processor or its configuration. + Description *string `json:"description,omitempty"` + // Field The field to interpret as a geo-tile.= + // The field format is determined by the `tile_type`. + Field string `json:"field"` + // If Conditionally execute the processor. + If *string `json:"if,omitempty"` + // IgnoreFailure Ignore failures for the processor. + IgnoreFailure *bool `json:"ignore_failure,omitempty"` + // IgnoreMissing If `true` and `field` does not exist, the processor quietly exits without + // modifying the document. + IgnoreMissing *bool `json:"ignore_missing,omitempty"` + // NonChildrenField If specified and intersecting non-child tiles exist, save their addresses to + // this field as an array of strings. + NonChildrenField *string `json:"non_children_field,omitempty"` + // OnFailure Handle failures for the processor. + OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // ParentField If specified and a parent tile exists, save that tile address to this field. + ParentField *string `json:"parent_field,omitempty"` + // PrecisionField If specified, save the tile precision (zoom) as an integer to this field. + PrecisionField *string `json:"precision_field,omitempty"` + // Tag Identifier for the processor. + // Useful for debugging and metrics. + Tag *string `json:"tag,omitempty"` + // TargetField The field to assign the polygon shape to, by default, the `field` is updated + // in-place. + TargetField *string `json:"target_field,omitempty"` + // TargetFormat Which format to save the generated polygon in. + TargetFormat *geogridtargetformat.GeoGridTargetFormat `json:"target_format,omitempty"` + // TileType Three tile formats are understood: geohash, geotile and geohex. + TileType geogridtiletype.GeoGridTileType `json:"tile_type"` +} + +func (s *GeoGridProcessor) 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 "children_field": + if err := dec.Decode(&s.ChildrenField); err != nil { + return fmt.Errorf("%s | %w", "ChildrenField", err) + } + + case "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + case "field": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Field", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Field = o + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "ignore_failure": + 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", "IgnoreFailure", err) + } + s.IgnoreFailure = &value + case bool: + s.IgnoreFailure = &v + } + + case "ignore_missing": + 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", "IgnoreMissing", err) + } + s.IgnoreMissing = &value + case bool: + s.IgnoreMissing = &v + } + + case "non_children_field": + if err := dec.Decode(&s.NonChildrenField); err != nil { + return fmt.Errorf("%s | %w", "NonChildrenField", err) + } + + case "on_failure": + if err := dec.Decode(&s.OnFailure); err != nil { + return fmt.Errorf("%s | %w", "OnFailure", err) + } + + case "parent_field": + if err := dec.Decode(&s.ParentField); err != nil { + return fmt.Errorf("%s | %w", "ParentField", err) + } + + case "precision_field": + if err := dec.Decode(&s.PrecisionField); err != nil { + return fmt.Errorf("%s | %w", "PrecisionField", err) + } + + case "tag": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Tag", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Tag = &o + + case "target_field": + if err := dec.Decode(&s.TargetField); err != nil { + return fmt.Errorf("%s | %w", "TargetField", err) + } + + case "target_format": + if err := dec.Decode(&s.TargetFormat); err != nil { + return fmt.Errorf("%s | %w", "TargetFormat", err) + } + + case "tile_type": + if err := dec.Decode(&s.TileType); err != nil { + return fmt.Errorf("%s | %w", "TileType", err) + } + + } + } + return nil +} + +// NewGeoGridProcessor returns a GeoGridProcessor. +func NewGeoGridProcessor() *GeoGridProcessor { + r := &GeoGridProcessor{} + + return r +} diff --git a/typedapi/types/geohashgridaggregate.go b/typedapi/types/geohashgridaggregate.go index 0d59e6a702..1a8aad98ac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GeoHashGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L510-L512 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L566-L568 type GeoHashGridAggregate struct { Buckets BucketsGeoHashGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geohashgridaggregation.go b/typedapi/types/geohashgridaggregation.go index b7e02cb9cc..6e857b3ad4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeoHashGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L407-L432 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/geohashgridbucket.go b/typedapi/types/geohashgridbucket.go index 3f4286df06..a2c63f85e5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // GeoHashGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L514-L516 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L570-L572 type GeoHashGridBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *GeoHashGridBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/geohashlocation.go b/typedapi/types/geohashlocation.go index 5a94e62f1a..0af555f377 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GeoHashLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L131-L133 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Geo.ts#L131-L133 type GeoHashLocation struct { Geohash string `json:"geohash"` } diff --git a/typedapi/types/geohashprecision.go b/typedapi/types/geohashprecision.go index d217d329bc..7f52b564de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L86-L90 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Geo.ts#L86-L90 type GeoHashPrecision any diff --git a/typedapi/types/geohexgridaggregate.go b/typedapi/types/geohexgridaggregate.go index d53747acc6..3f971debf5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GeoHexGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L526-L527 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L585-L586 type GeoHexGridAggregate struct { Buckets BucketsGeoHexGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geohexgridaggregation.go b/typedapi/types/geohexgridaggregation.go index 31740bd282..8c8f535be5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeohexGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L462-L487 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/geohexgridbucket.go b/typedapi/types/geohexgridbucket.go index 4b9280fd3d..87277419ae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // GeoHexGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L529-L531 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L588-L590 type GeoHexGridBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *GeoHexGridBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/geoipdownloadstatistics.go b/typedapi/types/geoipdownloadstatistics.go index e467049da6..1d210eddf3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,10 +31,12 @@ import ( // GeoIpDownloadStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/geo_ip_stats/types.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/geo_ip_stats/types.ts#L24-L37 type GeoIpDownloadStatistics struct { - // DatabaseCount Current number of databases available for use. - DatabaseCount int `json:"database_count"` + // DatabasesCount Current number of databases available for use. + DatabasesCount int `json:"databases_count"` + // ExpiredDatabases Total number of databases not updated after 30 days + ExpiredDatabases int `json:"expired_databases"` // FailedDownloads Total number of failed database downloads. FailedDownloads int `json:"failed_downloads"` // SkippedUpdates Total number of database updates skipped. @@ -60,7 +62,7 @@ func (s *GeoIpDownloadStatistics) UnmarshalJSON(data []byte) error { switch t { - case "database_count": + case "databases_count": var tmp any dec.Decode(&tmp) @@ -68,12 +70,28 @@ func (s *GeoIpDownloadStatistics) UnmarshalJSON(data []byte) error { case string: value, err := strconv.Atoi(v) if err != nil { - return fmt.Errorf("%s | %w", "DatabaseCount", err) + return fmt.Errorf("%s | %w", "DatabasesCount", err) } - s.DatabaseCount = value + s.DatabasesCount = value case float64: f := int(v) - s.DatabaseCount = f + s.DatabasesCount = f + } + + case "expired_databases": + + 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", "ExpiredDatabases", err) + } + s.ExpiredDatabases = value + case float64: + f := int(v) + s.ExpiredDatabases = f } case "failed_downloads": diff --git a/typedapi/types/geoipnodedatabasename.go b/typedapi/types/geoipnodedatabasename.go index b83120a0e0..2b3bc8b743 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GeoIpNodeDatabaseName type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/geo_ip_stats/types.ts#L45-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/geo_ip_stats/types.ts#L47-L50 type GeoIpNodeDatabaseName struct { // Name Name of the database. Name string `json:"name"` diff --git a/typedapi/types/geoipnodedatabases.go b/typedapi/types/geoipnodedatabases.go index 7fd97ae0d7..6ecba41899 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // GeoIpNodeDatabases type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/geo_ip_stats/types.ts#L37-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/geo_ip_stats/types.ts#L39-L45 type GeoIpNodeDatabases struct { // Databases Downloaded databases for the node. Databases []GeoIpNodeDatabaseName `json:"databases"` diff --git a/typedapi/types/geoipprocessor.go b/typedapi/types/geoipprocessor.go index 24ec7f3f2f..fc631d635c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeoIpProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L339-L368 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L442-L476 type GeoIpProcessor struct { // DatabaseFile The database filename referring to a database the module ships with // (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom @@ -40,6 +40,11 @@ type GeoIpProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. Description *string `json:"description,omitempty"` + // DownloadDatabaseOnPipelineCreation If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the + // missing database is downloaded when the pipeline is created. + // Else, the download is triggered by when the pipeline is used as the + // `default_pipeline` or `final_pipeline` in an index. + DownloadDatabaseOnPipelineCreation *bool `json:"download_database_on_pipeline_creation,omitempty"` // Field The field to get the ip address from for the geographical lookup. Field string `json:"field"` // FirstOnly If `true`, only the first found geoip data will be returned, even if the @@ -104,6 +109,20 @@ func (s *GeoIpProcessor) UnmarshalJSON(data []byte) error { } s.Description = &o + case "download_database_on_pipeline_creation": + 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", "DownloadDatabaseOnPipelineCreation", err) + } + s.DownloadDatabaseOnPipelineCreation = &value + case bool: + s.DownloadDatabaseOnPipelineCreation = &v + } + case "field": if err := dec.Decode(&s.Field); err != nil { return fmt.Errorf("%s | %w", "Field", err) diff --git a/typedapi/types/geoline.go b/typedapi/types/geoline.go index 0bc445326d..bd0376add1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeoLine type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L56-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Geo.ts#L56-L62 type GeoLine struct { // Coordinates Array of `[lon, lat]` coordinates Coordinates [][]Float64 `json:"coordinates"` diff --git a/typedapi/types/geolineaggregate.go b/typedapi/types/geolineaggregate.go index 07b1a7cb46..f956fe066b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeoLineAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L791-L798 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L902-L912 type GeoLineAggregate struct { Geometry GeoLine `json:"geometry"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geolineaggregation.go b/typedapi/types/geolineaggregation.go index b39c387311..093b8c48a8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // GeoLineAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L121-L146 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L124-L149 type GeoLineAggregation struct { // IncludeSort When `true`, returns an additional array of the sort values in the feature // properties. diff --git a/typedapi/types/geolinepoint.go b/typedapi/types/geolinepoint.go index e5f15c910f..7d785bfee4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GeoLinePoint type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L155-L160 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L158-L163 type GeoLinePoint struct { // Field The name of the geo_point field. Field string `json:"field"` diff --git a/typedapi/types/geolinesort.go b/typedapi/types/geolinesort.go index 4116dc16a3..b984585e0a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GeoLineSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L148-L153 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L151-L156 type GeoLineSort struct { // Field The name of the numeric field to use as the sort key for ordering the points. Field string `json:"field"` diff --git a/typedapi/types/geolocation.go b/typedapi/types/geolocation.go index ab69019fb0..665adba656 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -27,5 +27,5 @@ package types // []Float64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L104-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Geo.ts#L104-L118 type GeoLocation any diff --git a/typedapi/types/geopointproperty.go b/typedapi/types/geopointproperty.go index 4a661c119f..fd001a5b04 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // GeoPointProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/geo.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/geo.ts#L24-L32 type GeoPointProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -50,7 +50,6 @@ type GeoPointProperty struct { OnScriptError *onscripterror.OnScriptError `json:"on_script_error,omitempty"` Properties map[string]Property `json:"properties,omitempty"` Script *Script `json:"script,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -864,18 +863,6 @@ func (s *GeoPointProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Script", err) } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -917,7 +904,6 @@ func (s GeoPointProperty) MarshalJSON() ([]byte, error) { OnScriptError: s.OnScriptError, Properties: s.Properties, Script: s.Script, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/geopolygonpoints.go b/typedapi/types/geopolygonpoints.go index 47ccd5b46c..498489dcdf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // GeoPolygonPoints type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/geo.ts#L93-L95 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/geo.ts#L95-L97 type GeoPolygonPoints struct { Points []GeoLocation `json:"points"` } diff --git a/typedapi/types/geopolygonquery.go b/typedapi/types/geopolygonquery.go index d25c8943cd..17a22ad3c3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // GeoPolygonQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/geo.ts#L97-L108 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/geo.ts#L99-L111 type GeoPolygonQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/georesults.go b/typedapi/types/georesults.go index ae12c2d21c..3983287fae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeoResults type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Anomaly.ts#L145-L154 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Anomaly.ts#L145-L154 type GeoResults struct { // ActualPoint The actual value for the bucket formatted as a `geo_point`. ActualPoint string `json:"actual_point"` diff --git a/typedapi/types/geoshapefieldquery.go b/typedapi/types/geoshapefieldquery.go index f2033b7ef0..881397857a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // GeoShapeFieldQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/geo.ts#L115-L126 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/geo.ts#L118-L129 type GeoShapeFieldQuery struct { // IndexedShape Query using an indexed shape retrieved from the the specified document and // path. diff --git a/typedapi/types/geoshapeproperty.go b/typedapi/types/geoshapeproperty.go index 23769cb39f..346730f669 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // GeoShapeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/geo.ts#L41-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/geo.ts#L41-L54 type GeoShapeProperty struct { Coerce *bool `json:"coerce,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -49,7 +49,6 @@ type GeoShapeProperty struct { Meta map[string]string `json:"meta,omitempty"` Orientation *geoorientation.GeoOrientation `json:"orientation,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Strategy *geostrategy.GeoStrategy `json:"strategy,omitempty"` Type string `json:"type,omitempty"` @@ -814,18 +813,6 @@ func (s *GeoShapeProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -870,7 +857,6 @@ func (s GeoShapeProperty) MarshalJSON() ([]byte, error) { Meta: s.Meta, Orientation: s.Orientation, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Strategy: s.Strategy, Type: s.Type, diff --git a/typedapi/types/geoshapequery.go b/typedapi/types/geoshapequery.go index c5b51c16b3..7c403acdad 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeoShapeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/geo.ts#L128-L143 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/geo.ts#L131-L147 type GeoShapeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/geotilegridaggregate.go b/typedapi/types/geotilegridaggregate.go index 14f0f9815b..2e9ddad160 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GeoTileGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L518-L520 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L574-L579 type GeoTileGridAggregate struct { Buckets BucketsGeoTileGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geotilegridaggregation.go b/typedapi/types/geotilegridaggregation.go index f15cd87c05..e0b69a384b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GeoTileGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L434-L460 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/geotilegridbucket.go b/typedapi/types/geotilegridbucket.go index 651e4c8543..3f8820a469 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // GeoTileGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L522-L524 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L581-L583 type GeoTileGridBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *GeoTileGridBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/germananalyzer.go b/typedapi/types/germananalyzer.go new file mode 100644 index 0000000000..045cb850f1 --- /dev/null +++ b/typedapi/types/germananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// GermanAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L175-L180 +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"` +} + +func (s *GermanAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 GermanAnalyzer) MarshalJSON() ([]byte, error) { + type innerGermanAnalyzer GermanAnalyzer + tmp := innerGermanAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "german" + + return json.Marshal(tmp) +} + +// NewGermanAnalyzer returns a GermanAnalyzer. +func NewGermanAnalyzer() *GermanAnalyzer { + r := &GermanAnalyzer{} + + return r +} diff --git a/typedapi/types/getmigrationfeature.go b/typedapi/types/getmigrationfeature.go index af82de81a7..3eb49efa05 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // GetMigrationFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L37-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L37-L42 type GetMigrationFeature struct { FeatureName string `json:"feature_name"` Indices []MigrationFeatureIndexInfo `json:"indices"` diff --git a/typedapi/types/getresult.go b/typedapi/types/getresult.go index 436d1d2b23..49fe3f7799 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,11 +31,12 @@ import ( // GetResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/get/types.ts#L25-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/get/types.ts#L25-L36 type GetResult struct { Fields map[string]json.RawMessage `json:"fields,omitempty"` Found bool `json:"found"` Id_ string `json:"_id"` + Ignored_ []string `json:"_ignored,omitempty"` Index_ string `json:"_index"` PrimaryTerm_ *int64 `json:"_primary_term,omitempty"` Routing_ *string `json:"_routing,omitempty"` @@ -86,6 +87,11 @@ func (s *GetResult) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Id_", err) } + case "_ignored": + if err := dec.Decode(&s.Ignored_); err != nil { + return fmt.Errorf("%s | %w", "Ignored_", err) + } + case "_index": if err := dec.Decode(&s.Index_); err != nil { return fmt.Errorf("%s | %w", "Index_", err) diff --git a/typedapi/types/getscriptcontext.go b/typedapi/types/getscriptcontext.go index 9b868dae00..e5c5a4c6c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GetScriptContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/get_script_context/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/get_script_context/types.ts#L22-L25 type GetScriptContext struct { Methods []ContextMethod `json:"methods"` Name string `json:"name"` diff --git a/typedapi/types/getstats.go b/typedapi/types/getstats.go index 4764b3a030..02f42205c5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GetStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L130-L141 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L130-L141 type GetStats struct { Current int64 `json:"current"` ExistsTime Duration `json:"exists_time,omitempty"` diff --git a/typedapi/types/getuserprofileerrors.go b/typedapi/types/getuserprofileerrors.go index 12fae27266..a1659bd61c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GetUserProfileErrors type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_user_profile/types.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_user_profile/types.ts#L25-L28 type GetUserProfileErrors struct { Count int64 `json:"count"` Details map[string]ErrorCause `json:"details"` diff --git a/typedapi/types/globalaggregate.go b/typedapi/types/globalaggregate.go index 1499d0bae7..7b04edf5c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // GlobalAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L496-L497 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L546-L550 type GlobalAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *GlobalAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/globalaggregation.go b/typedapi/types/globalaggregation.go index db509dc2a8..a28cbe74aa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // GlobalAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L489-L489 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L506-L506 type GlobalAggregation struct { } diff --git a/typedapi/types/globalprivilege.go b/typedapi/types/globalprivilege.go index 2d6e11c05e..32a5b282bc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // GlobalPrivilege type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L336-L338 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L406-L408 type GlobalPrivilege struct { Application ApplicationGlobalUserPrivileges `json:"application"` } diff --git a/typedapi/types/googlenormalizeddistanceheuristic.go b/typedapi/types/googlenormalizeddistanceheuristic.go index c319570802..36eb1697e5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GoogleNormalizedDistanceHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L748-L753 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/grantapikey.go b/typedapi/types/grantapikey.go index fa6e523c0e..ae1de1522e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // GrantApiKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/grant_api_key/types.ts#L25-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/grant_api_key/types.ts#L25-L46 type GrantApiKey struct { // Expiration Expiration time for the API key. By default, API keys never expire. Expiration *string `json:"expiration,omitempty"` diff --git a/typedapi/types/greaterthanvalidation.go b/typedapi/types/greaterthanvalidation.go index 931020f7c0..82ed20c675 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GreaterThanValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L63-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L63-L66 type GreaterThanValidation struct { Constraint Float64 `json:"constraint"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/greekanalyzer.go b/typedapi/types/greekanalyzer.go new file mode 100644 index 0000000000..b4734b8268 --- /dev/null +++ b/typedapi/types/greekanalyzer.go @@ -0,0 +1,113 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// GreekAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L182-L186 +type GreekAnalyzer struct { + Stopwords []string `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` +} + +func (s *GreekAnalyzer) 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": + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 GreekAnalyzer) MarshalJSON() ([]byte, error) { + type innerGreekAnalyzer GreekAnalyzer + tmp := innerGreekAnalyzer{ + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "greek" + + return json.Marshal(tmp) +} + +// NewGreekAnalyzer returns a GreekAnalyzer. +func NewGreekAnalyzer() *GreekAnalyzer { + r := &GreekAnalyzer{} + + return r +} diff --git a/typedapi/types/grokprocessor.go b/typedapi/types/grokprocessor.go index a2ff9f93fe..e112525dd7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,11 +31,14 @@ import ( // GrokProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L672-L697 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L950-L981 type GrokProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. Description *string `json:"description,omitempty"` + // EcsCompatibility Must be disabled or v1. If v1, the processor uses patterns with Elastic + // Common Schema (ECS) field names. + EcsCompatibility *string `json:"ecs_compatibility,omitempty"` // Field The field to use for grok expression parsing. Field string `json:"field"` // If Conditionally execute the processor. @@ -90,6 +93,18 @@ func (s *GrokProcessor) UnmarshalJSON(data []byte) error { } s.Description = &o + case "ecs_compatibility": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "EcsCompatibility", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.EcsCompatibility = &o + case "field": if err := dec.Decode(&s.Field); err != nil { return fmt.Errorf("%s | %w", "Field", err) diff --git a/typedapi/types/groupings.go b/typedapi/types/groupings.go index d7ac5d49f7..4be672db0c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Groupings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/_types/Groupings.ts#L24-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/gsubprocessor.go b/typedapi/types/gsubprocessor.go index 1397e83b30..bfc59cc44e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // GsubProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L699-L723 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L983-L1007 type GsubProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/halffloatnumberproperty.go b/typedapi/types/halffloatnumberproperty.go index 25676d2344..55088105f0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // HalfFloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L147-L150 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L147-L150 type HalfFloatNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -52,7 +52,6 @@ type HalfFloatNumberProperty struct { OnScriptError *onscripterror.OnScriptError `json:"on_script_error,omitempty"` Properties map[string]Property `json:"properties,omitempty"` Script *Script `json:"script,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` // TimeSeriesDimension For internal use by Elastic only. Marks the field as a time series dimension. // Defaults to false. @@ -859,18 +858,6 @@ func (s *HalfFloatNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Script", err) } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -932,7 +919,6 @@ func (s HalfFloatNumberProperty) MarshalJSON() ([]byte, error) { OnScriptError: s.OnScriptError, Properties: s.Properties, Script: s.Script, - Similarity: s.Similarity, Store: s.Store, TimeSeriesDimension: s.TimeSeriesDimension, TimeSeriesMetric: s.TimeSeriesMetric, diff --git a/typedapi/types/haschildquery.go b/typedapi/types/haschildquery.go index 305084c0f8..beb60bda00 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // HasChildQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/joining.ts#L41-L76 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/hasparentquery.go b/typedapi/types/hasparentquery.go index 67f70d3f4c..a559678156 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HasParentQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/joining.ts#L78-L104 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/hasprivilegesuserprofileerrors.go b/typedapi/types/hasprivilegesuserprofileerrors.go index 22f14ef8d1..f847068876 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HasPrivilegesUserProfileErrors type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/has_privileges_user_profile/types.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/has_privileges_user_profile/types.ts#L39-L42 type HasPrivilegesUserProfileErrors struct { Count int64 `json:"count"` Details map[string]ErrorCause `json:"details"` diff --git a/typedapi/types/hdrmethod.go b/typedapi/types/hdrmethod.go index 0187e3d7b3..688bc59c84 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HdrMethod type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L216-L221 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L225-L230 type HdrMethod struct { // NumberOfSignificantValueDigits Specifies the resolution of values for the histogram in number of significant // digits. diff --git a/typedapi/types/hdrpercentileranksaggregate.go b/typedapi/types/hdrpercentileranksaggregate.go index 2b62cfa386..f8ae52696e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // HdrPercentileRanksAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L169-L170 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L171-L172 type HdrPercentileRanksAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` diff --git a/typedapi/types/hdrpercentilesaggregate.go b/typedapi/types/hdrpercentilesaggregate.go index e9566f4033..df3c8014c7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // HdrPercentilesAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L166-L167 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L168-L169 type HdrPercentilesAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` diff --git a/typedapi/types/healthrecord.go b/typedapi/types/healthrecord.go index 479989dde5..b2d6e4a281 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HealthRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/health/types.ts#L23-L94 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/health/types.ts#L23-L99 type HealthRecord struct { // ActiveShardsPercent active number of shards in percent ActiveShardsPercent *string `json:"active_shards_percent,omitempty"` @@ -61,6 +61,8 @@ type HealthRecord struct { Timestamp *string `json:"timestamp,omitempty"` // Unassign number of unassigned shards Unassign *string `json:"unassign,omitempty"` + // UnassignPri number of unassigned primary shards + UnassignPri *string `json:"unassign.pri,omitempty"` } func (s *HealthRecord) UnmarshalJSON(data []byte) error { @@ -232,6 +234,18 @@ func (s *HealthRecord) UnmarshalJSON(data []byte) error { } s.Unassign = &o + case "unassign.pri", "up", "shards.unassigned.primary", "shardsUnassignedPrimary": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "UnassignPri", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.UnassignPri = &o + } } return nil diff --git a/typedapi/types/healthresponsebody.go b/typedapi/types/healthresponsebody.go index 4667bbf9be..ea84308d35 100644 --- a/typedapi/types/healthresponsebody.go +++ b/typedapi/types/healthresponsebody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // HealthResponseBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/health/ClusterHealthResponse.ts#L39-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/health/ClusterHealthResponse.ts#L39-L74 type HealthResponseBody struct { // ActivePrimaryShards The number of active primary shards. ActivePrimaryShards int `json:"active_primary_shards"` @@ -68,6 +68,8 @@ type HealthResponseBody struct { // TimedOut If false the response returned within the period of time that is specified by // the timeout parameter (30s by default) TimedOut bool `json:"timed_out"` + // UnassignedPrimaryShards The number of primary shards that are not allocated. + UnassignedPrimaryShards int `json:"unassigned_primary_shards"` // UnassignedShards The number of shards that are not allocated. UnassignedShards int `json:"unassigned_shards"` } @@ -278,6 +280,22 @@ func (s *HealthResponseBody) UnmarshalJSON(data []byte) error { s.TimedOut = v } + case "unassigned_primary_shards": + + 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", "UnassignedPrimaryShards", err) + } + s.UnassignedPrimaryShards = value + case float64: + f := int(v) + s.UnassignedPrimaryShards = f + } + case "unassigned_shards": var tmp any diff --git a/typedapi/types/healthstatistics.go b/typedapi/types/healthstatistics.go index 9d6d42bd3e..db7de4a858 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HealthStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L153-L155 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L151-L153 type HealthStatistics struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/helprecord.go b/typedapi/types/helprecord.go index 37adb37c13..5d13700a83 100644 --- a/typedapi/types/helprecord.go +++ b/typedapi/types/helprecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HelpRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/help/types.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/help/types.ts#L20-L22 type HelpRecord struct { Endpoint string `json:"endpoint"` } diff --git a/typedapi/types/highlight.go b/typedapi/types/highlight.go index 0a745970a4..aa3676a93f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -38,7 +38,7 @@ import ( // Highlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/highlighting.ts#L153-L156 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/highlighting.ts#L152-L155 type Highlight struct { // BoundaryChars A string that contains each boundary character. BoundaryChars *string `json:"boundary_chars,omitempty"` diff --git a/typedapi/types/highlightfield.go b/typedapi/types/highlightfield.go index bcfe06592d..cac739d2ab 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -37,9 +37,8 @@ import ( // HighlightField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/highlighting.ts#L193-L197 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/highlighting.ts#L192-L195 type HighlightField struct { - Analyzer Analyzer `json:"analyzer,omitempty"` // BoundaryChars A string that contains each boundary character. BoundaryChars *string `json:"boundary_chars,omitempty"` // BoundaryMaxScan How far to scan for boundary characters. @@ -131,110 +130,6 @@ func (s *HighlightField) UnmarshalJSON(data []byte) error { switch t { - case "analyzer": - - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - source := bytes.NewReader(rawMsg) - kind := make(map[string]string, 0) - localDec := json.NewDecoder(source) - localDec.Decode(&kind) - source.Seek(0, io.SeekStart) - if _, ok := kind["type"]; !ok { - kind["type"] = "custom" - } - switch kind["type"] { - - case "custom": - o := NewCustomAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "fingerprint": - o := NewFingerprintAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "keyword": - o := NewKeywordAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "language": - o := NewLanguageAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "nori": - o := NewNoriAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "pattern": - o := NewPatternAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "simple": - o := NewSimpleAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "standard": - o := NewStandardAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "stop": - o := NewStopAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "whitespace": - o := NewWhitespaceAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "icu_analyzer": - o := NewIcuAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "kuromoji": - o := NewKuromojiAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "snowball": - o := NewSnowballAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - case "dutch": - o := NewDutchAnalyzer() - if err := localDec.Decode(&o); err != nil { - return err - } - s.Analyzer = *o - default: - if err := localDec.Decode(&s.Analyzer); err != nil { - return err - } - } - case "boundary_chars": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/hindianalyzer.go b/typedapi/types/hindianalyzer.go new file mode 100644 index 0000000000..1024a54502 --- /dev/null +++ b/typedapi/types/hindianalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// HindiAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L188-L193 +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"` +} + +func (s *HindiAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 HindiAnalyzer) MarshalJSON() ([]byte, error) { + type innerHindiAnalyzer HindiAnalyzer + tmp := innerHindiAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "hindi" + + return json.Marshal(tmp) +} + +// NewHindiAnalyzer returns a HindiAnalyzer. +func NewHindiAnalyzer() *HindiAnalyzer { + r := &HindiAnalyzer{} + + return r +} diff --git a/typedapi/types/hint.go b/typedapi/types/hint.go index 50edbb7393..fbb7811c7c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Hint type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/suggest_user_profiles/types.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/histogramaggregate.go b/typedapi/types/histogramaggregate.go index 25e06b4c84..47ad1c7f7a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // HistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L342-L343 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L372-L376 type HistogramAggregate struct { Buckets BucketsHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/histogramaggregation.go b/typedapi/types/histogramaggregation.go index 4203b18f2f..b43934eca5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // HistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L502-L548 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/histogrambucket.go b/typedapi/types/histogrambucket.go index 66de69940f..a5480c7854 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // HistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L345-L348 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L378-L381 type HistogramBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -515,6 +515,13 @@ func (s *HistogramBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/histogramgrouping.go b/typedapi/types/histogramgrouping.go index 241683a99e..6e1715efae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HistogramGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/_types/Groupings.ts#L84-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/histogramproperty.go b/typedapi/types/histogramproperty.go index f47501ee32..74f8269c63 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // HistogramProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/specialized.ts#L60-L63 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/specialized.ts#L60-L63 type HistogramProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/hit.go b/typedapi/types/hit.go index 0fb7cb9577..86896a5419 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,13 +31,13 @@ import ( // Hit type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/hits.ts#L40-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/hits.ts#L41-L66 type Hit struct { Explanation_ *Explanation `json:"_explanation,omitempty"` Fields map[string]json.RawMessage `json:"fields,omitempty"` Highlight map[string][]string `json:"highlight,omitempty"` Id_ *string `json:"_id,omitempty"` - IgnoredFieldValues map[string][]string `json:"ignored_field_values,omitempty"` + IgnoredFieldValues map[string][]FieldValue `json:"ignored_field_values,omitempty"` Ignored_ []string `json:"_ignored,omitempty"` Index_ string `json:"_index"` InnerHits map[string]InnerHitsResult `json:"inner_hits,omitempty"` @@ -98,7 +98,7 @@ func (s *Hit) UnmarshalJSON(data []byte) error { case "ignored_field_values": if s.IgnoredFieldValues == nil { - s.IgnoredFieldValues = make(map[string][]string, 0) + s.IgnoredFieldValues = make(map[string][]FieldValue, 0) } if err := dec.Decode(&s.IgnoredFieldValues); err != nil { return fmt.Errorf("%s | %w", "IgnoredFieldValues", err) @@ -130,7 +130,7 @@ func (s *Hit) UnmarshalJSON(data []byte) error { localDec := json.NewDecoder(source) switch rawMsg[0] { case '{': - o := make(map[string][]Float64, 0) + o := make(map[string]Float64, 0) if err := localDec.Decode(&o); err != nil { return fmt.Errorf("%s | %w", "MatchedQueries", err) } @@ -250,7 +250,7 @@ func NewHit() *Hit { r := &Hit{ Fields: make(map[string]json.RawMessage, 0), Highlight: make(map[string][]string, 0), - IgnoredFieldValues: make(map[string][]string, 0), + IgnoredFieldValues: make(map[string][]FieldValue, 0), InnerHits: make(map[string]InnerHitsResult, 0), } diff --git a/typedapi/types/hitsevent.go b/typedapi/types/hitsevent.go index 24ba793f53..c28f8ff018 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HitsEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/eql/_types/EqlHits.ts#L41-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/hitsmetadata.go b/typedapi/types/hitsmetadata.go index aafdfd9afc..73b574185c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // HitsMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/hits.ts#L67-L73 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/hits.ts#L68-L74 type HitsMetadata struct { Hits []Hit `json:"hits"` MaxScore *Float64 `json:"max_score,omitempty"` diff --git a/typedapi/types/hitssequence.go b/typedapi/types/hitssequence.go index 7ae87e0ecf..223016b8e0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // HitsSequence type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/eql/_types/EqlHits.ts#L56-L64 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/holtlinearmodelsettings.go b/typedapi/types/holtlinearmodelsettings.go index 465097e3eb..719af39324 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HoltLinearModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L271-L274 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/pipeline.ts#L297-L300 type HoltLinearModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` Beta *float32 `json:"beta,omitempty"` diff --git a/typedapi/types/holtmovingaverageaggregation.go b/typedapi/types/holtmovingaverageaggregation.go index 06ecb705c8..a8faede864 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // HoltMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L257-L260 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/holtwintersmodelsettings.go b/typedapi/types/holtwintersmodelsettings.go index 01f4388663..48376fc06e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // HoltWintersModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L275-L282 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/pipeline.ts#L301-L308 type HoltWintersModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` Beta *float32 `json:"beta,omitempty"` diff --git a/typedapi/types/holtwintersmovingaverageaggregation.go b/typedapi/types/holtwintersmovingaverageaggregation.go index ac62d11734..36aaa01ea9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // HoltWintersMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L262-L265 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/hop.go b/typedapi/types/hop.go index 0ab9babc51..f6c81a0172 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Hop type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/graph/_types/Hop.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/hourandminute.go b/typedapi/types/hourandminute.go index 19511773c1..319cdb661d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // HourAndMinute type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Schedule.ts#L105-L108 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Schedule.ts#L105-L108 type HourAndMinute struct { Hour []int `json:"hour"` Minute []int `json:"minute"` diff --git a/typedapi/types/hourlyschedule.go b/typedapi/types/hourlyschedule.go index 442d11a276..e65e007a15 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // HourlySchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Schedule.ts#L47-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Schedule.ts#L47-L49 type HourlySchedule struct { Minute []int `json:"minute"` } diff --git a/typedapi/types/htmlstripcharfilter.go b/typedapi/types/htmlstripcharfilter.go index 7b59c84978..f7a1aed74e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // HtmlStripCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/char_filters.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/char_filters.ts#L46-L49 type HtmlStripCharFilter struct { EscapedTags []string `json:"escaped_tags,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/htmlstripprocessor.go b/typedapi/types/htmlstripprocessor.go new file mode 100644 index 0000000000..62d685578b --- /dev/null +++ b/typedapi/types/htmlstripprocessor.go @@ -0,0 +1,162 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// HtmlStripProcessor type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1009-L1025 +type HtmlStripProcessor struct { + // Description Description of the processor. + // Useful for describing the purpose of the processor or its configuration. + Description *string `json:"description,omitempty"` + // Field The string-valued field to remove HTML tags from. + Field string `json:"field"` + // If Conditionally execute the processor. + If *string `json:"if,omitempty"` + // IgnoreFailure Ignore failures for the processor. + IgnoreFailure *bool `json:"ignore_failure,omitempty"` + // IgnoreMissing If `true` and `field` does not exist or is `null`, the processor quietly + // exits without modifying the document, + IgnoreMissing *bool `json:"ignore_missing,omitempty"` + // OnFailure Handle failures for the processor. + OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // Tag Identifier for the processor. + // Useful for debugging and metrics. + Tag *string `json:"tag,omitempty"` + // TargetField The field to assign the converted value to + // By default, the `field` is updated in-place. + TargetField *string `json:"target_field,omitempty"` +} + +func (s *HtmlStripProcessor) 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 "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + case "field": + if err := dec.Decode(&s.Field); err != nil { + return fmt.Errorf("%s | %w", "Field", err) + } + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "ignore_failure": + 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", "IgnoreFailure", err) + } + s.IgnoreFailure = &value + case bool: + s.IgnoreFailure = &v + } + + case "ignore_missing": + 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", "IgnoreMissing", err) + } + s.IgnoreMissing = &value + case bool: + s.IgnoreMissing = &v + } + + case "on_failure": + if err := dec.Decode(&s.OnFailure); err != nil { + return fmt.Errorf("%s | %w", "OnFailure", err) + } + + case "tag": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Tag", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Tag = &o + + case "target_field": + if err := dec.Decode(&s.TargetField); err != nil { + return fmt.Errorf("%s | %w", "TargetField", err) + } + + } + } + return nil +} + +// NewHtmlStripProcessor returns a HtmlStripProcessor. +func NewHtmlStripProcessor() *HtmlStripProcessor { + r := &HtmlStripProcessor{} + + return r +} diff --git a/typedapi/types/http.go b/typedapi/types/http.go index 2f4a31936c..40ad476b46 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Http type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L633-L647 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L669-L688 type Http struct { // Clients Information on current and recently-closed HTTP client connections. // Clients that have been closed longer than the @@ -40,6 +40,8 @@ type Http struct { Clients []Client `json:"clients,omitempty"` // CurrentOpen Current number of open HTTP connections for the node. CurrentOpen *int `json:"current_open,omitempty"` + // Routes Detailed HTTP stats broken down by route + Routes map[string]HttpRoute `json:"routes"` // TotalOpened Total number of HTTP connections opened for the node. TotalOpened *int64 `json:"total_opened,omitempty"` } @@ -80,6 +82,14 @@ func (s *Http) UnmarshalJSON(data []byte) error { s.CurrentOpen = &f } + case "routes": + if s.Routes == nil { + s.Routes = make(map[string]HttpRoute, 0) + } + if err := dec.Decode(&s.Routes); err != nil { + return fmt.Errorf("%s | %w", "Routes", err) + } + case "total_opened": var tmp any dec.Decode(&tmp) @@ -102,7 +112,9 @@ func (s *Http) UnmarshalJSON(data []byte) error { // NewHttp returns a Http. func NewHttp() *Http { - r := &Http{} + r := &Http{ + Routes: make(map[string]HttpRoute, 0), + } return r } diff --git a/typedapi/types/httpemailattachment.go b/typedapi/types/httpemailattachment.go index a5231a8997..4bf752050e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HttpEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L218-L222 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L218-L222 type HttpEmailAttachment struct { ContentType *string `json:"content_type,omitempty"` Inline *bool `json:"inline,omitempty"` diff --git a/typedapi/types/httpheaders.go b/typedapi/types/httpheaders.go index 617e121f08..3da2fac69c 100644 --- a/typedapi/types/httpheaders.go +++ b/typedapi/types/httpheaders.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // HttpHeaders type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L158-L158 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L159-L159 type HttpHeaders map[string][]string diff --git a/typedapi/types/httpinput.go b/typedapi/types/httpinput.go index 80021c81a8..d801dd6e50 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // HttpInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L44-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L44-L48 type HttpInput struct { Extract []string `json:"extract,omitempty"` Request *HttpInputRequestDefinition `json:"request,omitempty"` diff --git a/typedapi/types/httpinputauthentication.go b/typedapi/types/httpinputauthentication.go index 3d07115298..8565ca4779 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // HttpInputAuthentication type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L50-L52 type HttpInputAuthentication struct { Basic HttpInputBasicAuthentication `json:"basic"` } diff --git a/typedapi/types/httpinputbasicauthentication.go b/typedapi/types/httpinputbasicauthentication.go index 83580dfd0b..5acdde8b48 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // HttpInputBasicAuthentication type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L54-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L54-L57 type HttpInputBasicAuthentication struct { Password string `json:"password"` Username string `json:"username"` diff --git a/typedapi/types/httpinputproxy.go b/typedapi/types/httpinputproxy.go index 35421a2689..e9af5a8191 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // HttpInputProxy type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L67-L70 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L67-L70 type HttpInputProxy struct { Host string `json:"host"` Port uint `json:"port"` diff --git a/typedapi/types/httpinputrequestdefinition.go b/typedapi/types/httpinputrequestdefinition.go index db24e02f22..f556728735 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // HttpInputRequestDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L72-L86 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L72-L86 type HttpInputRequestDefinition struct { Auth *HttpInputAuthentication `json:"auth,omitempty"` Body *string `json:"body,omitempty"` diff --git a/typedapi/types/httpinputrequestresult.go b/typedapi/types/httpinputrequestresult.go index 5aa57f544c..2afe0d0afe 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // HttpInputRequestResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L300-L300 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L300-L300 type HttpInputRequestResult struct { Auth *HttpInputAuthentication `json:"auth,omitempty"` Body *string `json:"body,omitempty"` diff --git a/typedapi/types/httpinputresponseresult.go b/typedapi/types/httpinputresponseresult.go index 4cdacc1f06..12ac962c49 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HttpInputResponseResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L302-L306 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L302-L306 type HttpInputResponseResult struct { Body string `json:"body"` Headers HttpHeaders `json:"headers"` diff --git a/typedapi/types/httproute.go b/typedapi/types/httproute.go new file mode 100644 index 0000000000..dc38aff7e2 --- /dev/null +++ b/typedapi/types/httproute.go @@ -0,0 +1,36 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +// HttpRoute type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L690-L693 +type HttpRoute struct { + Requests HttpRouteRequests `json:"requests"` + Responses HttpRouteResponses `json:"responses"` +} + +// NewHttpRoute returns a HttpRoute. +func NewHttpRoute() *HttpRoute { + r := &HttpRoute{} + + return r +} diff --git a/typedapi/types/httprouterequests.go b/typedapi/types/httprouterequests.go new file mode 100644 index 0000000000..7009e03123 --- /dev/null +++ b/typedapi/types/httprouterequests.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// HttpRouteRequests type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L695-L699 +type HttpRouteRequests struct { + Count int64 `json:"count"` + SizeHistogram []SizeHttpHistogram `json:"size_histogram"` + TotalSizeInBytes int64 `json:"total_size_in_bytes"` +} + +func (s *HttpRouteRequests) 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 "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", "Count", err) + } + s.Count = value + case float64: + f := int64(v) + s.Count = f + } + + case "size_histogram": + if err := dec.Decode(&s.SizeHistogram); err != nil { + return fmt.Errorf("%s | %w", "SizeHistogram", 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 +} + +// NewHttpRouteRequests returns a HttpRouteRequests. +func NewHttpRouteRequests() *HttpRouteRequests { + r := &HttpRouteRequests{} + + return r +} diff --git a/typedapi/types/httprouteresponses.go b/typedapi/types/httprouteresponses.go new file mode 100644 index 0000000000..8019b802c9 --- /dev/null +++ b/typedapi/types/httprouteresponses.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// HttpRouteResponses type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L701-L706 +type HttpRouteResponses struct { + Count int64 `json:"count"` + HandlingTimeHistogram []TimeHttpHistogram `json:"handling_time_histogram"` + SizeHistogram []SizeHttpHistogram `json:"size_histogram"` + TotalSizeInBytes int64 `json:"total_size_in_bytes"` +} + +func (s *HttpRouteResponses) 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 "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", "Count", err) + } + s.Count = value + case float64: + f := int64(v) + s.Count = f + } + + case "handling_time_histogram": + if err := dec.Decode(&s.HandlingTimeHistogram); err != nil { + return fmt.Errorf("%s | %w", "HandlingTimeHistogram", err) + } + + case "size_histogram": + if err := dec.Decode(&s.SizeHistogram); err != nil { + return fmt.Errorf("%s | %w", "SizeHistogram", 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 +} + +// NewHttpRouteResponses returns a HttpRouteResponses. +func NewHttpRouteResponses() *HttpRouteResponses { + r := &HttpRouteResponses{} + + return r +} diff --git a/typedapi/types/hungariananalyzer.go b/typedapi/types/hungariananalyzer.go new file mode 100644 index 0000000000..1d926518fc --- /dev/null +++ b/typedapi/types/hungariananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// HungarianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L195-L200 +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"` +} + +func (s *HungarianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 HungarianAnalyzer) MarshalJSON() ([]byte, error) { + type innerHungarianAnalyzer HungarianAnalyzer + tmp := innerHungarianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "hungarian" + + return json.Marshal(tmp) +} + +// NewHungarianAnalyzer returns a HungarianAnalyzer. +func NewHungarianAnalyzer() *HungarianAnalyzer { + r := &HungarianAnalyzer{} + + return r +} diff --git a/typedapi/types/hunspelltokenfilter.go b/typedapi/types/hunspelltokenfilter.go index 3de32e7b36..0b61ce458f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HunspellTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L202-L208 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L201-L207 type HunspellTokenFilter struct { Dedup *bool `json:"dedup,omitempty"` Dictionary *string `json:"dictionary,omitempty"` diff --git a/typedapi/types/hyperparameter.go b/typedapi/types/hyperparameter.go index 0bce5f8dc9..2b5a711131 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Hyperparameter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L217-L231 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L261-L275 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 diff --git a/typedapi/types/hyperparameters.go b/typedapi/types/hyperparameters.go index 475e8e5112..811afede06 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Hyperparameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L419-L525 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/hyphenationdecompoundertokenfilter.go b/typedapi/types/hyphenationdecompoundertokenfilter.go index bf01f182d0..3864f031c5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // HyphenationDecompounderTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L58-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L57-L59 type HyphenationDecompounderTokenFilter struct { HyphenationPatternsPath *string `json:"hyphenation_patterns_path,omitempty"` MaxSubwordSize *int `json:"max_subword_size,omitempty"` diff --git a/typedapi/types/icuanalyzer.go b/typedapi/types/icuanalyzer.go index 9110d62f42..046a923e2a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,7 +29,7 @@ import ( // IcuAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L67-L71 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L67-L71 type IcuAnalyzer struct { Method icunormalizationtype.IcuNormalizationType `json:"method"` Mode icunormalizationmode.IcuNormalizationMode `json:"mode"` diff --git a/typedapi/types/icucollationproperty.go b/typedapi/types/icucollationproperty.go index d56a76d508..c6ba775a51 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -38,7 +38,7 @@ import ( // IcuCollationProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/specialized.ts#L94-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/specialized.ts#L94-L118 type IcuCollationProperty struct { Alternate *icucollationalternate.IcuCollationAlternate `json:"alternate,omitempty"` CaseFirst *icucollationcasefirst.IcuCollationCaseFirst `json:"case_first,omitempty"` @@ -64,7 +64,6 @@ type IcuCollationProperty struct { Numeric *bool `json:"numeric,omitempty"` Properties map[string]Property `json:"properties,omitempty"` Rules *string `json:"rules,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Strength *icucollationstrength.IcuCollationStrength `json:"strength,omitempty"` Type string `json:"type,omitempty"` @@ -922,18 +921,6 @@ func (s *IcuCollationProperty) UnmarshalJSON(data []byte) error { } s.Rules = &o - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -1011,7 +998,6 @@ func (s IcuCollationProperty) MarshalJSON() ([]byte, error) { Numeric: s.Numeric, Properties: s.Properties, Rules: s.Rules, - Similarity: s.Similarity, Store: s.Store, Strength: s.Strength, Type: s.Type, diff --git a/typedapi/types/icucollationtokenfilter.go b/typedapi/types/icucollationtokenfilter.go index 54f0f91257..28de126811 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -36,7 +36,7 @@ import ( // IcuCollationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L51-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L51-L65 type IcuCollationTokenFilter struct { Alternate *icucollationalternate.IcuCollationAlternate `json:"alternate,omitempty"` CaseFirst *icucollationcasefirst.IcuCollationCaseFirst `json:"case_first,omitempty"` diff --git a/typedapi/types/icufoldingtokenfilter.go b/typedapi/types/icufoldingtokenfilter.go index 48a6224101..dab90d31f1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IcuFoldingTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L46-L49 type IcuFoldingTokenFilter struct { Type string `json:"type,omitempty"` UnicodeSetFilter string `json:"unicode_set_filter"` diff --git a/typedapi/types/icunormalizationcharfilter.go b/typedapi/types/icunormalizationcharfilter.go index cb3ebafde8..acf650f4f8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IcuNormalizationCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L40-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L40-L44 type IcuNormalizationCharFilter struct { Mode *icunormalizationmode.IcuNormalizationMode `json:"mode,omitempty"` Name *icunormalizationtype.IcuNormalizationType `json:"name,omitempty"` diff --git a/typedapi/types/icunormalizationtokenfilter.go b/typedapi/types/icunormalizationtokenfilter.go index e5319eb7a0..1126d1c930 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // IcuNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L35-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L35-L38 type IcuNormalizationTokenFilter struct { Name icunormalizationtype.IcuNormalizationType `json:"name"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/icutokenizer.go b/typedapi/types/icutokenizer.go index 99e65ef73e..3ee37349af 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IcuTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L30-L33 type IcuTokenizer struct { RuleFiles string `json:"rule_files"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/icutransformtokenfilter.go b/typedapi/types/icutransformtokenfilter.go index 084de35307..e9675ca885 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IcuTransformTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/icu-plugin.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/icu-plugin.ts#L24-L28 type IcuTransformTokenFilter struct { Dir *icutransformdirection.IcuTransformDirection `json:"dir,omitempty"` Id string `json:"id"` diff --git a/typedapi/types/ids.go b/typedapi/types/ids.go index d0c872bcc4..6c3911b03f 100644 --- a/typedapi/types/ids.go +++ b/typedapi/types/ids.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Ids type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L62-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L62-L62 type Ids []string diff --git a/typedapi/types/idsquery.go b/typedapi/types/idsquery.go index 1b5806919c..72d9e64e17 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IdsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L81-L86 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/ilm.go b/typedapi/types/ilm.go index 9e2eeae7e3..eefb4c354d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Ilm type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L162-L165 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L160-L163 type Ilm struct { PolicyCount int `json:"policy_count"` PolicyStats []IlmPolicyStatistics `json:"policy_stats"` diff --git a/typedapi/types/ilmactions.go b/typedapi/types/ilmactions.go index 14a1148ba9..64bb07c78c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IlmActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L42-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L42-L96 type IlmActions struct { // Allocate Phases allowed: warm, cold. Allocate *AllocateAction `json:"allocate,omitempty"` diff --git a/typedapi/types/ilmindicator.go b/typedapi/types/ilmindicator.go index 5fbebad1d6..ae830db512 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IlmIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L146-L150 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L163-L167 type IlmIndicator struct { Details *IlmIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/ilmindicatordetails.go b/typedapi/types/ilmindicatordetails.go index 410a93e17e..4ad1ca36a1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IlmIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L151-L155 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L168-L172 type IlmIndicatorDetails struct { IlmStatus lifecycleoperationmode.LifecycleOperationMode `json:"ilm_status"` Policies int64 `json:"policies"` diff --git a/typedapi/types/ilmpolicy.go b/typedapi/types/ilmpolicy.go index 916eafb79c..0226478363 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // IlmPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Policy.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Policy.ts#L23-L26 type IlmPolicy struct { Meta_ Metadata `json:"_meta,omitempty"` Phases Phases `json:"phases"` diff --git a/typedapi/types/ilmpolicystatistics.go b/typedapi/types/ilmpolicystatistics.go index 26f2864d62..b8c79f367b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IlmPolicyStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L157-L160 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L155-L158 type IlmPolicyStatistics struct { IndicesManaged int `json:"indices_managed"` Phases Phases `json:"phases"` diff --git a/typedapi/types/impact.go b/typedapi/types/impact.go index c31f064884..75f1176ec5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // Impact type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L65-L70 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L66-L71 type Impact struct { Description string `json:"description"` Id string `json:"id"` diff --git a/typedapi/types/includedinvalidation.go b/typedapi/types/includedinvalidation.go index e84b65941c..b4c286d26c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // IncludedInValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L73-L76 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L73-L76 type IncludedInValidation struct { Constraint []ScalarValue `json:"constraint"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/indexaction.go b/typedapi/types/indexaction.go index 7e572619e2..35203f1103 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IndexAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L256-L265 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L256-L265 type IndexAction struct { DocId *string `json:"doc_id,omitempty"` ExecutionTimeField *string `json:"execution_time_field,omitempty"` diff --git a/typedapi/types/indexaliases.go b/typedapi/types/indexaliases.go index 40252526af..83a41fd9ad 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndexAliases type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_alias/IndicesGetAliasResponse.ts#L37-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get_alias/IndicesGetAliasResponse.ts#L37-L39 type IndexAliases struct { Aliases map[string]AliasDefinition `json:"aliases"` } diff --git a/typedapi/types/indexanddatastreamaction.go b/typedapi/types/indexanddatastreamaction.go index 389f8ceab4..cf1c5e67c8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // IndexAndDataStreamAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/modify_data_stream/types.ts#L39-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/modify_data_stream/types.ts#L39-L44 type IndexAndDataStreamAction struct { // DataStream Data stream targeted by the action. DataStream string `json:"data_stream"` diff --git a/typedapi/types/indexcapabilities.go b/typedapi/types/indexcapabilities.go index 50b6a6db77..d297cbb9d9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndexCapabilities type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_rollup_index_caps/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/get_rollup_index_caps/types.ts#L24-L26 type IndexCapabilities struct { RollupJobs []RollupJobSummary `json:"rollup_jobs"` } diff --git a/typedapi/types/indexdetails.go b/typedapi/types/indexdetails.go index 911a50aa5e..e880ceff06 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndexDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotIndexDetails.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotIndexDetails.ts#L23-L28 type IndexDetails struct { MaxSegmentsPerShard int64 `json:"max_segments_per_shard"` ShardCount int `json:"shard_count"` diff --git a/typedapi/types/indexfield.go b/typedapi/types/indexfield.go index 51dff1f06d..3c2ee0dd16 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndexField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/meta-fields.ts#L46-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/meta-fields.ts#L46-L48 type IndexField struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/indexhealthstats.go b/typedapi/types/indexhealthstats.go index 6ba0250a30..f6986b0933 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,17 +33,18 @@ import ( // IndexHealthStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/health/types.ts#L24-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/health/types.ts#L24-L35 type IndexHealthStats struct { - ActivePrimaryShards int `json:"active_primary_shards"` - ActiveShards int `json:"active_shards"` - InitializingShards int `json:"initializing_shards"` - NumberOfReplicas int `json:"number_of_replicas"` - NumberOfShards int `json:"number_of_shards"` - RelocatingShards int `json:"relocating_shards"` - Shards map[string]ShardHealthStats `json:"shards,omitempty"` - Status healthstatus.HealthStatus `json:"status"` - UnassignedShards int `json:"unassigned_shards"` + ActivePrimaryShards int `json:"active_primary_shards"` + ActiveShards int `json:"active_shards"` + InitializingShards int `json:"initializing_shards"` + NumberOfReplicas int `json:"number_of_replicas"` + NumberOfShards int `json:"number_of_shards"` + RelocatingShards int `json:"relocating_shards"` + Shards map[string]ShardHealthStats `json:"shards,omitempty"` + Status healthstatus.HealthStatus `json:"status"` + UnassignedPrimaryShards int `json:"unassigned_primary_shards"` + UnassignedShards int `json:"unassigned_shards"` } func (s *IndexHealthStats) UnmarshalJSON(data []byte) error { @@ -170,6 +171,22 @@ func (s *IndexHealthStats) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Status", err) } + case "unassigned_primary_shards": + + 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", "UnassignedPrimaryShards", err) + } + s.UnassignedPrimaryShards = value + case float64: + f := int(v) + s.UnassignedPrimaryShards = f + } + case "unassigned_shards": var tmp any diff --git a/typedapi/types/indexingpressurememorysummary.go b/typedapi/types/indexingpressurememorysummary.go index fac68493d2..09da3ea661 100644 --- a/typedapi/types/indexingpressurememorysummary.go +++ b/typedapi/types/indexingpressurememorysummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndexingPressureMemorySummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L580-L589 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/indexingslowlogsettings.go b/typedapi/types/indexingslowlogsettings.go index f7e582cfb3..8cb8a8fb71 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndexingSlowlogSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L563-L568 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L563-L568 type IndexingSlowlogSettings struct { Level *string `json:"level,omitempty"` Reformat *bool `json:"reformat,omitempty"` diff --git a/typedapi/types/indexingslowlogtresholds.go b/typedapi/types/indexingslowlogtresholds.go index b368a39987..00e881731a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndexingSlowlogTresholds type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L570-L577 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L570-L577 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`. diff --git a/typedapi/types/indexingstats.go b/typedapi/types/indexingstats.go index a0ba1bcea9..f402329d85 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndexingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L143-L159 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L143-L159 type IndexingStats struct { DeleteCurrent int64 `json:"delete_current"` DeleteTime Duration `json:"delete_time,omitempty"` diff --git a/typedapi/types/indexmappingrecord.go b/typedapi/types/indexmappingrecord.go index 0a402cc637..743e472df8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndexMappingRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L29-L32 type IndexMappingRecord struct { Item *TypeMapping `json:"item,omitempty"` Mappings TypeMapping `json:"mappings"` diff --git a/typedapi/types/indexoperation.go b/typedapi/types/indexoperation.go index 70694e361b..a023aa5741 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IndexOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/bulk/types.ts#L132-L132 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/bulk/types.ts#L132-L132 type IndexOperation struct { // DynamicTemplates A map from the full name of fields to the name of dynamic templates. // Defaults to an empty map. diff --git a/typedapi/types/indexprivilegescheck.go b/typedapi/types/indexprivilegescheck.go index 16eb4e6cbd..474dc410f6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IndexPrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/has_privileges/types.ts#L33-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/has_privileges/types.ts#L33-L44 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. diff --git a/typedapi/types/indexresult.go b/typedapi/types/indexresult.go index 031dff0b9d..c487e2bc58 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndexResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L267-L269 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L267-L269 type IndexResult struct { Response IndexResultSummary `json:"response"` } diff --git a/typedapi/types/indexresultsummary.go b/typedapi/types/indexresultsummary.go index a7e27839c1..e42a3fad31 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IndexResultSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L271-L277 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L271-L277 type IndexResultSummary struct { Created bool `json:"created"` Id string `json:"id"` diff --git a/typedapi/types/indexrouting.go b/typedapi/types/indexrouting.go index f0f28b4d3f..957653c87c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndexRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexRouting.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexRouting.ts#L22-L25 type IndexRouting struct { Allocation *IndexRoutingAllocation `json:"allocation,omitempty"` Rebalance *IndexRoutingRebalance `json:"rebalance,omitempty"` diff --git a/typedapi/types/indexroutingallocation.go b/typedapi/types/indexroutingallocation.go index 83e9937a55..5b3ccd1d15 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // IndexRoutingAllocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexRouting.ts#L27-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexRouting.ts#L27-L32 type IndexRoutingAllocation struct { Disk *IndexRoutingAllocationDisk `json:"disk,omitempty"` Enable *indexroutingallocationoptions.IndexRoutingAllocationOptions `json:"enable,omitempty"` diff --git a/typedapi/types/indexroutingallocationdisk.go b/typedapi/types/indexroutingallocationdisk.go index 7948124b06..244b250f7d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndexRoutingAllocationDisk type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexRouting.ts#L62-L64 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexRouting.ts#L62-L64 type IndexRoutingAllocationDisk struct { ThresholdEnabled string `json:"threshold_enabled,omitempty"` } diff --git a/typedapi/types/indexroutingallocationinclude.go b/typedapi/types/indexroutingallocationinclude.go index 81fcdcfdbe..1c91583280 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndexRoutingAllocationInclude type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexRouting.ts#L52-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexRouting.ts#L52-L55 type IndexRoutingAllocationInclude struct { Id_ *string `json:"_id,omitempty"` TierPreference_ *string `json:"_tier_preference,omitempty"` diff --git a/typedapi/types/indexroutingallocationinitialrecovery.go b/typedapi/types/indexroutingallocationinitialrecovery.go index 1449cd8c98..4f4886f3a8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // IndexRoutingAllocationInitialRecovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexRouting.ts#L57-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexRouting.ts#L57-L59 type IndexRoutingAllocationInitialRecovery struct { Id_ *string `json:"_id,omitempty"` } diff --git a/typedapi/types/indexroutingrebalance.go b/typedapi/types/indexroutingrebalance.go index 6c1e0f854f..3ace9d1302 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // IndexRoutingRebalance type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexRouting.ts#L34-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexRouting.ts#L34-L36 type IndexRoutingRebalance struct { Enable indexroutingrebalanceoptions.IndexRoutingRebalanceOptions `json:"enable"` } diff --git a/typedapi/types/indexsegment.go b/typedapi/types/indexsegment.go index 338bb0e741..307967a3b9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndexSegment type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/segments/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/segments/types.ts#L24-L26 type IndexSegment struct { Shards map[string][]ShardsSegment `json:"shards"` } diff --git a/typedapi/types/indexsegmentsort.go b/typedapi/types/indexsegmentsort.go index 641185056a..2ce47c9118 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // IndexSegmentSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSegmentSort.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSegmentSort.ts#L22-L27 type IndexSegmentSort struct { Field []string `json:"field,omitempty"` Missing []segmentsortmissing.SegmentSortMissing `json:"missing,omitempty"` diff --git a/typedapi/types/indexsettingblocks.go b/typedapi/types/indexsettingblocks.go index 12e98f693f..c81de56231 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // IndexSettingBlocks type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L254-L260 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L254-L260 type IndexSettingBlocks struct { Metadata Stringifiedboolean `json:"metadata,omitempty"` Read Stringifiedboolean `json:"read,omitempty"` diff --git a/typedapi/types/indexsettings.go b/typedapi/types/indexsettings.go index 3529b0f30f..3999ca0430 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IndexSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L69-L169 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L69-L169 type IndexSettings struct { Analysis *IndexSettingsAnalysis `json:"analysis,omitempty"` // Analyze Settings to define analyzers, tokenizers, token filters and character diff --git a/typedapi/types/indexsettingsanalysis.go b/typedapi/types/indexsettingsanalysis.go index 8b9ccb616a..ac691d3da4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,7 +29,7 @@ import ( // IndexSettingsAnalysis type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L319-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L319-L325 type IndexSettingsAnalysis struct { Analyzer map[string]Analyzer `json:"analyzer,omitempty"` CharFilter map[string]CharFilter `json:"char_filter,omitempty"` @@ -147,12 +147,228 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return err } s.Analyzer[key] = oo + case "arabic": + oo := NewArabicAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "armenian": + oo := NewArmenianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "basque": + oo := NewBasqueAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "bengali": + oo := NewBengaliAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "brazilian": + oo := NewBrazilianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "bulgarian": + oo := NewBulgarianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "catalan": + oo := NewCatalanAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "chinese": + oo := NewChineseAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "cjk": + oo := NewCjkAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "czech": + oo := NewCzechAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "danish": + oo := NewDanishAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo case "dutch": oo := NewDutchAnalyzer() if err := localDec.Decode(&oo); err != nil { return err } s.Analyzer[key] = oo + case "english": + oo := NewEnglishAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "estonian": + oo := NewEstonianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "finnish": + oo := NewFinnishAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "french": + oo := NewFrenchAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "galician": + oo := NewGalicianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "german": + oo := NewGermanAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "greek": + oo := NewGreekAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "hindi": + oo := NewHindiAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "hungarian": + oo := NewHungarianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "indonesian": + oo := NewIndonesianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "irish": + oo := NewIrishAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "italian": + oo := NewItalianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "latvian": + oo := NewLatvianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "lithuanian": + oo := NewLithuanianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "norwegian": + oo := NewNorwegianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "persian": + oo := NewPersianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "portuguese": + oo := NewPortugueseAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "romanian": + oo := NewRomanianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "russian": + oo := NewRussianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "serbian": + oo := NewSerbianAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "sorani": + oo := NewSoraniAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "spanish": + oo := NewSpanishAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "swedish": + oo := NewSwedishAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "turkish": + oo := NewTurkishAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo + case "thai": + oo := NewThaiAnalyzer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Analyzer[key] = oo default: oo := new(Analyzer) if err := localDec.Decode(&oo); err != nil { @@ -577,6 +793,12 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return err } s.Tokenizer[key] = oo + case "classic": + oo := NewClassicTokenizer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Tokenizer[key] = oo case "edge_ngram": oo := NewEdgeNGramTokenizer() if err := localDec.Decode(&oo); err != nil { @@ -607,14 +829,26 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return err } s.Tokenizer[key] = oo - case "nori_tokenizer": - oo := NewNoriTokenizer() + case "path_hierarchy": + oo := NewPathHierarchyTokenizer() if err := localDec.Decode(&oo); err != nil { return err } s.Tokenizer[key] = oo - case "path_hierarchy": - oo := NewPathHierarchyTokenizer() + case "pattern": + oo := NewPatternTokenizer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Tokenizer[key] = oo + case "simple_pattern": + oo := NewSimplePatternTokenizer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Tokenizer[key] = oo + case "simple_pattern_split": + oo := NewSimplePatternSplitTokenizer() if err := localDec.Decode(&oo); err != nil { return err } @@ -625,6 +859,12 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return err } s.Tokenizer[key] = oo + case "thai": + oo := NewThaiTokenizer() + if err := localDec.Decode(&oo); err != nil { + return err + } + s.Tokenizer[key] = oo case "uax_url_email": oo := NewUaxEmailUrlTokenizer() if err := localDec.Decode(&oo); err != nil { @@ -637,20 +877,20 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return err } s.Tokenizer[key] = oo - case "kuromoji_tokenizer": - oo := NewKuromojiTokenizer() + case "icu_tokenizer": + oo := NewIcuTokenizer() if err := localDec.Decode(&oo); err != nil { return err } s.Tokenizer[key] = oo - case "pattern": - oo := NewPatternTokenizer() + case "kuromoji_tokenizer": + oo := NewKuromojiTokenizer() if err := localDec.Decode(&oo); err != nil { return err } s.Tokenizer[key] = oo - case "icu_tokenizer": - oo := NewIcuTokenizer() + case "nori_tokenizer": + oo := NewNoriTokenizer() if err := localDec.Decode(&oo); err != nil { return err } diff --git a/typedapi/types/indexsettingslifecycle.go b/typedapi/types/indexsettingslifecycle.go index 2c0672d365..26342a18e3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndexSettingsLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L276-L309 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L276-L309 type IndexSettingsLifecycle struct { // IndexingComplete Indicates whether or not the index has been rolled over. Automatically set to // true when ILM completes the rollover action. diff --git a/typedapi/types/indexsettingslifecyclestep.go b/typedapi/types/indexsettingslifecyclestep.go index 74892f3e5f..6bcd92d5fc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // IndexSettingsLifecycleStep type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L311-L317 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L311-L317 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). diff --git a/typedapi/types/indexsettingstimeseries.go b/typedapi/types/indexsettingstimeseries.go index e4b1701aa8..ba84cec0bd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // IndexSettingsTimeSeries type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L327-L330 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L327-L330 type IndexSettingsTimeSeries struct { EndTime DateTime `json:"end_time,omitempty"` StartTime DateTime `json:"start_time,omitempty"` diff --git a/typedapi/types/indexstate.go b/typedapi/types/indexstate.go index 5da696984d..f365370f30 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // IndexState type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexState.ts#L27-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexState.ts#L27-L40 type IndexState struct { Aliases map[string]Alias `json:"aliases,omitempty"` DataStream *string `json:"data_stream,omitempty"` diff --git a/typedapi/types/indexstats.go b/typedapi/types/indexstats.go index 858733abbb..942d42814e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L52-L93 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/indextemplate.go b/typedapi/types/indextemplate.go index ecbbc53ff0..11f57fc951 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndexTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexTemplate.ts#L31-L70 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexTemplate.ts#L28-L81 type IndexTemplate struct { AllowAutoCreate *bool `json:"allow_auto_create,omitempty"` // ComposedOf An ordered list of component template names. @@ -43,6 +43,13 @@ type IndexTemplate struct { // Supports an empty object. // Data streams require a matching index template with a `data_stream` object. DataStream *IndexTemplateDataStreamConfiguration `json:"data_stream,omitempty"` + // Deprecated Marks this index template as deprecated. + // When creating or updating a non-deprecated index template that uses + // deprecated components, + // Elasticsearch will emit a deprecation warning. + Deprecated *bool `json:"deprecated,omitempty"` + // IgnoreMissingComponentTemplates A list of component template names that are allowed to be absent. + IgnoreMissingComponentTemplates []string `json:"ignore_missing_component_templates,omitempty"` // IndexPatterns Name of the index template. IndexPatterns []string `json:"index_patterns"` // Meta_ Optional user metadata about the index template. May have any contents. @@ -103,6 +110,36 @@ func (s *IndexTemplate) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "DataStream", err) } + case "deprecated": + 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", "Deprecated", err) + } + s.Deprecated = &value + case bool: + s.Deprecated = &v + } + + case "ignore_missing_component_templates": + 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", "IgnoreMissingComponentTemplates", err) + } + + s.IgnoreMissingComponentTemplates = append(s.IgnoreMissingComponentTemplates, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.IgnoreMissingComponentTemplates); err != nil { + return fmt.Errorf("%s | %w", "IgnoreMissingComponentTemplates", err) + } + } + case "index_patterns": rawMsg := json.RawMessage{} dec.Decode(&rawMsg) diff --git a/typedapi/types/indextemplatedatastreamconfiguration.go b/typedapi/types/indextemplatedatastreamconfiguration.go index c33afcdd17..f36b9f779d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndexTemplateDataStreamConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexTemplate.ts#L72-L83 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexTemplate.ts#L83-L94 type IndexTemplateDataStreamConfiguration struct { // AllowCustomRouting If true, the data stream supports custom routing. AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` diff --git a/typedapi/types/indextemplateitem.go b/typedapi/types/indextemplateitem.go index 33c586e5f0..8c3669efd7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // IndexTemplateItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L29-L32 type IndexTemplateItem struct { IndexTemplate IndexTemplate `json:"index_template"` Name string `json:"name"` diff --git a/typedapi/types/indextemplatemapping.go b/typedapi/types/indextemplatemapping.go index 8fb8505695..a832cdea73 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndexTemplateMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L121-L143 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L121-L143 type IndexTemplateMapping struct { // Aliases Aliases to add. // If the index template includes a `data_stream` object, these are data stream diff --git a/typedapi/types/indextemplatesummary.go b/typedapi/types/indextemplatesummary.go index 9a88c18f54..be43b13504 100644 --- a/typedapi/types/indextemplatesummary.go +++ b/typedapi/types/indextemplatesummary.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndexTemplateSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexTemplate.ts#L85-L107 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexTemplate.ts#L96-L118 type IndexTemplateSummary struct { // Aliases Aliases to add. // If the index template includes a `data_stream` object, these are data stream diff --git a/typedapi/types/indexversioning.go b/typedapi/types/indexversioning.go index 81c6e355f7..ba7a74133c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndexVersioning type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L271-L274 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L271-L274 type IndexVersioning struct { Created *string `json:"created,omitempty"` CreatedString *string `json:"created_string,omitempty"` diff --git a/typedapi/types/indicatornode.go b/typedapi/types/indicatornode.go index 0d7b82dfb5..dfa99d5c81 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndicatorNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L90-L93 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L91-L94 type IndicatorNode struct { Name *string `json:"name,omitempty"` NodeId *string `json:"node_id,omitempty"` diff --git a/typedapi/types/indicators.go b/typedapi/types/indicators.go index ec613e257b..766f966424 100644 --- a/typedapi/types/indicators.go +++ b/typedapi/types/indicators.go @@ -16,14 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Indicators type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L32-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L32-L41 type Indicators struct { + DataStreamLifecycle *DataStreamLifecycleIndicator `json:"data_stream_lifecycle,omitempty"` Disk *DiskIndicator `json:"disk,omitempty"` Ilm *IlmIndicator `json:"ilm,omitempty"` MasterIsStable *MasterIsStableIndicator `json:"master_is_stable,omitempty"` diff --git a/typedapi/types/indices.go b/typedapi/types/indices.go index e15ac32f2d..66603a1c5b 100644 --- a/typedapi/types/indices.go +++ b/typedapi/types/indices.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Indices type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L67-L67 type Indices []string diff --git a/typedapi/types/indicesaction.go b/typedapi/types/indicesaction.go index 3535f56933..7f903d4b1c 100644 --- a/typedapi/types/indicesaction.go +++ b/typedapi/types/indicesaction.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndicesAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/update_aliases/types.ts#L23-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/indicesblockstatus.go b/typedapi/types/indicesblockstatus.go index 3bc6963147..eee01ead1a 100644 --- a/typedapi/types/indicesblockstatus.go +++ b/typedapi/types/indicesblockstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndicesBlockStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/add_block/IndicesAddBlockResponse.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/add_block/IndicesAddBlockResponse.ts#L30-L33 type IndicesBlockStatus struct { Blocked bool `json:"blocked"` Name string `json:"name"` diff --git a/typedapi/types/indicesindexingpressure.go b/typedapi/types/indicesindexingpressure.go index baf383ef55..82fdd2086f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndicesIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L550-L552 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L550-L552 type IndicesIndexingPressure struct { Memory IndicesIndexingPressureMemory `json:"memory"` } diff --git a/typedapi/types/indicesindexingpressurememory.go b/typedapi/types/indicesindexingpressurememory.go index 1a30a65f70..c6c9da2a8b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndicesIndexingPressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L554-L561 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L554-L561 type IndicesIndexingPressureMemory struct { // Limit Number of outstanding bytes that may be consumed by indexing requests. When // this limit is reached or exceeded, diff --git a/typedapi/types/indicesmodifyaction.go b/typedapi/types/indicesmodifyaction.go index 213c45f183..a1c251d5c9 100644 --- a/typedapi/types/indicesmodifyaction.go +++ b/typedapi/types/indicesmodifyaction.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndicesModifyAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/modify_data_stream/types.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/indicesoptions.go b/typedapi/types/indicesoptions.go index d371d0f553..52d07f031b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IndicesOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L335-L362 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L336-L363 type IndicesOptions struct { // AllowNoIndices If false, the request returns an error if any wildcard expression, index // alias, or `_all` value targets only diff --git a/typedapi/types/indicesprivileges.go b/typedapi/types/indicesprivileges.go index 4adc91c616..65ae98c7be 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L197-L221 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L217-L243 type IndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited diff --git a/typedapi/types/indicesprivilegesquery.go b/typedapi/types/indicesprivilegesquery.go index c02c853ddf..0f51776ec5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ package types // Query // RoleTemplateQuery // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L247-L255 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L317-L325 type IndicesPrivilegesQuery any diff --git a/typedapi/types/indicesrecord.go b/typedapi/types/indicesrecord.go index 32d4116a56..0d60bc15ab 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndicesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/indices/types.ts#L20-L801 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` @@ -49,6 +49,8 @@ type IndicesRecord struct { CreationDate *string `json:"creation.date,omitempty"` // CreationDateString index creation date (as string) CreationDateString *string `json:"creation.date.string,omitempty"` + // DatasetSize total size of dataset (including the cache for partially mounted indices) + DatasetSize *string `json:"dataset.size,omitempty"` // DocsCount available docs DocsCount *string `json:"docs.count,omitempty"` // DocsDeleted deleted docs @@ -430,6 +432,18 @@ func (s *IndicesRecord) UnmarshalJSON(data []byte) error { } s.CreationDateString = &o + case "dataset.size": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "DatasetSize", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.DatasetSize = &o + case "docs.count", "dc", "docsCount": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/indicesshardsstats.go b/typedapi/types/indicesshardsstats.go index 4b0f896e7d..742c2c88c0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndicesShardsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L52-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L52-L55 type IndicesShardsStats struct { AllFields FieldSummary `json:"all_fields"` Fields map[string]FieldSummary `json:"fields"` diff --git a/typedapi/types/indicesshardstats.go b/typedapi/types/indicesshardstats.go index b648c131f5..ff9de6696c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // IndicesShardStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L192-L223 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L192-L223 type IndicesShardStats struct { Bulk *BulkStats `json:"bulk,omitempty"` Commit *ShardCommit `json:"commit,omitempty"` diff --git a/typedapi/types/indicesshardstores.go b/typedapi/types/indicesshardstores.go index 1f43ba9236..43afc11ee9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IndicesShardStores type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/shard_stores/types.ts#L26-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/shard_stores/types.ts#L25-L27 type IndicesShardStores struct { Shards map[string]ShardStoreWrapper `json:"shards"` } diff --git a/typedapi/types/indicesstats.go b/typedapi/types/indicesstats.go index 1e14481eb9..262ba3d1ad 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IndicesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L95-L110 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L95-L110 type IndicesStats struct { Health *healthstatus.HealthStatus `json:"health,omitempty"` Primaries *IndexStats `json:"primaries,omitempty"` diff --git a/typedapi/types/indicesvalidationexplanation.go b/typedapi/types/indicesvalidationexplanation.go index 9b5f724e8c..eac25165f3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndicesValidationExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L32-L37 type IndicesValidationExplanation struct { Error *string `json:"error,omitempty"` Explanation *string `json:"explanation,omitempty"` diff --git a/typedapi/types/indicesversions.go b/typedapi/types/indicesversions.go index 551cd0629d..1c826d1c25 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IndicesVersions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L263-L268 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L263-L268 type IndicesVersions struct { IndexCount int `json:"index_count"` PrimaryShardCount int `json:"primary_shard_count"` diff --git a/typedapi/types/indonesiananalyzer.go b/typedapi/types/indonesiananalyzer.go new file mode 100644 index 0000000000..3ef0fc3cb2 --- /dev/null +++ b/typedapi/types/indonesiananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// IndonesianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L202-L207 +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"` +} + +func (s *IndonesianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 IndonesianAnalyzer) MarshalJSON() ([]byte, error) { + type innerIndonesianAnalyzer IndonesianAnalyzer + tmp := innerIndonesianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "indonesian" + + return json.Marshal(tmp) +} + +// NewIndonesianAnalyzer returns a IndonesianAnalyzer. +func NewIndonesianAnalyzer() *IndonesianAnalyzer { + r := &IndonesianAnalyzer{} + + return r +} diff --git a/typedapi/types/inferenceaggregate.go b/typedapi/types/inferenceaggregate.go index c09c1b593d..981ba39c31 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InferenceAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L663-L677 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L755-L770 type InferenceAggregate struct { Data map[string]json.RawMessage `json:"-"` FeatureImportance []InferenceFeatureImportance `json:"feature_importance,omitempty"` diff --git a/typedapi/types/inferenceaggregation.go b/typedapi/types/inferenceaggregation.go index 62c6bbca97..b7faae011d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // InferenceAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L205-L214 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/inferenceclassimportance.go b/typedapi/types/inferenceclassimportance.go index b50219e807..6c20c8d1e5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InferenceClassImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L691-L694 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L784-L787 type InferenceClassImportance struct { ClassName string `json:"class_name"` Importance Float64 `json:"importance"` diff --git a/typedapi/types/inferenceconfig.go b/typedapi/types/inferenceconfig.go index ce45c20d9d..7dd856bc2b 100644 --- a/typedapi/types/inferenceconfig.go +++ b/typedapi/types/inferenceconfig.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // InferenceConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L746-L758 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1048-L1060 type InferenceConfig struct { // Classification Classification configuration for inference. Classification *InferenceConfigClassification `json:"classification,omitempty"` diff --git a/typedapi/types/inferenceconfigclassification.go b/typedapi/types/inferenceconfigclassification.go index fae6f02edc..050e821782 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InferenceConfigClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L773-L799 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1075-L1101 type InferenceConfigClassification struct { // NumTopClasses Specifies the number of top class predictions to return. NumTopClasses *int `json:"num_top_classes,omitempty"` diff --git a/typedapi/types/inferenceconfigcontainer.go b/typedapi/types/inferenceconfigcontainer.go index e2cec8b751..16cfd0a3be 100644 --- a/typedapi/types/inferenceconfigcontainer.go +++ b/typedapi/types/inferenceconfigcontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // InferenceConfigContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L216-L222 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/pipeline.ts#L236-L242 type InferenceConfigContainer struct { // Classification Classification configuration for inference. Classification *ClassificationInferenceOptions `json:"classification,omitempty"` diff --git a/typedapi/types/inferenceconfigcreatecontainer.go b/typedapi/types/inferenceconfigcreatecontainer.go index fde9799f76..fe71f5621f 100644 --- a/typedapi/types/inferenceconfigcreatecontainer.go +++ b/typedapi/types/inferenceconfigcreatecontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // InferenceConfigCreateContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L23-L80 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L23-L80 type InferenceConfigCreateContainer struct { // Classification Classification configuration for inference. Classification *ClassificationInferenceOptions `json:"classification,omitempty"` diff --git a/typedapi/types/inferenceconfigregression.go b/typedapi/types/inferenceconfigregression.go index 928f2ad59a..8ccf019390 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InferenceConfigRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L760-L771 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1062-L1073 type InferenceConfigRegression struct { // NumTopFeatureImportanceValues Specifies the maximum number of feature importance values per document. NumTopFeatureImportanceValues *int `json:"num_top_feature_importance_values,omitempty"` diff --git a/typedapi/types/inferenceconfigupdatecontainer.go b/typedapi/types/inferenceconfigupdatecontainer.go index 915b763303..434d353c9a 100644 --- a/typedapi/types/inferenceconfigupdatecontainer.go +++ b/typedapi/types/inferenceconfigupdatecontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // InferenceConfigUpdateContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L296-L318 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L284-L306 type InferenceConfigUpdateContainer struct { // Classification Classification configuration for inference. Classification *ClassificationInferenceOptions `json:"classification,omitempty"` diff --git a/typedapi/types/inferenceendpoint.go b/typedapi/types/inferenceendpoint.go index 72a6ad3fa7..2baea49964 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,14 +31,14 @@ import ( // InferenceEndpoint type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/_types/Services.ts#L23-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/_types/Services.ts#L23-L39 type InferenceEndpoint struct { // 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"` + TaskSettings json.RawMessage `json:"task_settings,omitempty"` } func (s *InferenceEndpoint) UnmarshalJSON(data []byte) error { diff --git a/typedapi/types/inferenceendpointinfo.go b/typedapi/types/inferenceendpointinfo.go index bb4f99415e..1a6f02bf4a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // InferenceEndpointInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/_types/Services.ts#L41-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/_types/Services.ts#L41-L53 type InferenceEndpointInfo struct { // InferenceId The inference Id InferenceId string `json:"inference_id"` @@ -42,7 +42,7 @@ type InferenceEndpointInfo struct { // 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"` + TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type TaskType tasktype.TaskType `json:"task_type"` } diff --git a/typedapi/types/inferencefeatureimportance.go b/typedapi/types/inferencefeatureimportance.go index 9ffcb95391..f0c87eee51 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InferenceFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L685-L689 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L778-L782 type InferenceFeatureImportance struct { Classes []InferenceClassImportance `json:"classes,omitempty"` FeatureName string `json:"feature_name"` diff --git a/typedapi/types/inferenceprocessor.go b/typedapi/types/inferenceprocessor.go index bc14b87b2c..d522b8ee37 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InferenceProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L725-L744 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1027-L1046 type InferenceProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/inferenceresponseresult.go b/typedapi/types/inferenceresponseresult.go index 1199efd5ba..8d063e6259 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InferenceResponseResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L459-L506 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L447-L495 type InferenceResponseResult struct { // Entities If the model is trained for named entity recognition (NER) tasks, the // response contains the recognized entities. @@ -55,7 +55,7 @@ type InferenceResponseResult struct { // For regression models, its a numerical value // For classification models, it may be an integer, double, boolean or string // depending on prediction type - PredictedValue []PredictedValue `json:"predicted_value,omitempty"` + PredictedValue [][]ScalarValue `json:"predicted_value,omitempty"` // PredictedValueSequence For fill mask tasks, the response contains the input text sequence with the // mask token replaced by the predicted // value. @@ -116,7 +116,7 @@ func (s *InferenceResponseResult) UnmarshalJSON(data []byte) error { rawMsg := json.RawMessage{} dec.Decode(&rawMsg) if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(PredictedValue) + o := new([]ScalarValue) if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { return fmt.Errorf("%s | %w", "PredictedValue", err) } diff --git a/typedapi/types/inferenceresult.go b/typedapi/types/inferenceresult.go index 1c063229b4..f29ccbcdf7 100644 --- a/typedapi/types/inferenceresult.go +++ b/typedapi/types/inferenceresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // InferenceResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/_types/Results.ts#L79-L89 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/_types/Results.ts#L79-L89 type InferenceResult struct { Completion []CompletionResult `json:"completion,omitempty"` Rerank []RankedDocument `json:"rerank,omitempty"` diff --git a/typedapi/types/inferencetopclassentry.go b/typedapi/types/inferencetopclassentry.go index 93de8a7ae9..19418966da 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InferenceTopClassEntry type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L679-L683 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L772-L776 type InferenceTopClassEntry struct { ClassName FieldValue `json:"class_name"` ClassProbability Float64 `json:"class_probability"` diff --git a/typedapi/types/influence.go b/typedapi/types/influence.go index aed3d1d1fd..b2c71f0944 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Influence type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Anomaly.ts#L140-L143 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Anomaly.ts#L140-L143 type Influence struct { InfluencerFieldName string `json:"influencer_field_name"` InfluencerFieldValues []string `json:"influencer_field_values"` diff --git a/typedapi/types/influencer.go b/typedapi/types/influencer.go index 714982bde1..f4f00640e8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Influencer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Influencer.ts#L31-L83 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/infofeaturestate.go b/typedapi/types/infofeaturestate.go index 0195d54d9d..271a9a3089 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InfoFeatureState type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotInfoFeatureState.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotInfoFeatureState.ts#L22-L25 type InfoFeatureState struct { FeatureName string `json:"feature_name"` Indices []string `json:"indices"` diff --git a/typedapi/types/ingestpipeline.go b/typedapi/types/ingestpipeline.go index bf4340720c..df8e7efe77 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,8 +31,13 @@ import ( // IngestPipeline type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Pipeline.ts#L23-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 + // pipeline when creating or updating a non-deprecated index template, + // Elasticsearch will emit a deprecation warning. + Deprecated *bool `json:"deprecated,omitempty"` // Description Description of the ingest pipeline. Description *string `json:"description,omitempty"` // Meta_ Arbitrary metadata about the ingest pipeline. This map is not automatically @@ -62,6 +67,20 @@ func (s *IngestPipeline) UnmarshalJSON(data []byte) error { switch t { + case "deprecated": + 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", "Deprecated", err) + } + s.Deprecated = &value + case bool: + s.Deprecated = &v + } + case "description": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/ingestpipelineparams.go b/typedapi/types/ingestpipelineparams.go index 886e5ac8f0..4e01e74f22 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IngestPipelineParams type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L148-L153 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L148-L153 type IngestPipelineParams struct { ExtractBinaryContent bool `json:"extract_binary_content"` Name string `json:"name"` diff --git a/typedapi/types/ingeststats.go b/typedapi/types/ingeststats.go new file mode 100644 index 0000000000..80aface7a3 --- /dev/null +++ b/typedapi/types/ingeststats.go @@ -0,0 +1,175 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// IngestStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L356-L394 +type IngestStats struct { + // Count Total number of documents ingested during the lifetime of this node. + Count int64 `json:"count"` + // Current Total number of documents currently being ingested. + Current int64 `json:"current"` + // Failed Total number of failed ingest operations during the lifetime of this node. + Failed int64 `json:"failed"` + // IngestedAsFirstPipelineInBytes Total number of bytes of all documents ingested by the pipeline. + // This field is only present on pipelines which are the first to process a + // document. + // Thus, it is not present on pipelines which only serve as a final pipeline + // after a default pipeline, a pipeline run after a reroute processor, or + // pipelines in pipeline processors. + IngestedAsFirstPipelineInBytes int64 `json:"ingested_as_first_pipeline_in_bytes"` + // Processors Total number of ingest processors. + Processors []map[string]KeyedProcessor `json:"processors"` + // ProducedAsFirstPipelineInBytes Total number of bytes of all documents produced by the pipeline. + // This field is only present on pipelines which are the first to process a + // document. + // Thus, it is not present on pipelines which only serve as a final pipeline + // after a default pipeline, a pipeline run after a reroute processor, or + // pipelines in pipeline processors. + // In situations where there are subsequent pipelines, the value represents the + // size of the document after all pipelines have run. + ProducedAsFirstPipelineInBytes int64 `json:"produced_as_first_pipeline_in_bytes"` + // TimeInMillis Total time, in milliseconds, spent preprocessing ingest documents during the + // lifetime of this node. + TimeInMillis int64 `json:"time_in_millis"` +} + +func (s *IngestStats) 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 "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", "Count", err) + } + s.Count = value + case float64: + f := int64(v) + s.Count = f + } + + case "current": + 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", "Current", err) + } + s.Current = value + case float64: + f := int64(v) + s.Current = f + } + + case "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", "Failed", err) + } + s.Failed = value + case float64: + f := int64(v) + s.Failed = f + } + + case "ingested_as_first_pipeline_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", "IngestedAsFirstPipelineInBytes", err) + } + s.IngestedAsFirstPipelineInBytes = value + case float64: + f := int64(v) + s.IngestedAsFirstPipelineInBytes = f + } + + case "processors": + if err := dec.Decode(&s.Processors); err != nil { + return fmt.Errorf("%s | %w", "Processors", err) + } + + case "produced_as_first_pipeline_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", "ProducedAsFirstPipelineInBytes", err) + } + s.ProducedAsFirstPipelineInBytes = value + case float64: + f := int64(v) + s.ProducedAsFirstPipelineInBytes = f + } + + case "time_in_millis": + if err := dec.Decode(&s.TimeInMillis); err != nil { + return fmt.Errorf("%s | %w", "TimeInMillis", err) + } + + } + } + return nil +} + +// NewIngestStats returns a IngestStats. +func NewIngestStats() *IngestStats { + r := &IngestStats{} + + return r +} diff --git a/typedapi/types/ingesttotal.go b/typedapi/types/ingesttotal.go index 2f58202ebf..b73045c310 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,19 +31,17 @@ import ( // IngestTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L356-L377 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L396-L413 type IngestTotal struct { // Count Total number of documents ingested during the lifetime of this node. - Count *int64 `json:"count,omitempty"` + Count int64 `json:"count"` // Current Total number of documents currently being ingested. - Current *int64 `json:"current,omitempty"` + Current int64 `json:"current"` // Failed Total number of failed ingest operations during the lifetime of this node. - Failed *int64 `json:"failed,omitempty"` - // Processors Total number of ingest processors. - Processors []map[string]KeyedProcessor `json:"processors,omitempty"` + Failed int64 `json:"failed"` // TimeInMillis Total time, in milliseconds, spent preprocessing ingest documents during the // lifetime of this node. - TimeInMillis *int64 `json:"time_in_millis,omitempty"` + TimeInMillis int64 `json:"time_in_millis"` } func (s *IngestTotal) UnmarshalJSON(data []byte) error { @@ -70,10 +68,10 @@ func (s *IngestTotal) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "Count", err) } - s.Count = &value + s.Count = value case float64: f := int64(v) - s.Count = &f + s.Count = f } case "current": @@ -85,10 +83,10 @@ func (s *IngestTotal) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "Current", err) } - s.Current = &value + s.Current = value case float64: f := int64(v) - s.Current = &f + s.Current = f } case "failed": @@ -100,15 +98,10 @@ func (s *IngestTotal) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "Failed", err) } - s.Failed = &value + s.Failed = value case float64: f := int64(v) - s.Failed = &f - } - - case "processors": - if err := dec.Decode(&s.Processors); err != nil { - return fmt.Errorf("%s | %w", "Processors", err) + s.Failed = f } case "time_in_millis": diff --git a/typedapi/types/inlineget.go b/typedapi/types/inlineget.go index ab129eae16..cb94645921 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InlineGet type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L320-L333 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L321-L334 type InlineGet struct { Fields map[string]json.RawMessage `json:"fields,omitempty"` Found bool `json:"found"` diff --git a/typedapi/types/inlinegetdictuserdefined.go b/typedapi/types/inlinegetdictuserdefined.go index 45ba972dad..75a7e82260 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InlineGetDictUserDefined type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L320-L333 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L321-L334 type InlineGetDictUserDefined struct { Fields map[string]json.RawMessage `json:"fields,omitempty"` Found bool `json:"found"` diff --git a/typedapi/types/innerhits.go b/typedapi/types/innerhits.go index 43dd635398..b4e1289bd4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InnerHits type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/hits.ts#L107-L141 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/hits.ts#L108-L142 type InnerHits struct { Collapse *FieldCollapse `json:"collapse,omitempty"` DocvalueFields []FieldAndFormat `json:"docvalue_fields,omitempty"` diff --git a/typedapi/types/innerhitsresult.go b/typedapi/types/innerhitsresult.go index f726ad4bbb..7879ec0f48 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // InnerHitsResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/hits.ts#L85-L87 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/hits.ts#L86-L88 type InnerHitsResult struct { Hits *HitsMetadata `json:"hits,omitempty"` } diff --git a/typedapi/types/inprogress.go b/typedapi/types/inprogress.go index 8860625fd9..09868d505e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // InProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/_types/SnapshotLifecycle.ts#L131-L136 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/_types/SnapshotLifecycle.ts#L131-L136 type InProgress struct { Name string `json:"name"` StartTimeMillis int64 `json:"start_time_millis"` diff --git a/typedapi/types/input.go b/typedapi/types/input.go index b50d58ad13..76a54dea51 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Input type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L56-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L56-L58 type Input struct { FieldNames []string `json:"field_names"` } diff --git a/typedapi/types/integernumberproperty.go b/typedapi/types/integernumberproperty.go index 7a7dda6f80..d6dd040969 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // IntegerNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L157-L160 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L157-L160 type IntegerNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -52,7 +52,6 @@ type IntegerNumberProperty struct { OnScriptError *onscripterror.OnScriptError `json:"on_script_error,omitempty"` Properties map[string]Property `json:"properties,omitempty"` Script *Script `json:"script,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` // TimeSeriesDimension For internal use by Elastic only. Marks the field as a time series dimension. // Defaults to false. @@ -859,18 +858,6 @@ func (s *IntegerNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Script", err) } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -932,7 +919,6 @@ func (s IntegerNumberProperty) MarshalJSON() ([]byte, error) { OnScriptError: s.OnScriptError, Properties: s.Properties, Script: s.Script, - Similarity: s.Similarity, Store: s.Store, TimeSeriesDimension: s.TimeSeriesDimension, TimeSeriesMetric: s.TimeSeriesMetric, diff --git a/typedapi/types/integerrangeproperty.go b/typedapi/types/integerrangeproperty.go index 73f0f25a6d..32ad27c5a8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IntegerRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/range.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/range.ts#L42-L44 type IntegerRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -46,7 +46,6 @@ type IntegerRangeProperty struct { // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -807,18 +806,6 @@ func (s *IntegerRangeProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -857,7 +844,6 @@ func (s IntegerRangeProperty) MarshalJSON() ([]byte, error) { Index: s.Index, Meta: s.Meta, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/intervals.go b/typedapi/types/intervals.go index e3c9b7e3d5..ba435fa441 100644 --- a/typedapi/types/intervals.go +++ b/typedapi/types/intervals.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Intervals type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L83-L110 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L83-L110 type Intervals struct { // AllOf Returns matches that span a combination of other rules. AllOf *IntervalsAllOf `json:"all_of,omitempty"` diff --git a/typedapi/types/intervalsallof.go b/typedapi/types/intervalsallof.go index 63260ce457..000dca1975 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IntervalsAllOf type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L50-L70 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L50-L70 type IntervalsAllOf struct { // Filter Rule used to filter returned intervals. Filter *IntervalsFilter `json:"filter,omitempty"` diff --git a/typedapi/types/intervalsanyof.go b/typedapi/types/intervalsanyof.go index 1eccc234ac..2f5bf648de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IntervalsAnyOf type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L72-L81 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L72-L81 type IntervalsAnyOf struct { // Filter Rule used to filter returned intervals. Filter *IntervalsFilter `json:"filter,omitempty"` diff --git a/typedapi/types/intervalsfilter.go b/typedapi/types/intervalsfilter.go index 9e34fb65d8..ef0f1f767f 100644 --- a/typedapi/types/intervalsfilter.go +++ b/typedapi/types/intervalsfilter.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IntervalsFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L112-L152 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L112-L152 type IntervalsFilter struct { // After Query used to return intervals that follow an interval from the `filter` // rule. diff --git a/typedapi/types/intervalsfuzzy.go b/typedapi/types/intervalsfuzzy.go index 9fb94ecc5f..2f7934e756 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IntervalsFuzzy type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L154-L184 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L154-L184 type IntervalsFuzzy struct { // Analyzer Analyzer used to normalize the term. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/intervalsmatch.go b/typedapi/types/intervalsmatch.go index 7cd9022802..b238b5d616 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IntervalsMatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L186-L216 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L186-L216 type IntervalsMatch struct { // Analyzer Analyzer used to analyze terms in the query. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/intervalsprefix.go b/typedapi/types/intervalsprefix.go index a4bb5c69c6..ea0344c6dc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IntervalsPrefix type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L218-L233 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L218-L233 type IntervalsPrefix struct { // Analyzer Analyzer used to analyze the `prefix`. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/intervalsquery.go b/typedapi/types/intervalsquery.go index 774ba298b7..5c259df906 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IntervalsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L235-L263 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L235-L266 type IntervalsQuery struct { // AllOf Returns matches that span a combination of other rules. AllOf *IntervalsAllOf `json:"all_of,omitempty"` diff --git a/typedapi/types/intervalswildcard.go b/typedapi/types/intervalswildcard.go index d3b8a09c19..b7e5141917 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IntervalsWildcard type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L265-L280 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L268-L283 type IntervalsWildcard struct { // Analyzer Analyzer used to analyze the `pattern`. // Defaults to the top-level field's analyzer. diff --git a/typedapi/types/invertedindex.go b/typedapi/types/invertedindex.go index f64bd854ab..fbcf56ed9b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // InvertedIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L68-L76 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L68-L76 type InvertedIndex struct { Offsets uint `json:"offsets"` Payloads uint `json:"payloads"` diff --git a/typedapi/types/invocation.go b/typedapi/types/invocation.go index 2fbd299487..a604f86f87 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Invocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/_types/SnapshotLifecycle.ts#L138-L141 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/_types/SnapshotLifecycle.ts#L138-L141 type Invocation struct { SnapshotName string `json:"snapshot_name"` Time DateTime `json:"time"` diff --git a/typedapi/types/invocations.go b/typedapi/types/invocations.go index 1880af6979..8f4d012290 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Invocations type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L44-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L42-L44 type Invocations struct { Total int64 `json:"total"` } diff --git a/typedapi/types/iostatdevice.go b/typedapi/types/iostatdevice.go index 1a156fbcc2..47dc01d3b0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IoStatDevice type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L730-L755 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L801-L826 type IoStatDevice struct { // DeviceName The Linux device name. DeviceName *string `json:"device_name,omitempty"` diff --git a/typedapi/types/iostats.go b/typedapi/types/iostats.go index 5f92faa6e4..92183ec369 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // IoStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L718-L728 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L789-L799 type IoStats struct { // Devices Array of disk metrics for each device that is backing an Elasticsearch data // path. diff --git a/typedapi/types/ipfilter.go b/typedapi/types/ipfilter.go index c2aa889385..674a5895a8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IpFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L167-L170 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L165-L168 type IpFilter struct { Http bool `json:"http"` Transport bool `json:"transport"` diff --git a/typedapi/types/iplocationprocessor.go b/typedapi/types/iplocationprocessor.go new file mode 100644 index 0000000000..c8c35be7d5 --- /dev/null +++ b/typedapi/types/iplocationprocessor.go @@ -0,0 +1,222 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// IpLocationProcessor type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L478-L512 +type IpLocationProcessor struct { + // DatabaseFile The database filename referring to a database the module ships with + // (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom + // database in the ingest-geoip config directory. + DatabaseFile *string `json:"database_file,omitempty"` + // Description Description of the processor. + // Useful for describing the purpose of the processor or its configuration. + Description *string `json:"description,omitempty"` + // DownloadDatabaseOnPipelineCreation If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the + // missing database is downloaded when the pipeline is created. + // Else, the download is triggered by when the pipeline is used as the + // `default_pipeline` or `final_pipeline` in an index. + DownloadDatabaseOnPipelineCreation *bool `json:"download_database_on_pipeline_creation,omitempty"` + // Field The field to get the ip address from for the geographical lookup. + Field string `json:"field"` + // FirstOnly If `true`, only the first found IP location data will be returned, even if + // the field contains an array. + FirstOnly *bool `json:"first_only,omitempty"` + // If Conditionally execute the processor. + If *string `json:"if,omitempty"` + // IgnoreFailure Ignore failures for the processor. + IgnoreFailure *bool `json:"ignore_failure,omitempty"` + // IgnoreMissing If `true` and `field` does not exist, the processor quietly exits without + // modifying the document. + IgnoreMissing *bool `json:"ignore_missing,omitempty"` + // OnFailure Handle failures for the processor. + OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // Properties Controls what properties are added to the `target_field` based on the IP + // location lookup. + Properties []string `json:"properties,omitempty"` + // Tag Identifier for the processor. + // Useful for debugging and metrics. + Tag *string `json:"tag,omitempty"` + // TargetField The field that will hold the geographical information looked up from the + // MaxMind database. + TargetField *string `json:"target_field,omitempty"` +} + +func (s *IpLocationProcessor) 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 "database_file": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "DatabaseFile", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.DatabaseFile = &o + + case "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + case "download_database_on_pipeline_creation": + 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", "DownloadDatabaseOnPipelineCreation", err) + } + s.DownloadDatabaseOnPipelineCreation = &value + case bool: + s.DownloadDatabaseOnPipelineCreation = &v + } + + case "field": + if err := dec.Decode(&s.Field); err != nil { + return fmt.Errorf("%s | %w", "Field", err) + } + + case "first_only": + 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", "FirstOnly", err) + } + s.FirstOnly = &value + case bool: + s.FirstOnly = &v + } + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "ignore_failure": + 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", "IgnoreFailure", err) + } + s.IgnoreFailure = &value + case bool: + s.IgnoreFailure = &v + } + + case "ignore_missing": + 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", "IgnoreMissing", err) + } + s.IgnoreMissing = &value + case bool: + s.IgnoreMissing = &v + } + + case "on_failure": + if err := dec.Decode(&s.OnFailure); err != nil { + return fmt.Errorf("%s | %w", "OnFailure", err) + } + + case "properties": + if err := dec.Decode(&s.Properties); err != nil { + return fmt.Errorf("%s | %w", "Properties", err) + } + + case "tag": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Tag", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Tag = &o + + case "target_field": + if err := dec.Decode(&s.TargetField); err != nil { + return fmt.Errorf("%s | %w", "TargetField", err) + } + + } + } + return nil +} + +// NewIpLocationProcessor returns a IpLocationProcessor. +func NewIpLocationProcessor() *IpLocationProcessor { + r := &IpLocationProcessor{} + + return r +} diff --git a/typedapi/types/ipprefixaggregate.go b/typedapi/types/ipprefixaggregate.go index 4f3d89e2a1..029d3c5506 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // IpPrefixAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L633-L634 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L709-L713 type IpPrefixAggregate struct { Buckets BucketsIpPrefixBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/ipprefixaggregation.go b/typedapi/types/ipprefixaggregation.go index 7e8b8e6b29..a55ff7113d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IpPrefixAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L1122-L1151 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L1195-L1224 type IpPrefixAggregation struct { // AppendPrefixLength Defines whether the prefix length is appended to IP address keys in the // response. diff --git a/typedapi/types/ipprefixbucket.go b/typedapi/types/ipprefixbucket.go index 46b3dea94b..eb9885fe4a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // IpPrefixBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L636-L641 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L715-L720 type IpPrefixBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -543,6 +543,13 @@ func (s *IpPrefixBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/ipproperty.go b/typedapi/types/ipproperty.go index 8544148c14..9ac2f10801 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // IpProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/specialized.ts#L65-L79 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/specialized.ts#L65-L79 type IpProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -50,7 +50,6 @@ type IpProperty struct { OnScriptError *onscripterror.OnScriptError `json:"on_script_error,omitempty"` Properties map[string]Property `json:"properties,omitempty"` Script *Script `json:"script,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` // TimeSeriesDimension For internal use by Elastic only. Marks the field as a time series dimension. // Defaults to false. @@ -836,18 +835,6 @@ func (s *IpProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Script", err) } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -903,7 +890,6 @@ func (s IpProperty) MarshalJSON() ([]byte, error) { OnScriptError: s.OnScriptError, Properties: s.Properties, Script: s.Script, - Similarity: s.Similarity, Store: s.Store, TimeSeriesDimension: s.TimeSeriesDimension, Type: s.Type, diff --git a/typedapi/types/iprangeaggregate.go b/typedapi/types/iprangeaggregate.go index 885db62457..937acc3c40 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // IpRangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L560-L562 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L624-L629 type IpRangeAggregate struct { Buckets BucketsIpRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/iprangeaggregation.go b/typedapi/types/iprangeaggregation.go index 00ae6914ce..3e1291d531 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // IpRangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L550-L559 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/iprangeaggregationrange.go b/typedapi/types/iprangeaggregationrange.go index a7e269b4cf..8fd0a037e5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // IpRangeAggregationRange type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L561-L574 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L578-L591 type IpRangeAggregationRange struct { // From Start of the range. From *string `json:"from,omitempty"` diff --git a/typedapi/types/iprangebucket.go b/typedapi/types/iprangebucket.go index bb786ecb69..d6d7cc08a8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // IpRangeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L564-L568 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L631-L635 type IpRangeBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -524,6 +524,13 @@ func (s *IpRangeBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/iprangeproperty.go b/typedapi/types/iprangeproperty.go index fb2021e6aa..2410d444ba 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // IpRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/range.ts#L46-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/range.ts#L46-L48 type IpRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -46,7 +46,6 @@ type IpRangeProperty struct { // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -807,18 +806,6 @@ func (s *IpRangeProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -857,7 +844,6 @@ func (s IpRangeProperty) MarshalJSON() ([]byte, error) { Index: s.Index, Meta: s.Meta, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/irishanalyzer.go b/typedapi/types/irishanalyzer.go new file mode 100644 index 0000000000..dce0bee750 --- /dev/null +++ b/typedapi/types/irishanalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// IrishAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L209-L214 +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"` +} + +func (s *IrishAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 IrishAnalyzer) MarshalJSON() ([]byte, error) { + type innerIrishAnalyzer IrishAnalyzer + tmp := innerIrishAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "irish" + + return json.Marshal(tmp) +} + +// NewIrishAnalyzer returns a IrishAnalyzer. +func NewIrishAnalyzer() *IrishAnalyzer { + r := &IrishAnalyzer{} + + return r +} diff --git a/typedapi/types/italiananalyzer.go b/typedapi/types/italiananalyzer.go new file mode 100644 index 0000000000..ef96511dc5 --- /dev/null +++ b/typedapi/types/italiananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ItalianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L216-L221 +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"` +} + +func (s *ItalianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 ItalianAnalyzer) MarshalJSON() ([]byte, error) { + type innerItalianAnalyzer ItalianAnalyzer + tmp := innerItalianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "italian" + + return json.Marshal(tmp) +} + +// NewItalianAnalyzer returns a ItalianAnalyzer. +func NewItalianAnalyzer() *ItalianAnalyzer { + r := &ItalianAnalyzer{} + + return r +} diff --git a/typedapi/types/job.go b/typedapi/types/job.go index 813784caef..ba59a34577 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Job type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Job.ts#L61-L180 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/jobblocked.go b/typedapi/types/jobblocked.go index 1718ef5745..8bd9ff08de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // JobBlocked type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Job.ts#L392-L395 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Job.ts#L392-L395 type JobBlocked struct { Reason jobblockedreason.JobBlockedReason `json:"reason"` TaskId TaskId `json:"task_id,omitempty"` diff --git a/typedapi/types/jobconfig.go b/typedapi/types/jobconfig.go index ac50faa589..25abb6bcd3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // JobConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Job.ts#L182-L283 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/jobforecaststatistics.go b/typedapi/types/jobforecaststatistics.go index 440a536363..85e2f30110 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // JobForecastStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Job.ts#L343-L350 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Job.ts#L343-L350 type JobForecastStatistics struct { ForecastedJobs int `json:"forecasted_jobs"` MemoryBytes *JobStatistics `json:"memory_bytes,omitempty"` diff --git a/typedapi/types/jobsrecord.go b/typedapi/types/jobsrecord.go index 0ed7051d59..ad57df6396 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // JobsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/ml_jobs/types.ts#L24-L347 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/jobstatistics.go b/typedapi/types/jobstatistics.go index 2c16a09ec4..91d9e1f7f7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // JobStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Job.ts#L54-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Job.ts#L54-L59 type JobStatistics struct { Avg Float64 `json:"avg"` Max Float64 `json:"max"` diff --git a/typedapi/types/jobstats.go b/typedapi/types/jobstats.go index 0b4b1d8796..9f0dd15005 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // JobStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Job.ts#L284-L330 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. @@ -57,7 +57,7 @@ type JobStats struct { ModelSizeStats ModelSizeStats `json:"model_size_stats"` // Node Contains properties for the node that runs the job. // This information is available only for open jobs. - Node *DiscoveryNode `json:"node,omitempty"` + Node *DiscoveryNodeCompact `json:"node,omitempty"` // OpenTime For open jobs only, the elapsed time for which the job has been open. OpenTime DateTime `json:"open_time,omitempty"` // State The status of the anomaly detection job, which can be one of the following diff --git a/typedapi/types/jobtimingstats.go b/typedapi/types/jobtimingstats.go index dce5c311df..4f5cb22e9f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // JobTimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Job.ts#L332-L341 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Job.ts#L332-L341 type JobTimingStats struct { AverageBucketProcessingTimeMs Float64 `json:"average_bucket_processing_time_ms,omitempty"` BucketCount int64 `json:"bucket_count"` diff --git a/typedapi/types/jobusage.go b/typedapi/types/jobusage.go index deb4b78362..5c5886baad 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // JobUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L364-L370 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L362-L368 type JobUsage struct { Count int `json:"count"` CreatedBy map[string]int64 `json:"created_by"` diff --git a/typedapi/types/joinprocessor.go b/typedapi/types/joinprocessor.go index 514a62868f..49ab65b245 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // JoinProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L801-L816 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1103-L1118 type JoinProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/joinproperty.go b/typedapi/types/joinproperty.go index b95fd94293..881929a810 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // JoinProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L89-L93 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L88-L92 type JoinProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` EagerGlobalOrdinals *bool `json:"eager_global_ordinals,omitempty"` diff --git a/typedapi/types/jsonprocessor.go b/typedapi/types/jsonprocessor.go index a8f11b2ba0..d8216ecc50 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // JsonProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L818-L847 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1120-L1149 type JsonProcessor struct { // AddToRoot Flag that forces the parsed JSON to be added at the top level of the // document. diff --git a/typedapi/types/jvm.go b/typedapi/types/jvm.go index 7274014443..627b33f9f7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Jvm type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L811-L845 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L882-L916 type Jvm struct { // BufferPools Contains statistics about JVM buffer pools for the node. BufferPools map[string]NodeBufferPool `json:"buffer_pools,omitempty"` diff --git a/typedapi/types/jvmclasses.go b/typedapi/types/jvmclasses.go index 7eb689949b..88e94cf6de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // JvmClasses type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L908-L921 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L979-L992 type JvmClasses struct { // CurrentLoadedCount Number of classes currently loaded by JVM. CurrentLoadedCount *int64 `json:"current_loaded_count,omitempty"` diff --git a/typedapi/types/jvmmemorystats.go b/typedapi/types/jvmmemorystats.go index 3b1706da93..f7d5081076 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // JvmMemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L847-L876 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L918-L947 type JvmMemoryStats struct { // HeapCommittedInBytes Amount of memory, in bytes, available for use by the heap. HeapCommittedInBytes *int64 `json:"heap_committed_in_bytes,omitempty"` diff --git a/typedapi/types/jvmstats.go b/typedapi/types/jvmstats.go index 78f52ac0ce..5231742261 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // JvmStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_memory_stats/types.ts#L50-L63 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/jvmthreads.go b/typedapi/types/jvmthreads.go index b90f1a2f7b..324abcf9cd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // JvmThreads type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L897-L906 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L968-L977 type JvmThreads struct { // Count Number of active threads in use by JVM. Count *int64 `json:"count,omitempty"` diff --git a/typedapi/types/keeptypestokenfilter.go b/typedapi/types/keeptypestokenfilter.go index 7ce38dfc13..1933064aac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // KeepTypesTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L220-L224 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L219-L223 type KeepTypesTokenFilter struct { Mode *keeptypesmode.KeepTypesMode `json:"mode,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/keepwordstokenfilter.go b/typedapi/types/keepwordstokenfilter.go index 9054ac6ea9..8ecb32abd6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // KeepWordsTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L226-L231 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L225-L230 type KeepWordsTokenFilter struct { KeepWords []string `json:"keep_words,omitempty"` KeepWordsCase *bool `json:"keep_words_case,omitempty"` diff --git a/typedapi/types/keyedpercentiles.go b/typedapi/types/keyedpercentiles.go index d51ce8b0c3..09d32d421f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // KeyedPercentiles type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L158-L158 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1a64ac9fea..74247f7e53 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // KeyedProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L379-L382 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L415-L418 type KeyedProcessor struct { Stats *Processor `json:"stats,omitempty"` Type *string `json:"type,omitempty"` diff --git a/typedapi/types/keyvalueprocessor.go b/typedapi/types/keyvalueprocessor.go index 6c42e75242..2e914dd5b2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // KeyValueProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L856-L908 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1158-L1210 type KeyValueProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/keywordanalyzer.go b/typedapi/types/keywordanalyzer.go index 6b8c921659..205f2d2421 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // KeywordAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L47-L50 type KeywordAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/keywordmarkertokenfilter.go b/typedapi/types/keywordmarkertokenfilter.go index 98d40d6e96..660987b0ea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // KeywordMarkerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L233-L239 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L232-L238 type KeywordMarkerTokenFilter struct { IgnoreCase *bool `json:"ignore_case,omitempty"` Keywords []string `json:"keywords,omitempty"` @@ -71,8 +71,19 @@ func (s *KeywordMarkerTokenFilter) UnmarshalJSON(data []byte) error { } case "keywords": - if err := dec.Decode(&s.Keywords); err != nil { - return fmt.Errorf("%s | %w", "Keywords", 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", "Keywords", err) + } + + s.Keywords = append(s.Keywords, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Keywords); err != nil { + return fmt.Errorf("%s | %w", "Keywords", err) + } } case "keywords_path": diff --git a/typedapi/types/keywordproperty.go b/typedapi/types/keywordproperty.go index 646b56d173..57fc596bd9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // KeywordProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L95-L113 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L94-L113 type KeywordProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` diff --git a/typedapi/types/keywordtokenizer.go b/typedapi/types/keywordtokenizer.go index e0bcdb1918..d379494cea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,9 +31,9 @@ import ( // KeywordTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L62-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L68-L74 type KeywordTokenizer struct { - BufferSize int `json:"buffer_size"` + BufferSize *int `json:"buffer_size,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` } @@ -63,10 +63,10 @@ func (s *KeywordTokenizer) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "BufferSize", err) } - s.BufferSize = value + s.BufferSize = &value case float64: f := int(v) - s.BufferSize = f + s.BufferSize = &f } case "type": diff --git a/typedapi/types/kibanatoken.go b/typedapi/types/kibanatoken.go index 63092bd4f2..a24a2ce478 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // KibanaToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/enroll_kibana/Response.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/enroll_kibana/Response.ts#L27-L30 type KibanaToken struct { Name string `json:"name"` Value string `json:"value"` diff --git a/typedapi/types/knncollectorresult.go b/typedapi/types/knncollectorresult.go new file mode 100644 index 0000000000..19d2577e57 --- /dev/null +++ b/typedapi/types/knncollectorresult.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// KnnCollectorResult type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L222-L228 +type KnnCollectorResult struct { + Children []KnnCollectorResult `json:"children,omitempty"` + Name string `json:"name"` + Reason string `json:"reason"` + Time Duration `json:"time,omitempty"` + TimeInNanos int64 `json:"time_in_nanos"` +} + +func (s *KnnCollectorResult) 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 "children": + if err := dec.Decode(&s.Children); err != nil { + return fmt.Errorf("%s | %w", "Children", 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 "reason": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Reason", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Reason = o + + case "time": + if err := dec.Decode(&s.Time); err != nil { + return fmt.Errorf("%s | %w", "Time", err) + } + + case "time_in_nanos": + if err := dec.Decode(&s.TimeInNanos); err != nil { + return fmt.Errorf("%s | %w", "TimeInNanos", err) + } + + } + } + return nil +} + +// NewKnnCollectorResult returns a KnnCollectorResult. +func NewKnnCollectorResult() *KnnCollectorResult { + r := &KnnCollectorResult{} + + return r +} diff --git a/typedapi/types/knnquery.go b/typedapi/types/knnquery.go index 58834881a1..33344076af 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // KnnQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Knn.ts#L54-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Knn.ts#L54-L72 type KnnQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -43,6 +43,8 @@ type KnnQuery struct { Field string `json:"field"` // Filter Filters for the kNN search query Filter []Query `json:"filter,omitempty"` + // K The final number of nearest neighbors to return as top hits + K *int `json:"k,omitempty"` // NumCandidates The number of nearest neighbor candidates to consider per shard NumCandidates *int `json:"num_candidates,omitempty"` QueryName_ *string `json:"_name,omitempty"` @@ -107,6 +109,22 @@ func (s *KnnQuery) UnmarshalJSON(data []byte) error { } } + case "k": + + 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", "K", err) + } + s.K = &value + case float64: + f := int(v) + s.K = &f + } + case "num_candidates": var tmp any diff --git a/typedapi/types/knnqueryprofilebreakdown.go b/typedapi/types/knnqueryprofilebreakdown.go new file mode 100644 index 0000000000..39b78cbdba --- /dev/null +++ b/typedapi/types/knnqueryprofilebreakdown.go @@ -0,0 +1,383 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// KnnQueryProfileBreakdown type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L199-L220 +type KnnQueryProfileBreakdown struct { + Advance int64 `json:"advance"` + AdvanceCount int64 `json:"advance_count"` + BuildScorer int64 `json:"build_scorer"` + BuildScorerCount int64 `json:"build_scorer_count"` + ComputeMaxScore int64 `json:"compute_max_score"` + ComputeMaxScoreCount int64 `json:"compute_max_score_count"` + CountWeight int64 `json:"count_weight"` + CountWeightCount int64 `json:"count_weight_count"` + CreateWeight int64 `json:"create_weight"` + CreateWeightCount int64 `json:"create_weight_count"` + Match int64 `json:"match"` + MatchCount int64 `json:"match_count"` + NextDoc int64 `json:"next_doc"` + NextDocCount int64 `json:"next_doc_count"` + Score int64 `json:"score"` + ScoreCount int64 `json:"score_count"` + SetMinCompetitiveScore int64 `json:"set_min_competitive_score"` + SetMinCompetitiveScoreCount int64 `json:"set_min_competitive_score_count"` + ShallowAdvance int64 `json:"shallow_advance"` + ShallowAdvanceCount int64 `json:"shallow_advance_count"` +} + +func (s *KnnQueryProfileBreakdown) 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 "advance": + 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", "Advance", err) + } + s.Advance = value + case float64: + f := int64(v) + s.Advance = f + } + + case "advance_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", "AdvanceCount", err) + } + s.AdvanceCount = value + case float64: + f := int64(v) + s.AdvanceCount = f + } + + case "build_scorer": + 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", "BuildScorer", err) + } + s.BuildScorer = value + case float64: + f := int64(v) + s.BuildScorer = f + } + + case "build_scorer_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", "BuildScorerCount", err) + } + s.BuildScorerCount = value + case float64: + f := int64(v) + s.BuildScorerCount = f + } + + case "compute_max_score": + 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", "ComputeMaxScore", err) + } + s.ComputeMaxScore = value + case float64: + f := int64(v) + s.ComputeMaxScore = f + } + + case "compute_max_score_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", "ComputeMaxScoreCount", err) + } + s.ComputeMaxScoreCount = value + case float64: + f := int64(v) + s.ComputeMaxScoreCount = f + } + + case "count_weight": + 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", "CountWeight", err) + } + s.CountWeight = value + case float64: + f := int64(v) + s.CountWeight = f + } + + case "count_weight_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", "CountWeightCount", err) + } + s.CountWeightCount = value + case float64: + f := int64(v) + s.CountWeightCount = f + } + + case "create_weight": + 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", "CreateWeight", err) + } + s.CreateWeight = value + case float64: + f := int64(v) + s.CreateWeight = f + } + + case "create_weight_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", "CreateWeightCount", err) + } + s.CreateWeightCount = value + case float64: + f := int64(v) + s.CreateWeightCount = f + } + + case "match": + 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", "Match", err) + } + s.Match = value + case float64: + f := int64(v) + s.Match = f + } + + case "match_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", "MatchCount", err) + } + s.MatchCount = value + case float64: + f := int64(v) + s.MatchCount = f + } + + case "next_doc": + 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", "NextDoc", err) + } + s.NextDoc = value + case float64: + f := int64(v) + s.NextDoc = f + } + + case "next_doc_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", "NextDocCount", err) + } + s.NextDocCount = value + case float64: + f := int64(v) + s.NextDocCount = f + } + + case "score": + 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", "Score", err) + } + s.Score = value + case float64: + f := int64(v) + s.Score = f + } + + case "score_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", "ScoreCount", err) + } + s.ScoreCount = value + case float64: + f := int64(v) + s.ScoreCount = f + } + + case "set_min_competitive_score": + 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", "SetMinCompetitiveScore", err) + } + s.SetMinCompetitiveScore = value + case float64: + f := int64(v) + s.SetMinCompetitiveScore = f + } + + case "set_min_competitive_score_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", "SetMinCompetitiveScoreCount", err) + } + s.SetMinCompetitiveScoreCount = value + case float64: + f := int64(v) + s.SetMinCompetitiveScoreCount = f + } + + case "shallow_advance": + 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", "ShallowAdvance", err) + } + s.ShallowAdvance = value + case float64: + f := int64(v) + s.ShallowAdvance = f + } + + case "shallow_advance_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", "ShallowAdvanceCount", err) + } + s.ShallowAdvanceCount = value + case float64: + f := int64(v) + s.ShallowAdvanceCount = f + } + + } + } + return nil +} + +// NewKnnQueryProfileBreakdown returns a KnnQueryProfileBreakdown. +func NewKnnQueryProfileBreakdown() *KnnQueryProfileBreakdown { + r := &KnnQueryProfileBreakdown{} + + return r +} diff --git a/typedapi/types/knnqueryprofileresult.go b/typedapi/types/knnqueryprofileresult.go new file mode 100644 index 0000000000..6ce5397e0b --- /dev/null +++ b/typedapi/types/knnqueryprofileresult.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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// KnnQueryProfileResult type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L188-L196 +type KnnQueryProfileResult struct { + Breakdown KnnQueryProfileBreakdown `json:"breakdown"` + Children []KnnQueryProfileResult `json:"children,omitempty"` + Debug map[string]json.RawMessage `json:"debug,omitempty"` + Description string `json:"description"` + Time Duration `json:"time,omitempty"` + TimeInNanos int64 `json:"time_in_nanos"` + Type string `json:"type"` +} + +func (s *KnnQueryProfileResult) 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 "breakdown": + if err := dec.Decode(&s.Breakdown); err != nil { + return fmt.Errorf("%s | %w", "Breakdown", err) + } + + case "children": + if err := dec.Decode(&s.Children); err != nil { + return fmt.Errorf("%s | %w", "Children", err) + } + + case "debug": + if s.Debug == nil { + s.Debug = make(map[string]json.RawMessage, 0) + } + if err := dec.Decode(&s.Debug); err != nil { + return fmt.Errorf("%s | %w", "Debug", err) + } + + case "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = o + + case "time": + if err := dec.Decode(&s.Time); err != nil { + return fmt.Errorf("%s | %w", "Time", err) + } + + case "time_in_nanos": + if err := dec.Decode(&s.TimeInNanos); err != nil { + return fmt.Errorf("%s | %w", "TimeInNanos", 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 +} + +// NewKnnQueryProfileResult returns a KnnQueryProfileResult. +func NewKnnQueryProfileResult() *KnnQueryProfileResult { + r := &KnnQueryProfileResult{ + Debug: make(map[string]json.RawMessage, 0), + } + + return r +} diff --git a/typedapi/types/knnretriever.go b/typedapi/types/knnretriever.go index 3aee19cee0..df3e177eb5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // KnnRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Retriever.ts#L58-L71 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Retriever.ts#L64-L77 type KnnRetriever struct { // Field The name of the vector field to search against. Field string `json:"field"` @@ -39,6 +39,9 @@ type KnnRetriever struct { Filter []Query `json:"filter,omitempty"` // K Number of nearest neighbors to return as top hits. K int `json:"k"` + // MinScore Minimum _score for matching documents. Documents with a lower _score are not + // included in the top documents. + MinScore *float32 `json:"min_score,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 @@ -110,6 +113,22 @@ func (s *KnnRetriever) UnmarshalJSON(data []byte) error { s.K = f } + 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 "num_candidates": var tmp any diff --git a/typedapi/types/knnsearch.go b/typedapi/types/knnsearch.go index ca95abbd80..8bff288ea0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // KnnSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Knn.ts#L30-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Knn.ts#L30-L52 type KnnSearch struct { // Boost Boost value to apply to kNN scores Boost *float32 `json:"boost,omitempty"` diff --git a/typedapi/types/kstemtokenfilter.go b/typedapi/types/kstemtokenfilter.go index 7a9f1b12b7..94539a51d5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // KStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L241-L243 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L240-L242 type KStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/kuromojianalyzer.go b/typedapi/types/kuromojianalyzer.go index 1160c1b903..b6a6c673a4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // KuromojiAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/kuromoji-plugin.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/kuromoji-plugin.ts#L25-L29 type KuromojiAnalyzer struct { Mode kuromojitokenizationmode.KuromojiTokenizationMode `json:"mode"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/kuromojiiterationmarkcharfilter.go b/typedapi/types/kuromojiiterationmarkcharfilter.go index 87a3dd4c28..c40f281319 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // KuromojiIterationMarkCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/kuromoji-plugin.ts#L31-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/kuromoji-plugin.ts#L31-L35 type KuromojiIterationMarkCharFilter struct { NormalizeKana bool `json:"normalize_kana"` NormalizeKanji bool `json:"normalize_kanji"` diff --git a/typedapi/types/kuromojipartofspeechtokenfilter.go b/typedapi/types/kuromojipartofspeechtokenfilter.go index c644722871..08f33da328 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // KuromojiPartOfSpeechTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/kuromoji-plugin.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/kuromoji-plugin.ts#L37-L40 type KuromojiPartOfSpeechTokenFilter struct { Stoptags []string `json:"stoptags"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/kuromojireadingformtokenfilter.go b/typedapi/types/kuromojireadingformtokenfilter.go index 2000032327..3782ee6ebc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // KuromojiReadingFormTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/kuromoji-plugin.ts#L42-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/kuromoji-plugin.ts#L42-L45 type KuromojiReadingFormTokenFilter struct { Type string `json:"type,omitempty"` UseRomaji bool `json:"use_romaji"` diff --git a/typedapi/types/kuromojistemmertokenfilter.go b/typedapi/types/kuromojistemmertokenfilter.go index 5ad983fd80..1f5c900ab5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // KuromojiStemmerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/kuromoji-plugin.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/kuromoji-plugin.ts#L47-L50 type KuromojiStemmerTokenFilter struct { MinimumLength int `json:"minimum_length"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/kuromojitokenizer.go b/typedapi/types/kuromojitokenizer.go index 9a3f149b84..dff31cd304 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // KuromojiTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/kuromoji-plugin.ts#L58-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/kuromoji-plugin.ts#L58-L67 type KuromojiTokenizer struct { DiscardCompoundToken *bool `json:"discard_compound_token,omitempty"` DiscardPunctuation *bool `json:"discard_punctuation,omitempty"` diff --git a/typedapi/types/languageanalyzer.go b/typedapi/types/languageanalyzer.go index 4ece5260af..52dc669c3f 100644 --- a/typedapi/types/languageanalyzer.go +++ b/typedapi/types/languageanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // LanguageAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L52-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L52-L59 type LanguageAnalyzer struct { Language language.Language `json:"language"` StemExclusion []string `json:"stem_exclusion"` diff --git a/typedapi/types/languagecontext.go b/typedapi/types/languagecontext.go index ee4dfebdee..0f6c51fcb9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // LanguageContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/get_script_languages/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/get_script_languages/types.ts#L22-L25 type LanguageContext struct { Contexts []string `json:"contexts"` Language scriptlanguage.ScriptLanguage `json:"language"` diff --git a/typedapi/types/laplacesmoothingmodel.go b/typedapi/types/laplacesmoothingmodel.go index fc711fe1bd..5f1d19e33b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LaplaceSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L430-L435 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L430-L435 type LaplaceSmoothingModel struct { // Alpha A constant that is added to all counts to balance weights. Alpha Float64 `json:"alpha"` diff --git a/typedapi/types/latest.go b/typedapi/types/latest.go index afb6c57328..9e00e40ed3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Latest type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/_types/Transform.ts#L47-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/latlongeolocation.go b/typedapi/types/latlongeolocation.go index 8d14b01086..6eb9685413 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LatLonGeoLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L120-L129 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Geo.ts#L120-L129 type LatLonGeoLocation struct { // Lat Latitude Lat Float64 `json:"lat"` diff --git a/typedapi/types/latviananalyzer.go b/typedapi/types/latviananalyzer.go new file mode 100644 index 0000000000..3226b9f6d4 --- /dev/null +++ b/typedapi/types/latviananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// LatvianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L223-L228 +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"` +} + +func (s *LatvianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 LatvianAnalyzer) MarshalJSON() ([]byte, error) { + type innerLatvianAnalyzer LatvianAnalyzer + tmp := innerLatvianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "latvian" + + return json.Marshal(tmp) +} + +// NewLatvianAnalyzer returns a LatvianAnalyzer. +func NewLatvianAnalyzer() *LatvianAnalyzer { + r := &LatvianAnalyzer{} + + return r +} diff --git a/typedapi/types/learningtorank.go b/typedapi/types/learningtorank.go index 7a124bd193..95559d5d16 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LearningToRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/rescoring.ts#L88-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/lengthtokenfilter.go b/typedapi/types/lengthtokenfilter.go index 7fc02d4887..b126a65b9f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LengthTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L245-L249 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L244-L248 type LengthTokenFilter struct { Max *int `json:"max,omitempty"` Min *int `json:"min,omitempty"` diff --git a/typedapi/types/lessthanvalidation.go b/typedapi/types/lessthanvalidation.go index f35ee6542a..1abc416e5f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LessThanValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L58-L61 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L58-L61 type LessThanValidation struct { Constraint Float64 `json:"constraint"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/lettertokenizer.go b/typedapi/types/lettertokenizer.go index 5a23bababb..72710b55d2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // LetterTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L67-L69 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L76-L78 type LetterTokenizer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/license.go b/typedapi/types/license.go index be3ffc01fd..88ee3df575 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // License type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/_types/License.ts#L42-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/license/_types/License.ts#L42-L53 type License struct { ExpiryDateInMillis int64 `json:"expiry_date_in_millis"` IssueDateInMillis int64 `json:"issue_date_in_millis"` diff --git a/typedapi/types/licenseinformation.go b/typedapi/types/licenseinformation.go index f60599540f..064517a04a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // LicenseInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/license/get/types.ts#L25-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/license/get/types.ts#L25-L38 type LicenseInformation struct { ExpiryDate DateTime `json:"expiry_date,omitempty"` ExpiryDateInMillis *int64 `json:"expiry_date_in_millis,omitempty"` diff --git a/typedapi/types/lifecycle.go b/typedapi/types/lifecycle.go index 5d052bdb4f..d233752a09 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Lifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/get_lifecycle/types.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/get_lifecycle/types.ts#L24-L28 type Lifecycle struct { ModifiedDate DateTime `json:"modified_date"` Policy IlmPolicy `json:"policy"` diff --git a/typedapi/types/lifecycleexplain.go b/typedapi/types/lifecycleexplain.go index 77f4104575..8f3e5a2729 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // LifecycleExplainManaged // LifecycleExplainUnmanaged // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/explain_lifecycle/types.ts#L59-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/explain_lifecycle/types.ts#L59-L62 type LifecycleExplain any diff --git a/typedapi/types/lifecycleexplainmanaged.go b/typedapi/types/lifecycleexplainmanaged.go index 54a1ae6386..2e9ff678a3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LifecycleExplainManaged type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/explain_lifecycle/types.ts#L26-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/explain_lifecycle/types.ts#L26-L52 type LifecycleExplainManaged struct { Action *string `json:"action,omitempty"` ActionTime DateTime `json:"action_time,omitempty"` diff --git a/typedapi/types/lifecycleexplainphaseexecution.go b/typedapi/types/lifecycleexplainphaseexecution.go index 979d8e9f58..62bb569316 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // LifecycleExplainPhaseExecution type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/explain_lifecycle/types.ts#L64-L68 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/explain_lifecycle/types.ts#L64-L68 type LifecycleExplainPhaseExecution struct { ModifiedDateInMillis int64 `json:"modified_date_in_millis"` Policy string `json:"policy"` diff --git a/typedapi/types/lifecycleexplainunmanaged.go b/typedapi/types/lifecycleexplainunmanaged.go index e13392e8e5..7f5f931522 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // LifecycleExplainUnmanaged type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/explain_lifecycle/types.ts#L54-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/explain_lifecycle/types.ts#L54-L57 type LifecycleExplainUnmanaged struct { Index string `json:"index"` Managed bool `json:"managed,omitempty"` diff --git a/typedapi/types/like.go b/typedapi/types/like.go index 91732d6341..54c431eb66 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // LikeDocument // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L195-L200 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L198-L203 type Like any diff --git a/typedapi/types/likedocument.go b/typedapi/types/likedocument.go index 9c3a89a124..524740573b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // LikeDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L171-L193 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/limits.go b/typedapi/types/limits.go index d96503bc49..6bff20a6d1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,11 +31,13 @@ import ( // Limits type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/info/types.ts#L34-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/info/types.ts#L34-L40 type Limits struct { - EffectiveMaxModelMemoryLimit string `json:"effective_max_model_memory_limit"` - MaxModelMemoryLimit *string `json:"max_model_memory_limit,omitempty"` - TotalMlMemory string `json:"total_ml_memory"` + EffectiveMaxModelMemoryLimit ByteSize `json:"effective_max_model_memory_limit,omitempty"` + MaxModelMemoryLimit ByteSize `json:"max_model_memory_limit,omitempty"` + MaxSingleMlNodeProcessors *int `json:"max_single_ml_node_processors,omitempty"` + TotalMlMemory ByteSize `json:"total_ml_memory"` + TotalMlProcessors *int `json:"total_ml_processors,omitempty"` } func (s *Limits) UnmarshalJSON(data []byte) error { @@ -54,40 +56,51 @@ func (s *Limits) UnmarshalJSON(data []byte) error { switch t { case "effective_max_model_memory_limit": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { + if err := dec.Decode(&s.EffectiveMaxModelMemoryLimit); err != nil { return fmt.Errorf("%s | %w", "EffectiveMaxModelMemoryLimit", err) } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.EffectiveMaxModelMemoryLimit = o case "max_model_memory_limit": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { + if err := dec.Decode(&s.MaxModelMemoryLimit); err != nil { return fmt.Errorf("%s | %w", "MaxModelMemoryLimit", err) } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) + + case "max_single_ml_node_processors": + + 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", "MaxSingleMlNodeProcessors", err) + } + s.MaxSingleMlNodeProcessors = &value + case float64: + f := int(v) + s.MaxSingleMlNodeProcessors = &f } - s.MaxModelMemoryLimit = &o case "total_ml_memory": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { + if err := dec.Decode(&s.TotalMlMemory); err != nil { return fmt.Errorf("%s | %w", "TotalMlMemory", err) } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) + + case "total_ml_processors": + + 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", "TotalMlProcessors", err) + } + s.TotalMlProcessors = &value + case float64: + f := int(v) + s.TotalMlProcessors = &f } - s.TotalMlMemory = o } } diff --git a/typedapi/types/limittokencounttokenfilter.go b/typedapi/types/limittokencounttokenfilter.go index 6ac17a2630..fb8eed6055 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LimitTokenCountTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L251-L255 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L250-L254 type LimitTokenCountTokenFilter struct { ConsumeAllTokens *bool `json:"consume_all_tokens,omitempty"` MaxTokenCount Stringifiedinteger `json:"max_token_count,omitempty"` diff --git a/typedapi/types/linearinterpolationsmoothingmodel.go b/typedapi/types/linearinterpolationsmoothingmodel.go index 682b0a0023..7d252cd491 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LinearInterpolationSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L437-L441 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L437-L441 type LinearInterpolationSmoothingModel struct { BigramLambda Float64 `json:"bigram_lambda"` TrigramLambda Float64 `json:"trigram_lambda"` diff --git a/typedapi/types/linearmovingaverageaggregation.go b/typedapi/types/linearmovingaverageaggregation.go index b61113b0bb..c457b522a8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // LinearMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L242-L245 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/listtypevalidation.go b/typedapi/types/listtypevalidation.go index 3a4dcb0646..d3466dc50c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ListTypeValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L68-L71 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L68-L71 type ListTypeValidation struct { Constraint string `json:"constraint"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/lithuaniananalyzer.go b/typedapi/types/lithuaniananalyzer.go new file mode 100644 index 0000000000..d18bd14503 --- /dev/null +++ b/typedapi/types/lithuaniananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// LithuanianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L230-L235 +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"` +} + +func (s *LithuanianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 LithuanianAnalyzer) MarshalJSON() ([]byte, error) { + type innerLithuanianAnalyzer LithuanianAnalyzer + tmp := innerLithuanianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "lithuanian" + + return json.Marshal(tmp) +} + +// NewLithuanianAnalyzer returns a LithuanianAnalyzer. +func NewLithuanianAnalyzer() *LithuanianAnalyzer { + r := &LithuanianAnalyzer{} + + return r +} diff --git a/typedapi/types/loggingaction.go b/typedapi/types/loggingaction.go index 3d7a7c8bcb..43a33e33cd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LoggingAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L281-L285 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L281-L285 type LoggingAction struct { Category *string `json:"category,omitempty"` Level *string `json:"level,omitempty"` diff --git a/typedapi/types/loggingresult.go b/typedapi/types/loggingresult.go index c2023c8c33..aefeb48cd1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LoggingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L287-L289 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L287-L289 type LoggingResult struct { LoggedText string `json:"logged_text"` } diff --git a/typedapi/types/logstashpipeline.go b/typedapi/types/logstashpipeline.go index 7c3bbc4790..ed86166efa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LogstashPipeline type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/logstash/_types/Pipeline.ts#L60-L92 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/logstash/_types/Pipeline.ts#L60-L92 type LogstashPipeline struct { // Description Description of the pipeline. // This description is not used by Elasticsearch or Logstash. diff --git a/typedapi/types/longnumberproperty.go b/typedapi/types/longnumberproperty.go index c76182e005..567543041f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // LongNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L162-L165 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L162-L165 type LongNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -52,7 +52,6 @@ type LongNumberProperty struct { OnScriptError *onscripterror.OnScriptError `json:"on_script_error,omitempty"` Properties map[string]Property `json:"properties,omitempty"` Script *Script `json:"script,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` // TimeSeriesDimension For internal use by Elastic only. Marks the field as a time series dimension. // Defaults to false. @@ -858,18 +857,6 @@ func (s *LongNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Script", err) } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -931,7 +918,6 @@ func (s LongNumberProperty) MarshalJSON() ([]byte, error) { OnScriptError: s.OnScriptError, Properties: s.Properties, Script: s.Script, - Similarity: s.Similarity, Store: s.Store, TimeSeriesDimension: s.TimeSeriesDimension, TimeSeriesMetric: s.TimeSeriesMetric, diff --git a/typedapi/types/longrangeproperty.go b/typedapi/types/longrangeproperty.go index e16da2f72b..b32c4cbffd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // LongRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/range.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/range.ts#L50-L52 type LongRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -46,7 +46,6 @@ type LongRangeProperty struct { // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -807,18 +806,6 @@ func (s *LongRangeProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -857,7 +844,6 @@ func (s LongRangeProperty) MarshalJSON() ([]byte, error) { Index: s.Index, Meta: s.Meta, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/longraretermsaggregate.go b/typedapi/types/longraretermsaggregate.go index 3f9bfed6f2..b0f64f2aac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // LongRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L433-L438 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L471-L476 type LongRareTermsAggregate struct { Buckets BucketsLongRareTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/longraretermsbucket.go b/typedapi/types/longraretermsbucket.go index 5136d4e785..b229eba22e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // LongRareTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L440-L443 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L478-L481 type LongRareTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -514,6 +514,13 @@ func (s *LongRareTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/longtermsaggregate.go b/typedapi/types/longtermsaggregate.go index 15acd795ea..a06fd64b25 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LongTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L401-L406 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L439-L444 type LongTermsAggregate struct { Buckets BucketsLongTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/longtermsbucket.go b/typedapi/types/longtermsbucket.go index 53dbb0868a..bd8ab79bd7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // LongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L408-L411 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L446-L449 type LongTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -530,6 +530,13 @@ func (s *LongTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/lowercasenormalizer.go b/typedapi/types/lowercasenormalizer.go index a1d5f9d4a4..1ca22673be 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // LowercaseNormalizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/normalizers.ts#L26-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/normalizers.ts#L26-L28 type LowercaseNormalizer struct { Type string `json:"type,omitempty"` } diff --git a/typedapi/types/lowercaseprocessor.go b/typedapi/types/lowercaseprocessor.go index 25eab4093b..f00d42496b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LowercaseProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L910-L926 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1212-L1228 type LowercaseProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/lowercasetokenfilter.go b/typedapi/types/lowercasetokenfilter.go index f9dfdfdda7..9e77d46015 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // LowercaseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L257-L260 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L256-L259 type LowercaseTokenFilter struct { Language *string `json:"language,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/lowercasetokenizer.go b/typedapi/types/lowercasetokenizer.go index 1e99cc9399..ccd52da149 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // LowercaseTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L71-L73 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L80-L82 type LowercaseTokenizer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/machinelearning.go b/typedapi/types/machinelearning.go index f6a9ce1872..f0816d8d06 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MachineLearning type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L372-L379 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L370-L377 type MachineLearning struct { Available bool `json:"available"` DataFrameAnalyticsJobs MlDataFrameAnalyticsJobs `json:"data_frame_analytics_jobs"` diff --git a/typedapi/types/manageuserprivileges.go b/typedapi/types/manageuserprivileges.go index 76346dc199..e974d94ad6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ManageUserPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L344-L346 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L414-L416 type ManageUserPrivileges struct { Applications []string `json:"applications"` } diff --git a/typedapi/types/mapboxvectortiles.go b/typedapi/types/mapboxvectortiles.go index 1d665721d6..9f88c67063 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // MapboxVectorTiles type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Binary.ts#L21-L21 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Binary.ts#L21-L21 type MapboxVectorTiles []byte diff --git a/typedapi/types/mappingcharfilter.go b/typedapi/types/mappingcharfilter.go index 80772b47b5..39d6c37bc0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MappingCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/char_filters.ts#L48-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/char_filters.ts#L51-L55 type MappingCharFilter struct { Mappings []string `json:"mappings,omitempty"` MappingsPath *string `json:"mappings_path,omitempty"` diff --git a/typedapi/types/mappinglimitsettings.go b/typedapi/types/mappinglimitsettings.go index 2cc31e98d5..47a2ffe4a4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L411-L424 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L411-L424 type MappingLimitSettings struct { Coerce *bool `json:"coerce,omitempty"` Depth *MappingLimitSettingsDepth `json:"depth,omitempty"` diff --git a/typedapi/types/mappinglimitsettingsdepth.go b/typedapi/types/mappinglimitsettingsdepth.go index af60c81c99..6fe377f0f5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsDepth type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L445-L452 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L445-L452 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 diff --git a/typedapi/types/mappinglimitsettingsdimensionfields.go b/typedapi/types/mappinglimitsettingsdimensionfields.go index 57d0cba136..0c1d15e7a5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsDimensionFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L482-L488 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L482-L488 type MappingLimitSettingsDimensionFields struct { // Limit [preview] This functionality is in technical preview and may be changed or // removed in a future release. diff --git a/typedapi/types/mappinglimitsettingsfieldnamelength.go b/typedapi/types/mappinglimitsettingsfieldnamelength.go index 9feb787133..5ca9bea353 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsFieldNameLength type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L473-L480 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L473-L480 type MappingLimitSettingsFieldNameLength struct { // Limit Setting for the maximum length of a field name. This setting isn’t really // something that addresses mappings explosion but diff --git a/typedapi/types/mappinglimitsettingsnestedfields.go b/typedapi/types/mappinglimitsettingsnestedfields.go index 8d397c4ba5..6d84b93e9f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsNestedFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L454-L462 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L454-L462 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 diff --git a/typedapi/types/mappinglimitsettingsnestedobjects.go b/typedapi/types/mappinglimitsettingsnestedobjects.go index dd0ad5a2c7..8fe8661b96 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsNestedObjects type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L464-L471 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L464-L471 type MappingLimitSettingsNestedObjects struct { // Limit The maximum number of nested JSON objects that a single document can contain // across all nested types. This limit helps diff --git a/typedapi/types/mappinglimitsettingstotalfields.go b/typedapi/types/mappinglimitsettingstotalfields.go index 5b979c1100..57e9001029 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsTotalFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L426-L443 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L426-L443 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 *bool `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 *int64 `json:"limit,omitempty"` + Limit string `json:"limit,omitempty"` } func (s *MappingLimitSettingsTotalFields) UnmarshalJSON(data []byte) error { @@ -69,33 +69,28 @@ func (s *MappingLimitSettingsTotalFields) UnmarshalJSON(data []byte) error { switch t { case "ignore_dynamic_beyond_limit": - 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", "IgnoreDynamicBeyondLimit", err) - } - s.IgnoreDynamicBeyondLimit = &value - case bool: - s.IgnoreDynamicBeyondLimit = &v + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "IgnoreDynamicBeyondLimit", err) } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.IgnoreDynamicBeyondLimit = o case "limit": - 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", "Limit", err) - } - s.Limit = &value - case float64: - f := int64(v) - s.Limit = &f + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Limit", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) } + s.Limit = o } } diff --git a/typedapi/types/mappingstats.go b/typedapi/types/mappingstats.go index d3ec981178..ca0d8a5d79 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MappingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L186-L190 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L186-L190 type MappingStats struct { TotalCount int64 `json:"total_count"` TotalEstimatedOverhead ByteSize `json:"total_estimated_overhead,omitempty"` diff --git a/typedapi/types/masterisstableindicator.go b/typedapi/types/masterisstableindicator.go index eddbfa8f4c..e61eea8df8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // MasterIsStableIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L79-L83 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L80-L84 type MasterIsStableIndicator struct { Details *MasterIsStableIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/masterisstableindicatorclusterformationnode.go b/typedapi/types/masterisstableindicatorclusterformationnode.go index 302eaa7074..50e492e08c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MasterIsStableIndicatorClusterFormationNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L98-L102 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L99-L103 type MasterIsStableIndicatorClusterFormationNode struct { ClusterFormationMessage string `json:"cluster_formation_message"` Name *string `json:"name,omitempty"` diff --git a/typedapi/types/masterisstableindicatordetails.go b/typedapi/types/masterisstableindicatordetails.go index 6682c77b16..f2d1350ae9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // MasterIsStableIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L84-L89 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L85-L90 type MasterIsStableIndicatorDetails struct { ClusterFormation []MasterIsStableIndicatorClusterFormationNode `json:"cluster_formation,omitempty"` CurrentMaster IndicatorNode `json:"current_master"` diff --git a/typedapi/types/masterisstableindicatorexceptionfetchinghistory.go b/typedapi/types/masterisstableindicatorexceptionfetchinghistory.go index 7529860836..61c2195e45 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MasterIsStableIndicatorExceptionFetchingHistory type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L94-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L95-L98 type MasterIsStableIndicatorExceptionFetchingHistory struct { Message string `json:"message"` StackTrace string `json:"stack_trace"` diff --git a/typedapi/types/masterrecord.go b/typedapi/types/masterrecord.go index 51398730df..527146fc97 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MasterRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/master/types.ts#L20-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/master/types.ts#L20-L39 type MasterRecord struct { // Host host name Host *string `json:"host,omitempty"` diff --git a/typedapi/types/matchallquery.go b/typedapi/types/matchallquery.go index 07a0ae74a6..5d24cb9b90 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MatchAllQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/MatchAllQuery.ts#L22-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/matchboolprefixquery.go b/typedapi/types/matchboolprefixquery.go index cbe2f1a449..0abd9ca4ba 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // MatchBoolPrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L349-L403 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L355-L412 type MatchBoolPrefixQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/matchedfield.go b/typedapi/types/matchedfield.go index eebbcdbfee..af49375b46 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MatchedField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/text_structure/test_grok_pattern/types.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/text_structure/test_grok_pattern/types.ts#L23-L27 type MatchedField struct { Length int `json:"length"` Match string `json:"match"` diff --git a/typedapi/types/matchedtext.go b/typedapi/types/matchedtext.go index e48d71a3a9..1f769c78ba 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MatchedText type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/text_structure/test_grok_pattern/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/text_structure/test_grok_pattern/types.ts#L29-L32 type MatchedText struct { Fields map[string][]MatchedField `json:"fields,omitempty"` Matched bool `json:"matched"` diff --git a/typedapi/types/matchnonequery.go b/typedapi/types/matchnonequery.go index 629ddaf1d0..c2e2e7b87c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MatchNoneQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/MatchNoneQuery.ts#L22-L22 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/matchonlytextproperty.go b/typedapi/types/matchonlytextproperty.go index 8ee0f07963..0b7f3bf88c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MatchOnlyTextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L230-L255 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L231-L256 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. diff --git a/typedapi/types/matchphraseprefixquery.go b/typedapi/types/matchphraseprefixquery.go index 5c5397a41a..b131c4263e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // MatchPhrasePrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L428-L454 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L440-L469 type MatchPhrasePrefixQuery struct { // Analyzer Analyzer used to convert text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/matchphrasequery.go b/typedapi/types/matchphrasequery.go index a5ffec824d..b66e6acea7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // MatchPhraseQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L405-L426 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L414-L438 type MatchPhraseQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/matchquery.go b/typedapi/types/matchquery.go index 9ab45aefd7..91fa3d0916 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // MatchQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L282-L347 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L285-L353 type MatchQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/matrixaggregation.go b/typedapi/types/matrixaggregation.go index 9410270395..04b447a377 100644 --- a/typedapi/types/matrixaggregation.go +++ b/typedapi/types/matrixaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MatrixAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/matrix.ts#L26-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/matrix.ts#L26-L36 type MatrixAggregation struct { // Fields An array of fields for computing the statistics. Fields []string `json:"fields,omitempty"` diff --git a/typedapi/types/matrixstatsaggregate.go b/typedapi/types/matrixstatsaggregate.go index 99d6a5c649..5c553a2596 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MatrixStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L764-L768 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L866-L873 type MatrixStatsAggregate struct { DocCount int64 `json:"doc_count"` Fields []MatrixStatsFields `json:"fields,omitempty"` diff --git a/typedapi/types/matrixstatsaggregation.go b/typedapi/types/matrixstatsaggregation.go index 77a17ce24f..9adf3896fb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // MatrixStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/matrix.ts#L38-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/matrix.ts#L38-L44 type MatrixStatsAggregation struct { // Fields An array of fields for computing the statistics. Fields []string `json:"fields,omitempty"` diff --git a/typedapi/types/matrixstatsfields.go b/typedapi/types/matrixstatsfields.go index 504a57a9f9..eeaaeb123e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MatrixStatsFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L770-L779 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L875-L884 type MatrixStatsFields struct { Correlation map[string]Float64 `json:"correlation"` Count int64 `json:"count"` diff --git a/typedapi/types/maxaggregate.go b/typedapi/types/maxaggregate.go index 610b612796..6d7ae9fcb7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MaxAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L200-L201 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/maxaggregation.go b/typedapi/types/maxaggregation.go index f755aa8af7..71bee68cca 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MaxAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L162-L162 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L165-L165 type MaxAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/maxbucketaggregation.go b/typedapi/types/maxbucketaggregation.go index 438edf3b53..bc8ed4b17c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // MaxBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L224-L224 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/maxmind.go b/typedapi/types/maxmind.go new file mode 100644 index 0000000000..e35c1ce4a7 --- /dev/null +++ b/typedapi/types/maxmind.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// Maxmind type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Database.ts#L31-L33 +type Maxmind struct { + AccountId string `json:"account_id"` +} + +func (s *Maxmind) 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 "account_id": + if err := dec.Decode(&s.AccountId); err != nil { + return fmt.Errorf("%s | %w", "AccountId", err) + } + + } + } + return nil +} + +// NewMaxmind returns a Maxmind. +func NewMaxmind() *Maxmind { + r := &Maxmind{} + + return r +} diff --git a/typedapi/types/medianabsolutedeviationaggregate.go b/typedapi/types/medianabsolutedeviationaggregate.go index 28f4e632a1..9218bf77e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MedianAbsoluteDeviationAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L194-L195 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/medianabsolutedeviationaggregation.go b/typedapi/types/medianabsolutedeviationaggregation.go index 0e5e12225b..7108d6b3ca 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MedianAbsoluteDeviationAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L164-L170 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L167-L176 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 diff --git a/typedapi/types/memmlstats.go b/typedapi/types/memmlstats.go index faf6a0a8c0..c1f66ac3fa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MemMlStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_memory_stats/types.ts#L90-L111 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/memory.go b/typedapi/types/memory.go index d5fdc30476..a2dea493e6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Memory type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_memory_stats/types.ts#L25-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/get_memory_stats/types.ts#L25-L48 type Memory struct { Attributes map[string]string `json:"attributes"` EphemeralId string `json:"ephemeral_id"` diff --git a/typedapi/types/memorystats.go b/typedapi/types/memorystats.go index 63df4df620..b48c39f28e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L596-L620 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L632-L656 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 diff --git a/typedapi/types/memstats.go b/typedapi/types/memstats.go index ea20693adf..65c0577c4a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MemStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/get_memory_stats/types.ts#L65-L88 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/merge.go b/typedapi/types/merge.go index 12b9d3243e..e5a655b792 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Merge type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L332-L334 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L332-L334 type Merge struct { Scheduler *MergeScheduler `json:"scheduler,omitempty"` } diff --git a/typedapi/types/mergescheduler.go b/typedapi/types/mergescheduler.go index 459e0418cf..c273c9937b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MergeScheduler type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L336-L339 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L336-L339 type MergeScheduler struct { MaxMergeCount Stringifiedinteger `json:"max_merge_count,omitempty"` MaxThreadCount Stringifiedinteger `json:"max_thread_count,omitempty"` diff --git a/typedapi/types/mergesstats.go b/typedapi/types/mergesstats.go index 5bab244cb9..e937aa41c8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MergesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L161-L178 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L161-L178 type MergesStats struct { Current int64 `json:"current"` CurrentDocs int64 `json:"current_docs"` diff --git a/typedapi/types/metadata.go b/typedapi/types/metadata.go index e93c6a855b..a452228cdf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ import ( // Metadata type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L99-L99 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L100-L100 type Metadata map[string]json.RawMessage diff --git a/typedapi/types/metrics.go b/typedapi/types/metrics.go index 6d0f7f160e..2a3ba9690d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Metrics type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L76-L76 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L76-L76 type Metrics []string diff --git a/typedapi/types/mgetoperation.go b/typedapi/types/mgetoperation.go index 733f0c1c22..d91a3c7600 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // MgetOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/mget/types.ts#L32-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/mget/types.ts#L32-L55 type MgetOperation struct { // Id_ The unique document ID. Id_ string `json:"_id"` diff --git a/typedapi/types/mgetresponseitem.go b/typedapi/types/mgetresponseitem.go index 0cbbac20a2..2679858892 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // GetResult // MultiGetError // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/mget/types.ts#L57-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/mget/types.ts#L57-L60 type MgetResponseItem any diff --git a/typedapi/types/migrateaction.go b/typedapi/types/migrateaction.go index aba565ee90..f1e7e7da38 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MigrateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L144-L146 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L144-L146 type MigrateAction struct { Enabled *bool `json:"enabled,omitempty"` } diff --git a/typedapi/types/migrationfeatureindexinfo.go b/typedapi/types/migrationfeatureindexinfo.go index ef1e3a1bfd..de961c0820 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MigrationFeatureIndexInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L44-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L44-L48 type MigrationFeatureIndexInfo struct { FailureCause *ErrorCause `json:"failure_cause,omitempty"` Index string `json:"index"` diff --git a/typedapi/types/minaggregate.go b/typedapi/types/minaggregate.go index 84264fbc70..83df7cddb0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MinAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L197-L198 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/minaggregation.go b/typedapi/types/minaggregation.go index d7e1e46526..13d64f87f7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MinAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L172-L172 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L178-L178 type MinAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/minbucketaggregation.go b/typedapi/types/minbucketaggregation.go index 724de23c67..615f58deb9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // MinBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L226-L226 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/minimallicenseinformation.go b/typedapi/types/minimallicenseinformation.go index 381aa1add3..f214729c3e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // MinimalLicenseInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/info/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/info/types.ts#L34-L40 type MinimalLicenseInformation struct { ExpiryDateInMillis int64 `json:"expiry_date_in_millis"` Mode licensetype.LicenseType `json:"mode"` diff --git a/typedapi/types/minimumshouldmatch.go b/typedapi/types/minimumshouldmatch.go index 233de9b027..b4da7602f0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L163-L167 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L164-L168 type MinimumShouldMatch any diff --git a/typedapi/types/missing.go b/typedapi/types/missing.go index 99a60df564..0e73890d8e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -27,5 +27,5 @@ package types // Float64 // bool // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/AggregationContainer.ts#L516-L516 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/AggregationContainer.ts#L535-L535 type Missing any diff --git a/typedapi/types/missingaggregate.go b/typedapi/types/missingaggregate.go index 15726be935..63f3b966fc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // MissingAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L487-L488 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L528-L532 type MissingAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *MissingAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/missingaggregation.go b/typedapi/types/missingaggregation.go index b72eab56cd..c46b14184b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MissingAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L576-L582 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L593-L599 type MissingAggregation struct { // Field The name of the field. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/mlcounter.go b/typedapi/types/mlcounter.go index 7cc095e8c7..ac9c33d6e2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MlCounter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L255-L257 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L253-L255 type MlCounter struct { Count int64 `json:"count"` } diff --git a/typedapi/types/mldatafeed.go b/typedapi/types/mldatafeed.go index 64a6fcdbc6..ab0a2005e1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MLDatafeed type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Datafeed.ts#L36-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/mldataframeanalyticsjobs.go b/typedapi/types/mldataframeanalyticsjobs.go index 0f2e953bf6..7b117046e8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // MlDataFrameAnalyticsJobs type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L177-L182 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L175-L180 type MlDataFrameAnalyticsJobs struct { All_ MlDataFrameAnalyticsJobsCount `json:"_all"` AnalysisCounts *MlDataFrameAnalyticsJobsAnalysis `json:"analysis_counts,omitempty"` diff --git a/typedapi/types/mldataframeanalyticsjobsanalysis.go b/typedapi/types/mldataframeanalyticsjobsanalysis.go index 9dbc2ff9f0..7715fcbb4d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MlDataFrameAnalyticsJobsAnalysis type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L184-L188 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L182-L186 type MlDataFrameAnalyticsJobsAnalysis struct { Classification *int `json:"classification,omitempty"` OutlierDetection *int `json:"outlier_detection,omitempty"` diff --git a/typedapi/types/mldataframeanalyticsjobscount.go b/typedapi/types/mldataframeanalyticsjobscount.go index 30d295450c..c418d8a5e1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MlDataFrameAnalyticsJobsCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L194-L196 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L192-L194 type MlDataFrameAnalyticsJobsCount struct { Count int64 `json:"count"` } diff --git a/typedapi/types/mldataframeanalyticsjobsmemory.go b/typedapi/types/mldataframeanalyticsjobsmemory.go index 77884a35a6..f9724a9d20 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // MlDataFrameAnalyticsJobsMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L190-L192 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L188-L190 type MlDataFrameAnalyticsJobsMemory struct { PeakUsageBytes JobStatistics `json:"peak_usage_bytes"` } diff --git a/typedapi/types/mlfilter.go b/typedapi/types/mlfilter.go index 23630b66fc..c3ec4b0332 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MLFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Filter.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Filter.ts#L22-L29 type MLFilter struct { // Description A description of the filter. Description *string `json:"description,omitempty"` diff --git a/typedapi/types/mlinference.go b/typedapi/types/mlinference.go index 976d4b01d0..0fa774f118 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // MlInference type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L198-L206 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L196-L204 type MlInference struct { Deployments *MlInferenceDeployments `json:"deployments,omitempty"` IngestProcessors map[string]MlInferenceIngestProcessor `json:"ingest_processors"` diff --git a/typedapi/types/mlinferencedeployments.go b/typedapi/types/mlinferencedeployments.go index fb10d3b47b..ec99db95b4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MlInferenceDeployments type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L227-L232 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L225-L230 type MlInferenceDeployments struct { Count int `json:"count"` InferenceCounts JobStatistics `json:"inference_counts"` diff --git a/typedapi/types/mlinferencedeploymentstimems.go b/typedapi/types/mlinferencedeploymentstimems.go index 75bbe0cd4b..700d50f197 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MlInferenceDeploymentsTimeMs type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L234-L236 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L232-L234 type MlInferenceDeploymentsTimeMs struct { Avg Float64 `json:"avg"` } diff --git a/typedapi/types/mlinferenceingestprocessor.go b/typedapi/types/mlinferenceingestprocessor.go index c5fcc2412d..ab1287d3e9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // MlInferenceIngestProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L208-L213 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L206-L211 type MlInferenceIngestProcessor struct { NumDocsProcessed MlInferenceIngestProcessorCount `json:"num_docs_processed"` NumFailures MlInferenceIngestProcessorCount `json:"num_failures"` diff --git a/typedapi/types/mlinferenceingestprocessorcount.go b/typedapi/types/mlinferenceingestprocessorcount.go index 85e896c226..c54925b1cb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MlInferenceIngestProcessorCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L238-L242 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L236-L240 type MlInferenceIngestProcessorCount struct { Max int64 `json:"max"` Min int64 `json:"min"` diff --git a/typedapi/types/mlinferencetrainedmodels.go b/typedapi/types/mlinferencetrainedmodels.go index 160c3424f3..b32ac9c1be 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // MlInferenceTrainedModels type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L215-L225 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L213-L223 type MlInferenceTrainedModels struct { All_ MlCounter `json:"_all"` Count *MlInferenceTrainedModelsCount `json:"count,omitempty"` diff --git a/typedapi/types/mlinferencetrainedmodelscount.go b/typedapi/types/mlinferencetrainedmodelscount.go index 3a3e355d17..631f5d8e11 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MlInferenceTrainedModelsCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L244-L253 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L242-L251 type MlInferenceTrainedModelsCount struct { Classification *int64 `json:"classification,omitempty"` Ner *int64 `json:"ner,omitempty"` diff --git a/typedapi/types/mljobforecasts.go b/typedapi/types/mljobforecasts.go index 6dd8595a1c..f0ad690526 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MlJobForecasts type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L172-L175 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L170-L173 type MlJobForecasts struct { ForecastedJobs int64 `json:"forecasted_jobs"` Total int64 `json:"total"` diff --git a/typedapi/types/modelpackageconfig.go b/typedapi/types/modelpackageconfig.go new file mode 100644 index 0000000000..f626fbece3 --- /dev/null +++ b/typedapi/types/modelpackageconfig.go @@ -0,0 +1,201 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ModelPackageConfig type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L244-L259 +type ModelPackageConfig struct { + CreateTime *int64 `json:"create_time,omitempty"` + Description *string `json:"description,omitempty"` + InferenceConfig map[string]json.RawMessage `json:"inference_config,omitempty"` + Metadata Metadata `json:"metadata,omitempty"` + MinimumVersion *string `json:"minimum_version,omitempty"` + ModelRepository *string `json:"model_repository,omitempty"` + ModelType *string `json:"model_type,omitempty"` + PackagedModelId string `json:"packaged_model_id"` + PlatformArchitecture *string `json:"platform_architecture,omitempty"` + PrefixStrings *TrainedModelPrefixStrings `json:"prefix_strings,omitempty"` + Sha256 *string `json:"sha256,omitempty"` + Size ByteSize `json:"size,omitempty"` + Tags []string `json:"tags,omitempty"` + VocabularyFile *string `json:"vocabulary_file,omitempty"` +} + +func (s *ModelPackageConfig) 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 "create_time": + if err := dec.Decode(&s.CreateTime); err != nil { + return fmt.Errorf("%s | %w", "CreateTime", err) + } + + case "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + case "inference_config": + if s.InferenceConfig == nil { + s.InferenceConfig = make(map[string]json.RawMessage, 0) + } + if err := dec.Decode(&s.InferenceConfig); err != nil { + return fmt.Errorf("%s | %w", "InferenceConfig", err) + } + + case "metadata": + if err := dec.Decode(&s.Metadata); err != nil { + return fmt.Errorf("%s | %w", "Metadata", err) + } + + case "minimum_version": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "MinimumVersion", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.MinimumVersion = &o + + case "model_repository": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ModelRepository", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ModelRepository = &o + + case "model_type": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ModelType", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ModelType = &o + + case "packaged_model_id": + if err := dec.Decode(&s.PackagedModelId); err != nil { + return fmt.Errorf("%s | %w", "PackagedModelId", err) + } + + case "platform_architecture": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "PlatformArchitecture", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.PlatformArchitecture = &o + + case "prefix_strings": + if err := dec.Decode(&s.PrefixStrings); err != nil { + return fmt.Errorf("%s | %w", "PrefixStrings", err) + } + + case "sha256": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Sha256", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Sha256 = &o + + case "size": + if err := dec.Decode(&s.Size); err != nil { + return fmt.Errorf("%s | %w", "Size", err) + } + + case "tags": + if err := dec.Decode(&s.Tags); err != nil { + return fmt.Errorf("%s | %w", "Tags", err) + } + + case "vocabulary_file": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "VocabularyFile", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.VocabularyFile = &o + + } + } + return nil +} + +// NewModelPackageConfig returns a ModelPackageConfig. +func NewModelPackageConfig() *ModelPackageConfig { + r := &ModelPackageConfig{ + InferenceConfig: make(map[string]json.RawMessage, 0), + } + + return r +} diff --git a/typedapi/types/modelplotconfig.go b/typedapi/types/modelplotconfig.go index aa68175bb4..bd45e46564 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ModelPlotConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/ModelPlot.ts#L23-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/modelsizestats.go b/typedapi/types/modelsizestats.go index 7a0c82a278..2689208d90 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // ModelSizeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Model.ts#L59-L81 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Model.ts#L59-L82 type ModelSizeStats struct { AssignmentMemoryBasis *string `json:"assignment_memory_basis,omitempty"` BucketAllocationFailuresCount int64 `json:"bucket_allocation_failures_count"` @@ -49,6 +49,7 @@ type ModelSizeStats struct { ModelBytes ByteSize `json:"model_bytes"` ModelBytesExceeded ByteSize `json:"model_bytes_exceeded,omitempty"` ModelBytesMemoryLimit ByteSize `json:"model_bytes_memory_limit,omitempty"` + OutputMemoryAllocatorBytes ByteSize `json:"output_memory_allocator_bytes,omitempty"` PeakModelBytes ByteSize `json:"peak_model_bytes,omitempty"` RareCategoryCount int `json:"rare_category_count"` ResultType string `json:"result_type"` @@ -200,6 +201,11 @@ func (s *ModelSizeStats) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "ModelBytesMemoryLimit", err) } + case "output_memory_allocator_bytes": + if err := dec.Decode(&s.OutputMemoryAllocatorBytes); err != nil { + return fmt.Errorf("%s | %w", "OutputMemoryAllocatorBytes", err) + } + case "peak_model_bytes": if err := dec.Decode(&s.PeakModelBytes); err != nil { return fmt.Errorf("%s | %w", "PeakModelBytes", err) diff --git a/typedapi/types/modelsnapshot.go b/typedapi/types/modelsnapshot.go index a06011d581..15da66270b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ModelSnapshot type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Model.ts#L25-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Model.ts#L25-L46 type ModelSnapshot struct { // Description An optional description of the job. Description *string `json:"description,omitempty"` diff --git a/typedapi/types/modelsnapshotupgrade.go b/typedapi/types/modelsnapshotupgrade.go index e983e879f6..59d9f11f19 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // ModelSnapshotUpgrade type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Model.ts#L48-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Model.ts#L48-L57 type ModelSnapshotUpgrade struct { AssignmentExplanation string `json:"assignment_explanation"` JobId string `json:"job_id"` diff --git a/typedapi/types/monitoring.go b/typedapi/types/monitoring.go index 9bfae00c11..b9fec713b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Monitoring type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L381-L384 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L379-L382 type Monitoring struct { Available bool `json:"available"` CollectionEnabled bool `json:"collection_enabled"` diff --git a/typedapi/types/morelikethisquery.go b/typedapi/types/morelikethisquery.go index aa705a35b7..43248805bb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // MoreLikeThisQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L87-L169 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/mountedsnapshot.go b/typedapi/types/mountedsnapshot.go index a4ae3b14d6..76b7f432fd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MountedSnapshot type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/searchable_snapshots/mount/types.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/searchable_snapshots/mount/types.ts#L23-L27 type MountedSnapshot struct { Indices []string `json:"indices"` Shards ShardStatistics `json:"shards"` diff --git a/typedapi/types/movingaverageaggregation.go b/typedapi/types/movingaverageaggregation.go index 37aa167105..209311b77f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -28,5 +28,5 @@ package types // HoltMovingAverageAggregation // HoltWintersMovingAverageAggregation // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L228-L234 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/pipeline.ts#L254-L260 type MovingAverageAggregation any diff --git a/typedapi/types/movingfunctionaggregation.go b/typedapi/types/movingfunctionaggregation.go index 61f8fad66d..8b2b7bc12f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // MovingFunctionAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L288-L303 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/movingpercentilesaggregation.go b/typedapi/types/movingpercentilesaggregation.go index e9d3e7037f..a563c1283e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // MovingPercentilesAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L305-L317 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/msearchrequestitem.go b/typedapi/types/msearchrequestitem.go index 121c92f758..b95c88048d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // MultisearchHeader // MultisearchBody // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch/types.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch/types.ts#L47-L50 type MsearchRequestItem any diff --git a/typedapi/types/msearchresponseitem.go b/typedapi/types/msearchresponseitem.go index a00b2b12f2..4561c5541d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // MultiSearchItem // ErrorResponseBase // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch/types.ts#L208-L211 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch/types.ts#L211-L214 type MsearchResponseItem any diff --git a/typedapi/types/mtermvectorsoperation.go b/typedapi/types/mtermvectorsoperation.go index dce2785430..c98755b716 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // MTermVectorsOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/mtermvectors/types.ts#L35-L94 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/multibucketaggregatebaseadjacencymatrixbucket.go b/typedapi/types/multibucketaggregatebaseadjacencymatrixbucket.go index 35ee49bf5c..6ae366927e 100644 --- a/typedapi/types/multibucketaggregatebaseadjacencymatrixbucket.go +++ b/typedapi/types/multibucketaggregatebaseadjacencymatrixbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseAdjacencyMatrixBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseAdjacencyMatrixBucket struct { Buckets BucketsAdjacencyMatrixBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasecompositebucket.go b/typedapi/types/multibucketaggregatebasecompositebucket.go index 2665127f53..aca05c4744 100644 --- a/typedapi/types/multibucketaggregatebasecompositebucket.go +++ b/typedapi/types/multibucketaggregatebasecompositebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseCompositeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseCompositeBucket struct { Buckets BucketsCompositeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasedatehistogrambucket.go b/typedapi/types/multibucketaggregatebasedatehistogrambucket.go index 274ea97360..60891690ee 100644 --- a/typedapi/types/multibucketaggregatebasedatehistogrambucket.go +++ b/typedapi/types/multibucketaggregatebasedatehistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseDateHistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseDateHistogramBucket struct { Buckets BucketsDateHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasedoubletermsbucket.go b/typedapi/types/multibucketaggregatebasedoubletermsbucket.go index da9c297020..6b5e86d83d 100644 --- a/typedapi/types/multibucketaggregatebasedoubletermsbucket.go +++ b/typedapi/types/multibucketaggregatebasedoubletermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseDoubleTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseDoubleTermsBucket struct { Buckets BucketsDoubleTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasefiltersbucket.go b/typedapi/types/multibucketaggregatebasefiltersbucket.go index 5a9a504a1f..5f9e739862 100644 --- a/typedapi/types/multibucketaggregatebasefiltersbucket.go +++ b/typedapi/types/multibucketaggregatebasefiltersbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseFiltersBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseFiltersBucket struct { Buckets BucketsFiltersBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasefrequentitemsetsbucket.go b/typedapi/types/multibucketaggregatebasefrequentitemsetsbucket.go index 74875d6abf..e6d0ad6f72 100644 --- a/typedapi/types/multibucketaggregatebasefrequentitemsetsbucket.go +++ b/typedapi/types/multibucketaggregatebasefrequentitemsetsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseFrequentItemSetsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseFrequentItemSetsBucket struct { Buckets BucketsFrequentItemSetsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasegeohashgridbucket.go b/typedapi/types/multibucketaggregatebasegeohashgridbucket.go index 7be4981b42..61c8d9ca79 100644 --- a/typedapi/types/multibucketaggregatebasegeohashgridbucket.go +++ b/typedapi/types/multibucketaggregatebasegeohashgridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseGeoHashGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseGeoHashGridBucket struct { Buckets BucketsGeoHashGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasegeohexgridbucket.go b/typedapi/types/multibucketaggregatebasegeohexgridbucket.go index 7974475347..bd7dc67a92 100644 --- a/typedapi/types/multibucketaggregatebasegeohexgridbucket.go +++ b/typedapi/types/multibucketaggregatebasegeohexgridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseGeoHexGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseGeoHexGridBucket struct { Buckets BucketsGeoHexGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasegeotilegridbucket.go b/typedapi/types/multibucketaggregatebasegeotilegridbucket.go index ffca517eef..96404435e0 100644 --- a/typedapi/types/multibucketaggregatebasegeotilegridbucket.go +++ b/typedapi/types/multibucketaggregatebasegeotilegridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseGeoTileGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseGeoTileGridBucket struct { Buckets BucketsGeoTileGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasehistogrambucket.go b/typedapi/types/multibucketaggregatebasehistogrambucket.go index 9d14ff6380..1abfc80547 100644 --- a/typedapi/types/multibucketaggregatebasehistogrambucket.go +++ b/typedapi/types/multibucketaggregatebasehistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseHistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseHistogramBucket struct { Buckets BucketsHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebaseipprefixbucket.go b/typedapi/types/multibucketaggregatebaseipprefixbucket.go index a600e91692..a1752e84e6 100644 --- a/typedapi/types/multibucketaggregatebaseipprefixbucket.go +++ b/typedapi/types/multibucketaggregatebaseipprefixbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseIpPrefixBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseIpPrefixBucket struct { Buckets BucketsIpPrefixBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebaseiprangebucket.go b/typedapi/types/multibucketaggregatebaseiprangebucket.go index 4a4daa82d7..d18d7888db 100644 --- a/typedapi/types/multibucketaggregatebaseiprangebucket.go +++ b/typedapi/types/multibucketaggregatebaseiprangebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseIpRangeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseIpRangeBucket struct { Buckets BucketsIpRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebaselongraretermsbucket.go b/typedapi/types/multibucketaggregatebaselongraretermsbucket.go index e41f38dee6..db83d28fd3 100644 --- a/typedapi/types/multibucketaggregatebaselongraretermsbucket.go +++ b/typedapi/types/multibucketaggregatebaselongraretermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseLongRareTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseLongRareTermsBucket struct { Buckets BucketsLongRareTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebaselongtermsbucket.go b/typedapi/types/multibucketaggregatebaselongtermsbucket.go index b09717e5ea..15fc871a7d 100644 --- a/typedapi/types/multibucketaggregatebaselongtermsbucket.go +++ b/typedapi/types/multibucketaggregatebaselongtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseLongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseLongTermsBucket struct { Buckets BucketsLongTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasemultitermsbucket.go b/typedapi/types/multibucketaggregatebasemultitermsbucket.go index 3d60738db7..c1c9d26510 100644 --- a/typedapi/types/multibucketaggregatebasemultitermsbucket.go +++ b/typedapi/types/multibucketaggregatebasemultitermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseMultiTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseMultiTermsBucket struct { Buckets BucketsMultiTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebaserangebucket.go b/typedapi/types/multibucketaggregatebaserangebucket.go index deb3c800da..1933488131 100644 --- a/typedapi/types/multibucketaggregatebaserangebucket.go +++ b/typedapi/types/multibucketaggregatebaserangebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseRangeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseRangeBucket struct { Buckets BucketsRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasesignificantlongtermsbucket.go b/typedapi/types/multibucketaggregatebasesignificantlongtermsbucket.go index dabfbac2fa..1409f76b5f 100644 --- a/typedapi/types/multibucketaggregatebasesignificantlongtermsbucket.go +++ b/typedapi/types/multibucketaggregatebasesignificantlongtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseSignificantLongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseSignificantLongTermsBucket struct { Buckets BucketsSignificantLongTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasesignificantstringtermsbucket.go b/typedapi/types/multibucketaggregatebasesignificantstringtermsbucket.go index 97885c4859..4aafb5039a 100644 --- a/typedapi/types/multibucketaggregatebasesignificantstringtermsbucket.go +++ b/typedapi/types/multibucketaggregatebasesignificantstringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseSignificantStringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseSignificantStringTermsBucket struct { Buckets BucketsSignificantStringTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasestringraretermsbucket.go b/typedapi/types/multibucketaggregatebasestringraretermsbucket.go index 0e824b89e3..3c93249d48 100644 --- a/typedapi/types/multibucketaggregatebasestringraretermsbucket.go +++ b/typedapi/types/multibucketaggregatebasestringraretermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseStringRareTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseStringRareTermsBucket struct { Buckets BucketsStringRareTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasestringtermsbucket.go b/typedapi/types/multibucketaggregatebasestringtermsbucket.go index e9e1a171f0..1a4610e4e8 100644 --- a/typedapi/types/multibucketaggregatebasestringtermsbucket.go +++ b/typedapi/types/multibucketaggregatebasestringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseStringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseStringTermsBucket struct { Buckets BucketsStringTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasetimeseriesbucket.go b/typedapi/types/multibucketaggregatebasetimeseriesbucket.go new file mode 100644 index 0000000000..b044179121 --- /dev/null +++ b/typedapi/types/multibucketaggregatebasetimeseriesbucket.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// MultiBucketAggregateBaseTimeSeriesBucket type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 +type MultiBucketAggregateBaseTimeSeriesBucket struct { + Buckets BucketsTimeSeriesBucket `json:"buckets"` + Meta Metadata `json:"meta,omitempty"` +} + +func (s *MultiBucketAggregateBaseTimeSeriesBucket) 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 "buckets": + + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + source := bytes.NewReader(rawMsg) + localDec := json.NewDecoder(source) + switch rawMsg[0] { + case '{': + o := make(map[string]TimeSeriesBucket, 0) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Buckets", err) + } + s.Buckets = o + case '[': + o := []TimeSeriesBucket{} + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Buckets", err) + } + s.Buckets = o + } + + case "meta": + if err := dec.Decode(&s.Meta); err != nil { + return fmt.Errorf("%s | %w", "Meta", err) + } + + } + } + return nil +} + +// NewMultiBucketAggregateBaseTimeSeriesBucket returns a MultiBucketAggregateBaseTimeSeriesBucket. +func NewMultiBucketAggregateBaseTimeSeriesBucket() *MultiBucketAggregateBaseTimeSeriesBucket { + r := &MultiBucketAggregateBaseTimeSeriesBucket{} + + return r +} diff --git a/typedapi/types/multibucketaggregatebasevariablewidthhistogrambucket.go b/typedapi/types/multibucketaggregatebasevariablewidthhistogrambucket.go index 04201a1053..a09bba8093 100644 --- a/typedapi/types/multibucketaggregatebasevariablewidthhistogrambucket.go +++ b/typedapi/types/multibucketaggregatebasevariablewidthhistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseVariableWidthHistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseVariableWidthHistogramBucket struct { Buckets BucketsVariableWidthHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multibucketaggregatebasevoid.go b/typedapi/types/multibucketaggregatebasevoid.go index f46a024c08..33f8cf57b6 100644 --- a/typedapi/types/multibucketaggregatebasevoid.go +++ b/typedapi/types/multibucketaggregatebasevoid.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiBucketAggregateBaseVoid type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L357-L359 type MultiBucketAggregateBaseVoid struct { Buckets BucketsVoid `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/multigeterror.go b/typedapi/types/multigeterror.go index f3705b3391..6d057126bc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiGetError type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/mget/types.ts#L62-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/mget/types.ts#L62-L66 type MultiGetError struct { Error ErrorCause `json:"error"` Id_ string `json:"_id"` diff --git a/typedapi/types/multimatchquery.go b/typedapi/types/multimatchquery.go index 93bc99c371..3130ef15db 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // MultiMatchQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L456-L539 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L471-L557 type MultiMatchQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/multiplexertokenfilter.go b/typedapi/types/multiplexertokenfilter.go index f0de767299..fb7cc8579e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiplexerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L262-L266 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L261-L265 type MultiplexerTokenFilter struct { Filters []string `json:"filters"` PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` diff --git a/typedapi/types/multisearchbody.go b/typedapi/types/multisearchbody.go index ec3dea0ce2..87ed8fee90 100644 --- a/typedapi/types/multisearchbody.go +++ b/typedapi/types/multisearchbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MultisearchBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch/types.ts#L70-L201 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch/types.ts#L70-L204 type MultisearchBody struct { Aggregations map[string]Aggregations `json:"aggregations,omitempty"` Collapse *FieldCollapse `json:"collapse,omitempty"` diff --git a/typedapi/types/multisearchheader.go b/typedapi/types/multisearchheader.go index c00dead79f..869e98bb4c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // MultisearchHeader type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch/types.ts#L52-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch/types.ts#L52-L67 type MultisearchHeader struct { AllowNoIndices *bool `json:"allow_no_indices,omitempty"` AllowPartialSearchResults *bool `json:"allow_partial_search_results,omitempty"` diff --git a/typedapi/types/multisearchitem.go b/typedapi/types/multisearchitem.go index fad0909cc2..c6ab7e99b6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // MultiSearchItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch/types.ts#L213-L216 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch/types.ts#L216-L219 type MultiSearchItem struct { Aggregations map[string]Aggregate `json:"aggregations,omitempty"` Clusters_ *ClusterStatistics `json:"_clusters,omitempty"` @@ -494,6 +494,13 @@ func (s *MultiSearchItem) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/multisearchresult.go b/typedapi/types/multisearchresult.go index 2d2ae69b32..6172351380 100644 --- a/typedapi/types/multisearchresult.go +++ b/typedapi/types/multisearchresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MultiSearchResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch/types.ts#L203-L206 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch/types.ts#L206-L209 type MultiSearchResult struct { Responses []MsearchResponseItem `json:"responses"` Took int64 `json:"took"` diff --git a/typedapi/types/multitermlookup.go b/typedapi/types/multitermlookup.go index fcee79f57b..0c428f3648 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // MultiTermLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L626-L636 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L643-L653 type MultiTermLookup struct { // Field A fields from which to retrieve terms. Field string `json:"field"` diff --git a/typedapi/types/multitermsaggregate.go b/typedapi/types/multitermsaggregate.go index 53276c62be..f871e9e420 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MultiTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L463-L465 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L501-L506 type MultiTermsAggregate struct { Buckets BucketsMultiTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/multitermsaggregation.go b/typedapi/types/multitermsaggregation.go index c99877e657..acb27b6ced 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // MultiTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L584-L624 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L601-L641 type MultiTermsAggregation struct { // CollectMode Specifies the strategy for data collection. CollectMode *termsaggregationcollectmode.TermsAggregationCollectMode `json:"collect_mode,omitempty"` diff --git a/typedapi/types/multitermsbucket.go b/typedapi/types/multitermsbucket.go index 2c1bbe3be4..c24f3e115f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // MultiTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L467-L471 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L508-L512 type MultiTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -520,6 +520,13 @@ func (s *MultiTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/murmur3hashproperty.go b/typedapi/types/murmur3hashproperty.go index f15ad4c80f..378086669d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // Murmur3HashProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/specialized.ts#L81-L83 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/specialized.ts#L81-L83 type Murmur3HashProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -43,7 +43,6 @@ type Murmur3HashProperty struct { // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -760,18 +759,6 @@ func (s *Murmur3HashProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -807,7 +794,6 @@ func (s Murmur3HashProperty) MarshalJSON() ([]byte, error) { IgnoreAbove: s.IgnoreAbove, Meta: s.Meta, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/mutualinformationheuristic.go b/typedapi/types/mutualinformationheuristic.go index 566ab013a8..86c3c99bf3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // MutualInformationHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L755-L764 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/names.go b/typedapi/types/names.go index fe22fc4b40..b2f4510cb5 100644 --- a/typedapi/types/names.go +++ b/typedapi/types/names.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Names type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L81-L81 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L81-L81 type Names []string diff --git a/typedapi/types/nativecode.go b/typedapi/types/nativecode.go index da71904cad..035e4ffddf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NativeCode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/info/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/info/types.ts#L29-L32 type NativeCode struct { BuildHash string `json:"build_hash"` Version string `json:"version"` diff --git a/typedapi/types/nativecodeinformation.go b/typedapi/types/nativecodeinformation.go index 9d60a1c067..674314b574 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NativeCodeInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/info/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/info/types.ts#L29-L32 type NativeCodeInformation struct { BuildHash string `json:"build_hash"` Version string `json:"version"` diff --git a/typedapi/types/nerinferenceoptions.go b/typedapi/types/nerinferenceoptions.go index ea7bd71754..6c9f60621e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NerInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L255-L264 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L242-L251 type NerInferenceOptions struct { // ClassificationLabels The token classification labels. Must be IOB formatted tags ClassificationLabels []string `json:"classification_labels,omitempty"` diff --git a/typedapi/types/nerinferenceupdateoptions.go b/typedapi/types/nerinferenceupdateoptions.go index cdc7d18290..dabb4e49c4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NerInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L404-L409 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L392-L397 type NerInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. diff --git a/typedapi/types/nestedaggregate.go b/typedapi/types/nestedaggregate.go index c48d0f901c..979c84e55b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // NestedAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L490-L491 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L534-L538 type NestedAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *NestedAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/nestedaggregation.go b/typedapi/types/nestedaggregation.go index c4f94a2356..58e1786b3c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // NestedAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L638-L643 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L655-L660 type NestedAggregation struct { // Path The path to the field of type `nested`. Path *string `json:"path,omitempty"` diff --git a/typedapi/types/nestedidentity.go b/typedapi/types/nestedidentity.go index ef68b0fc17..33c583cf51 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NestedIdentity type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/hits.ts#L89-L93 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/hits.ts#L90-L94 type NestedIdentity struct { Field string `json:"field"` Nested_ *NestedIdentity `json:"_nested,omitempty"` diff --git a/typedapi/types/nestedproperty.go b/typedapi/types/nestedproperty.go index 64b3dc68fe..f9246ae0c4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // NestedProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/complex.ts#L39-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/complex.ts#L39-L44 type NestedProperty struct { CopyTo []string `json:"copy_to,omitempty"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` @@ -45,7 +45,6 @@ type NestedProperty struct { // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -790,18 +789,6 @@ func (s *NestedProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -839,7 +826,6 @@ func (s NestedProperty) MarshalJSON() ([]byte, error) { IncludeInRoot: s.IncludeInRoot, Meta: s.Meta, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/nestedquery.go b/typedapi/types/nestedquery.go index 3e48512c74..ab875dc3c2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // NestedQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/joining.ts#L106-L130 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/nestedsortvalue.go b/typedapi/types/nestedsortvalue.go index 7efb6f061d..3569c97d0f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NestedSortValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/sort.ts#L29-L34 type NestedSortValue struct { Filter *Query `json:"filter,omitempty"` MaxChildren *int `json:"max_children,omitempty"` diff --git a/typedapi/types/networkdirectionprocessor.go b/typedapi/types/networkdirectionprocessor.go new file mode 100644 index 0000000000..6ab79ea018 --- /dev/null +++ b/typedapi/types/networkdirectionprocessor.go @@ -0,0 +1,186 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// NetworkDirectionProcessor type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1230-L1264 +type NetworkDirectionProcessor struct { + // Description Description of the processor. + // Useful for describing the purpose of the processor or its configuration. + Description *string `json:"description,omitempty"` + // DestinationIp Field containing the destination IP address. + DestinationIp *string `json:"destination_ip,omitempty"` + // If Conditionally execute the processor. + If *string `json:"if,omitempty"` + // IgnoreFailure Ignore failures for the processor. + IgnoreFailure *bool `json:"ignore_failure,omitempty"` + // IgnoreMissing If true and any required fields are missing, the processor quietly exits + // without modifying the document. + IgnoreMissing *bool `json:"ignore_missing,omitempty"` + // InternalNetworks List of internal networks. Supports IPv4 and IPv6 addresses and ranges in + // CIDR notation. Also supports the named ranges listed below. These may be + // constructed with template snippets. Must specify only one of + // internal_networks or internal_networks_field. + InternalNetworks []string `json:"internal_networks,omitempty"` + // InternalNetworksField A field on the given document to read the internal_networks configuration + // from. + InternalNetworksField *string `json:"internal_networks_field,omitempty"` + // OnFailure Handle failures for the processor. + OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // SourceIp Field containing the source IP address. + SourceIp *string `json:"source_ip,omitempty"` + // Tag Identifier for the processor. + // Useful for debugging and metrics. + Tag *string `json:"tag,omitempty"` + // TargetField Output field for the network direction. + TargetField *string `json:"target_field,omitempty"` +} + +func (s *NetworkDirectionProcessor) 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 "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + case "destination_ip": + if err := dec.Decode(&s.DestinationIp); err != nil { + return fmt.Errorf("%s | %w", "DestinationIp", err) + } + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "ignore_failure": + 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", "IgnoreFailure", err) + } + s.IgnoreFailure = &value + case bool: + s.IgnoreFailure = &v + } + + case "ignore_missing": + 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", "IgnoreMissing", err) + } + s.IgnoreMissing = &value + case bool: + s.IgnoreMissing = &v + } + + case "internal_networks": + if err := dec.Decode(&s.InternalNetworks); err != nil { + return fmt.Errorf("%s | %w", "InternalNetworks", err) + } + + case "internal_networks_field": + if err := dec.Decode(&s.InternalNetworksField); err != nil { + return fmt.Errorf("%s | %w", "InternalNetworksField", err) + } + + case "on_failure": + if err := dec.Decode(&s.OnFailure); err != nil { + return fmt.Errorf("%s | %w", "OnFailure", err) + } + + case "source_ip": + if err := dec.Decode(&s.SourceIp); err != nil { + return fmt.Errorf("%s | %w", "SourceIp", err) + } + + case "tag": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Tag", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Tag = &o + + case "target_field": + if err := dec.Decode(&s.TargetField); err != nil { + return fmt.Errorf("%s | %w", "TargetField", err) + } + + } + } + return nil +} + +// NewNetworkDirectionProcessor returns a NetworkDirectionProcessor. +func NewNetworkDirectionProcessor() *NetworkDirectionProcessor { + r := &NetworkDirectionProcessor{} + + return r +} diff --git a/typedapi/types/nevercondition.go b/typedapi/types/nevercondition.go index 5e16f41040..7790580efc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NeverCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Conditions.ts#L72-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Conditions.ts#L72-L72 type NeverCondition struct { } diff --git a/typedapi/types/ngramtokenfilter.go b/typedapi/types/ngramtokenfilter.go index 2c147f0a1c..dcd17296ac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NGramTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L268-L273 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L267-L272 type NGramTokenFilter struct { MaxGram *int `json:"max_gram,omitempty"` MinGram *int `json:"min_gram,omitempty"` diff --git a/typedapi/types/ngramtokenizer.go b/typedapi/types/ngramtokenizer.go index 412d0c5824..d26e555f62 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,12 +33,12 @@ import ( // NGramTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L39-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L84-L93 type NGramTokenizer struct { CustomTokenChars *string `json:"custom_token_chars,omitempty"` - MaxGram int `json:"max_gram"` - MinGram int `json:"min_gram"` - TokenChars []tokenchar.TokenChar `json:"token_chars"` + MaxGram *int `json:"max_gram,omitempty"` + MinGram *int `json:"min_gram,omitempty"` + TokenChars []tokenchar.TokenChar `json:"token_chars,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` } @@ -80,10 +80,10 @@ func (s *NGramTokenizer) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "MaxGram", err) } - s.MaxGram = value + s.MaxGram = &value case float64: f := int(v) - s.MaxGram = f + s.MaxGram = &f } case "min_gram": @@ -96,10 +96,10 @@ func (s *NGramTokenizer) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "MinGram", err) } - s.MinGram = value + s.MinGram = &value case float64: f := int(v) - s.MinGram = f + s.MinGram = &f } case "token_chars": diff --git a/typedapi/types/nlpberttokenizationconfig.go b/typedapi/types/nlpberttokenizationconfig.go index f19d2bbe89..e4ecadbf74 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // NlpBertTokenizationConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L131-L158 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L161-L162 type NlpBertTokenizationConfig struct { // DoLowerCase Should the tokenizer lower case the text DoLowerCase *bool `json:"do_lower_case,omitempty"` diff --git a/typedapi/types/nlprobertatokenizationconfig.go b/typedapi/types/nlprobertatokenizationconfig.go index f5c650cea7..eb29d0f815 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,10 +33,12 @@ import ( // NlpRobertaTokenizationConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L160-L187 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L164-L171 type NlpRobertaTokenizationConfig struct { // AddPrefixSpace Should the tokenizer prefix input with a space character AddPrefixSpace *bool `json:"add_prefix_space,omitempty"` + // DoLowerCase Should the tokenizer lower case the text + DoLowerCase *bool `json:"do_lower_case,omitempty"` // MaxSequenceLength Maximum input sequence length for the model MaxSequenceLength *int `json:"max_sequence_length,omitempty"` // Span Tokenization spanning options. Special value of -1 indicates no spanning @@ -78,6 +80,20 @@ func (s *NlpRobertaTokenizationConfig) UnmarshalJSON(data []byte) error { s.AddPrefixSpace = &v } + case "do_lower_case": + 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", "DoLowerCase", err) + } + s.DoLowerCase = &value + case bool: + s.DoLowerCase = &v + } + case "max_sequence_length": var tmp any diff --git a/typedapi/types/nlptokenizationupdateoptions.go b/typedapi/types/nlptokenizationupdateoptions.go index 2052b98187..3b7e5799c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // NlpTokenizationUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L356-L361 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L344-L349 type NlpTokenizationUpdateOptions struct { // Span Span options to apply Span *int `json:"span,omitempty"` diff --git a/typedapi/types/node.go b/typedapi/types/node.go index 5cc80eb02f..5a7d24f799 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Node type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/searchable_snapshots/cache_stats/Response.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/searchable_snapshots/cache_stats/Response.ts#L30-L32 type Node struct { SharedCache Shared `json:"shared_cache"` } diff --git a/typedapi/types/nodeallocationexplanation.go b/typedapi/types/nodeallocationexplanation.go index 5d6f18cd27..26f300fbac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,17 +29,19 @@ import ( "strconv" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/decision" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/noderole" ) // NodeAllocationExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L97-L106 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/types.ts#L103-L117 type NodeAllocationExplanation struct { Deciders []AllocationDecision `json:"deciders"` NodeAttributes map[string]string `json:"node_attributes"` NodeDecision decision.Decision `json:"node_decision"` NodeId string `json:"node_id"` NodeName string `json:"node_name"` + Roles []noderole.NodeRole `json:"roles"` Store *AllocationStore `json:"store,omitempty"` TransportAddress string `json:"transport_address"` WeightRanking int `json:"weight_ranking"` @@ -88,6 +90,11 @@ func (s *NodeAllocationExplanation) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "NodeName", err) } + case "roles": + if err := dec.Decode(&s.Roles); err != nil { + return fmt.Errorf("%s | %w", "Roles", err) + } + case "store": if err := dec.Decode(&s.Store); err != nil { return fmt.Errorf("%s | %w", "Store", err) diff --git a/typedapi/types/nodeattributes.go b/typedapi/types/nodeattributes.go index 82f6d3d86d..700cda7fb7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,25 +26,20 @@ import ( "errors" "fmt" "io" - "strconv" - - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/noderole" ) // NodeAttributes type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Node.ts#L41-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Node.ts#L41-L52 type NodeAttributes struct { // Attributes Lists node attributes. Attributes map[string]string `json:"attributes"` // EphemeralId The ephemeral ID of the node. - EphemeralId string `json:"ephemeral_id"` - ExternalId *string `json:"external_id,omitempty"` + EphemeralId string `json:"ephemeral_id"` // Id The unique identifier of the node. Id *string `json:"id,omitempty"` // Name The unique identifier of the node. - Name string `json:"name"` - Roles []noderole.NodeRole `json:"roles,omitempty"` + Name string `json:"name"` // TransportAddress The host and port where transport HTTP connections are accepted. TransportAddress string `json:"transport_address"` } @@ -77,18 +72,6 @@ func (s *NodeAttributes) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "EphemeralId", err) } - case "external_id": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "ExternalId", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.ExternalId = &o - case "id": if err := dec.Decode(&s.Id); err != nil { return fmt.Errorf("%s | %w", "Id", err) @@ -99,11 +82,6 @@ func (s *NodeAttributes) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Name", err) } - case "roles": - if err := dec.Decode(&s.Roles); err != nil { - return fmt.Errorf("%s | %w", "Roles", err) - } - case "transport_address": if err := dec.Decode(&s.TransportAddress); err != nil { return fmt.Errorf("%s | %w", "TransportAddress", err) diff --git a/typedapi/types/nodeattributesrecord.go b/typedapi/types/nodeattributesrecord.go index bb975528ad..79c660c287 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeAttributesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/nodeattrs/types.ts#L20-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/nodeattrs/types.ts#L20-L55 type NodeAttributesRecord struct { // Attr The attribute name. Attr *string `json:"attr,omitempty"` diff --git a/typedapi/types/nodebufferpool.go b/typedapi/types/nodebufferpool.go index e0840ac9c8..452c1e7483 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeBufferPool type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L788-L809 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L859-L880 type NodeBufferPool struct { // Count Number of buffer pools. Count *int64 `json:"count,omitempty"` diff --git a/typedapi/types/nodediskusage.go b/typedapi/types/nodediskusage.go index 79ccc30712..b21460ed83 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // NodeDiskUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L56-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/types.ts#L57-L61 type NodeDiskUsage struct { LeastAvailable DiskUsage `json:"least_available"` MostAvailable DiskUsage `json:"most_available"` diff --git a/typedapi/types/nodeids.go b/typedapi/types/nodeids.go index 31b4ab8e19..a9a80f1b4a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeIds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L64-L64 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L64-L64 type NodeIds []string diff --git a/typedapi/types/nodeinfo.go b/typedapi/types/nodeinfo.go index bf22df5833..0a8030fa62 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // NodeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L31-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L31-L67 type NodeInfo struct { Aggregations map[string]NodeInfoAggregation `json:"aggregations,omitempty"` Attributes map[string]string `json:"attributes"` diff --git a/typedapi/types/nodeinfoaction.go b/typedapi/types/nodeinfoaction.go index 2d78ff07de..27e22f6161 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L184-L186 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L184-L186 type NodeInfoAction struct { DestructiveRequiresName string `json:"destructive_requires_name"` } diff --git a/typedapi/types/nodeinfoaggregation.go b/typedapi/types/nodeinfoaggregation.go index 95c1f9ec16..23dcdb205b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeInfoAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L235-L237 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L235-L237 type NodeInfoAggregation struct { Types []string `json:"types"` } diff --git a/typedapi/types/nodeinfobootstrap.go b/typedapi/types/nodeinfobootstrap.go index 8c1a2e23c7..7e9c7c185f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoBootstrap type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L204-L206 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L204-L206 type NodeInfoBootstrap struct { MemoryLock string `json:"memory_lock"` } diff --git a/typedapi/types/nodeinfoclient.go b/typedapi/types/nodeinfoclient.go index 62e7c1ace0..478090b38b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoClient type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L188-L190 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L188-L190 type NodeInfoClient struct { Type string `json:"type"` } diff --git a/typedapi/types/nodeinfodiscover.go b/typedapi/types/nodeinfodiscover.go index d4d7126172..ef70466dd7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoDiscover type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L173-L182 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L173-L182 type NodeInfoDiscover struct { NodeInfoDiscover map[string]json.RawMessage `json:"-"` SeedHosts []string `json:"seed_hosts,omitempty"` diff --git a/typedapi/types/nodeinfohttp.go b/typedapi/types/nodeinfohttp.go index 01704caa1e..71fc43786c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoHttp type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L306-L311 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L311-L316 type NodeInfoHttp struct { BoundAddress []string `json:"bound_address"` MaxContentLength ByteSize `json:"max_content_length,omitempty"` diff --git a/typedapi/types/nodeinfoingest.go b/typedapi/types/nodeinfoingest.go index 9308739f21..449c22e3c4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeInfoIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L227-L229 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L227-L229 type NodeInfoIngest struct { Processors []NodeInfoIngestProcessor `json:"processors"` } diff --git a/typedapi/types/nodeinfoingestdownloader.go b/typedapi/types/nodeinfoingestdownloader.go index fac9c3e3a5..a3aaf37f6a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoIngestDownloader type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L128-L130 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L128-L130 type NodeInfoIngestDownloader struct { Enabled string `json:"enabled"` } diff --git a/typedapi/types/nodeinfoingestinfo.go b/typedapi/types/nodeinfoingestinfo.go index 0887beed22..93a1158731 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeInfoIngestInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L124-L126 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L124-L126 type NodeInfoIngestInfo struct { Downloader NodeInfoIngestDownloader `json:"downloader"` } diff --git a/typedapi/types/nodeinfoingestprocessor.go b/typedapi/types/nodeinfoingestprocessor.go index 6a7eef243b..c0c0c9860d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoIngestProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L231-L233 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L231-L233 type NodeInfoIngestProcessor struct { Type string `json:"type"` } diff --git a/typedapi/types/nodeinfojvmmemory.go b/typedapi/types/nodeinfojvmmemory.go index ff3f3273c0..dcd73cc585 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoJvmMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L313-L324 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L318-L329 type NodeInfoJvmMemory struct { DirectMax ByteSize `json:"direct_max,omitempty"` DirectMaxInBytes int64 `json:"direct_max_in_bytes"` diff --git a/typedapi/types/nodeinfomemory.go b/typedapi/types/nodeinfomemory.go index f5095dd170..33cb9a1dc0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L326-L329 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L331-L334 type NodeInfoMemory struct { Total string `json:"total"` TotalInBytes int64 `json:"total_in_bytes"` diff --git a/typedapi/types/nodeinfonetwork.go b/typedapi/types/nodeinfonetwork.go index 94e6a6e856..2836f98604 100644 --- a/typedapi/types/nodeinfonetwork.go +++ b/typedapi/types/nodeinfonetwork.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoNetwork type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L331-L334 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L336-L339 type NodeInfoNetwork struct { PrimaryInterface NodeInfoNetworkInterface `json:"primary_interface"` RefreshInterval int `json:"refresh_interval"` diff --git a/typedapi/types/nodeinfonetworkinterface.go b/typedapi/types/nodeinfonetworkinterface.go index 603b4f99ff..cdd62e55a2 100644 --- a/typedapi/types/nodeinfonetworkinterface.go +++ b/typedapi/types/nodeinfonetworkinterface.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoNetworkInterface type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L336-L340 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L341-L345 type NodeInfoNetworkInterface struct { Address string `json:"address"` MacAddress string `json:"mac_address"` diff --git a/typedapi/types/nodeinfooscpu.go b/typedapi/types/nodeinfooscpu.go index 57b09a526e..1bb1140080 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoOSCPU type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L342-L351 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L347-L356 type NodeInfoOSCPU struct { CacheSize string `json:"cache_size"` CacheSizeInBytes int `json:"cache_size_in_bytes"` diff --git a/typedapi/types/nodeinfopath.go b/typedapi/types/nodeinfopath.go index 1be1cc7965..a841cdcda2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoPath type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L158-L163 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L158-L163 type NodeInfoPath struct { Data []string `json:"data,omitempty"` Home *string `json:"home,omitempty"` @@ -55,8 +55,19 @@ func (s *NodeInfoPath) UnmarshalJSON(data []byte) error { switch t { case "data": - if err := dec.Decode(&s.Data); err != nil { - return fmt.Errorf("%s | %w", "Data", 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", "Data", err) + } + + s.Data = append(s.Data, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Data); err != nil { + return fmt.Errorf("%s | %w", "Data", err) + } } case "home": diff --git a/typedapi/types/nodeinforepositories.go b/typedapi/types/nodeinforepositories.go index 6f6e5bed13..a54fa8b1b5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeInfoRepositories type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L165-L167 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L165-L167 type NodeInfoRepositories struct { Url NodeInfoRepositoriesUrl `json:"url"` } diff --git a/typedapi/types/nodeinforepositoriesurl.go b/typedapi/types/nodeinforepositoriesurl.go index deb6051cbe..7bb6ef9d31 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoRepositoriesUrl type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L169-L171 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L169-L171 type NodeInfoRepositoriesUrl struct { AllowedUrls string `json:"allowed_urls"` } diff --git a/typedapi/types/nodeinfoscript.go b/typedapi/types/nodeinfoscript.go index 31c3f614a2..39b827ce5b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L284-L287 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L289-L292 type NodeInfoScript struct { AllowedTypes string `json:"allowed_types"` DisableMaxCompilationsRate *string `json:"disable_max_compilations_rate,omitempty"` diff --git a/typedapi/types/nodeinfosearch.go b/typedapi/types/nodeinfosearch.go index 853df2341a..6ad71bf69f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeInfoSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L289-L291 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L294-L296 type NodeInfoSearch struct { Remote NodeInfoSearchRemote `json:"remote"` } diff --git a/typedapi/types/nodeinfosearchremote.go b/typedapi/types/nodeinfosearchremote.go index 683fe53149..c310034d9e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSearchRemote type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L293-L295 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L298-L300 type NodeInfoSearchRemote struct { Connect string `json:"connect"` } diff --git a/typedapi/types/nodeinfosettings.go b/typedapi/types/nodeinfosettings.go index 174e48536b..9857a6d4b4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeInfoSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L69-L85 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L69-L85 type NodeInfoSettings struct { Action *NodeInfoAction `json:"action,omitempty"` Bootstrap *NodeInfoBootstrap `json:"bootstrap,omitempty"` diff --git a/typedapi/types/nodeinfosettingscluster.go b/typedapi/types/nodeinfosettingscluster.go index 6b1dc1e50b..16b2d9e62b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // NodeInfoSettingsCluster type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L132-L142 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L132-L142 type NodeInfoSettingsCluster struct { DeprecationIndexing *DeprecationIndexing `json:"deprecation_indexing,omitempty"` Election NodeInfoSettingsClusterElection `json:"election"` diff --git a/typedapi/types/nodeinfosettingsclusterelection.go b/typedapi/types/nodeinfosettingsclusterelection.go index 463c882aba..8016d48037 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // NodeInfoSettingsClusterElection type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L148-L150 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L148-L150 type NodeInfoSettingsClusterElection struct { Strategy string `json:"strategy"` } diff --git a/typedapi/types/nodeinfosettingshttp.go b/typedapi/types/nodeinfosettingshttp.go index 7dcdfd60f6..15a8ff87d7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsHttp type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L192-L197 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L192-L197 type NodeInfoSettingsHttp struct { Compression string `json:"compression,omitempty"` Port string `json:"port,omitempty"` diff --git a/typedapi/types/nodeinfosettingshttptype.go b/typedapi/types/nodeinfosettingshttptype.go index 418f674d0a..88a248d792 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsHttpType type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L199-L202 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L199-L202 type NodeInfoSettingsHttpType struct { Default string `json:"default"` } diff --git a/typedapi/types/nodeinfosettingsingest.go b/typedapi/types/nodeinfosettingsingest.go index ebc288ee85..961c276e56 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeInfoSettingsIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L87-L122 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L87-L122 type NodeInfoSettingsIngest struct { Append *NodeInfoIngestInfo `json:"append,omitempty"` Attachment *NodeInfoIngestInfo `json:"attachment,omitempty"` diff --git a/typedapi/types/nodeinfosettingsnetwork.go b/typedapi/types/nodeinfosettingsnetwork.go index 6cda8c436f..cd28a470fc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,9 +30,9 @@ import ( // NodeInfoSettingsNetwork type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L223-L225 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L223-L225 type NodeInfoSettingsNetwork struct { - Host *string `json:"host,omitempty"` + Host []string `json:"host,omitempty"` } func (s *NodeInfoSettingsNetwork) UnmarshalJSON(data []byte) error { @@ -51,8 +51,19 @@ func (s *NodeInfoSettingsNetwork) UnmarshalJSON(data []byte) error { switch t { case "host": - if err := dec.Decode(&s.Host); err != nil { - return fmt.Errorf("%s | %w", "Host", 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", "Host", err) + } + + s.Host = append(s.Host, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Host); err != nil { + return fmt.Errorf("%s | %w", "Host", err) + } } } diff --git a/typedapi/types/nodeinfosettingsnode.go b/typedapi/types/nodeinfosettingsnode.go index 8846044c08..e4f7d2fa37 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L152-L156 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L152-L156 type NodeInfoSettingsNode struct { Attr map[string]json.RawMessage `json:"attr"` MaxLocalStorageNodes *string `json:"max_local_storage_nodes,omitempty"` diff --git a/typedapi/types/nodeinfosettingstransport.go b/typedapi/types/nodeinfosettingstransport.go index 0e9835014c..6b50b23f78 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsTransport type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L208-L212 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L208-L212 type NodeInfoSettingsTransport struct { Features *NodeInfoSettingsTransportFeatures `json:"features,omitempty"` Type NodeInfoSettingsTransportType `json:"type"` diff --git a/typedapi/types/nodeinfosettingstransportfeatures.go b/typedapi/types/nodeinfosettingstransportfeatures.go index 2c8c1e875e..dd9d4b9a8e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsTransportFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L219-L221 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L219-L221 type NodeInfoSettingsTransportFeatures struct { XPack string `json:"x-pack"` } diff --git a/typedapi/types/nodeinfosettingstransporttype.go b/typedapi/types/nodeinfosettingstransporttype.go index 487d3c3dc2..9061fac0c1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsTransportType type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L214-L217 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L214-L217 type NodeInfoSettingsTransportType struct { Default string `json:"default"` } diff --git a/typedapi/types/nodeinfotransport.go b/typedapi/types/nodeinfotransport.go index 4d227c58d4..68ac144ef6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoTransport type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L353-L357 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L358-L362 type NodeInfoTransport struct { BoundAddress []string `json:"bound_address"` Profiles map[string]string `json:"profiles"` diff --git a/typedapi/types/nodeinfoxpack.go b/typedapi/types/nodeinfoxpack.go index 646b060afa..24eebe67aa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,9 +26,10 @@ import ( // NodeInfoXpack type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L239-L243 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L239-L244 type NodeInfoXpack struct { License *NodeInfoXpackLicense `json:"license,omitempty"` + Ml *NodeInfoXpackMl `json:"ml,omitempty"` Notification map[string]json.RawMessage `json:"notification,omitempty"` Security NodeInfoXpackSecurity `json:"security"` } diff --git a/typedapi/types/nodeinfoxpacklicense.go b/typedapi/types/nodeinfoxpacklicense.go index c0f4c5d7d5..671696d234 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeInfoXpackLicense type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L276-L278 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L281-L283 type NodeInfoXpackLicense struct { SelfGenerated NodeInfoXpackLicenseType `json:"self_generated"` } diff --git a/typedapi/types/nodeinfoxpacklicensetype.go b/typedapi/types/nodeinfoxpacklicensetype.go index 4b5a49689a..e68884c976 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackLicenseType type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L280-L282 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L285-L287 type NodeInfoXpackLicenseType struct { Type string `json:"type"` } diff --git a/typedapi/types/nodeinfoxpackml.go b/typedapi/types/nodeinfoxpackml.go new file mode 100644 index 0000000000..1bd00fe2ef --- /dev/null +++ b/typedapi/types/nodeinfoxpackml.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// NodeInfoXpackMl type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L253-L255 +type NodeInfoXpackMl struct { + UseAutoMachineMemoryPercent *bool `json:"use_auto_machine_memory_percent,omitempty"` +} + +func (s *NodeInfoXpackMl) 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 "use_auto_machine_memory_percent": + 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", "UseAutoMachineMemoryPercent", err) + } + s.UseAutoMachineMemoryPercent = &value + case bool: + s.UseAutoMachineMemoryPercent = &v + } + + } + } + return nil +} + +// NewNodeInfoXpackMl returns a NodeInfoXpackMl. +func NewNodeInfoXpackMl() *NodeInfoXpackMl { + r := &NodeInfoXpackMl{} + + return r +} diff --git a/typedapi/types/nodeinfoxpacksecurity.go b/typedapi/types/nodeinfoxpacksecurity.go index 22ee8b2851..4ae676d10f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,11 +31,11 @@ import ( // NodeInfoXpackSecurity type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L245-L250 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L246-L251 type NodeInfoXpackSecurity struct { Authc *NodeInfoXpackSecurityAuthc `json:"authc,omitempty"` Enabled string `json:"enabled"` - Http NodeInfoXpackSecuritySsl `json:"http"` + Http *NodeInfoXpackSecuritySsl `json:"http,omitempty"` Transport *NodeInfoXpackSecuritySsl `json:"transport,omitempty"` } diff --git a/typedapi/types/nodeinfoxpacksecurityauthc.go b/typedapi/types/nodeinfoxpacksecurityauthc.go index 3c06b6e268..905deaef7d 100644 --- a/typedapi/types/nodeinfoxpacksecurityauthc.go +++ b/typedapi/types/nodeinfoxpacksecurityauthc.go @@ -16,16 +16,16 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeInfoXpackSecurityAuthc type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L256-L259 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L261-L264 type NodeInfoXpackSecurityAuthc struct { - Realms NodeInfoXpackSecurityAuthcRealms `json:"realms"` - Token NodeInfoXpackSecurityAuthcToken `json:"token"` + Realms *NodeInfoXpackSecurityAuthcRealms `json:"realms,omitempty"` + Token *NodeInfoXpackSecurityAuthcToken `json:"token,omitempty"` } // NewNodeInfoXpackSecurityAuthc returns a NodeInfoXpackSecurityAuthc. diff --git a/typedapi/types/nodeinfoxpacksecurityauthcrealms.go b/typedapi/types/nodeinfoxpacksecurityauthcrealms.go index f4b7224ad7..412a2d3f9c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeInfoXpackSecurityAuthcRealms type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L261-L265 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L266-L270 type NodeInfoXpackSecurityAuthcRealms struct { File map[string]NodeInfoXpackSecurityAuthcRealmsStatus `json:"file,omitempty"` Native map[string]NodeInfoXpackSecurityAuthcRealmsStatus `json:"native,omitempty"` diff --git a/typedapi/types/nodeinfoxpacksecurityauthcrealmsstatus.go b/typedapi/types/nodeinfoxpacksecurityauthcrealmsstatus.go index 661b63c7a2..6b9751d29b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackSecurityAuthcRealmsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L271-L274 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L276-L279 type NodeInfoXpackSecurityAuthcRealmsStatus struct { Enabled *string `json:"enabled,omitempty"` Order string `json:"order"` diff --git a/typedapi/types/nodeinfoxpacksecurityauthctoken.go b/typedapi/types/nodeinfoxpacksecurityauthctoken.go index b47742e5b0..806f270755 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackSecurityAuthcToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L267-L269 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L272-L274 type NodeInfoXpackSecurityAuthcToken struct { Enabled string `json:"enabled"` } diff --git a/typedapi/types/nodeinfoxpacksecurityssl.go b/typedapi/types/nodeinfoxpacksecurityssl.go index 479cc55cfb..19f6962b76 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodeInfoXpackSecuritySsl type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L252-L254 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L257-L259 type NodeInfoXpackSecuritySsl struct { Ssl map[string]string `json:"ssl"` } diff --git a/typedapi/types/nodejvminfo.go b/typedapi/types/nodejvminfo.go index 0c706797d2..e6384f879f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeJvmInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L359-L373 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L364-L378 type NodeJvmInfo struct { GcCollectors []string `json:"gc_collectors"` InputArguments []string `json:"input_arguments"` diff --git a/typedapi/types/nodeoperatingsysteminfo.go b/typedapi/types/nodeoperatingsysteminfo.go index 90b3fb808c..1aadc81a11 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeOperatingSystemInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L375-L392 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L380-L397 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 diff --git a/typedapi/types/nodepackagingtype.go b/typedapi/types/nodepackagingtype.go index 1cd1f2f09a..46b2a3fc69 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodePackagingType type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L526-L539 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L526-L539 type NodePackagingType struct { // Count Number of selected nodes using the distribution flavor and file type. Count int `json:"count"` diff --git a/typedapi/types/nodeprocessinfo.go b/typedapi/types/nodeprocessinfo.go index 6cb5b9719f..303543f789 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeProcessInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L394-L401 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L399-L406 type NodeProcessInfo struct { // Id Process identifier (PID) Id int64 `json:"id"` diff --git a/typedapi/types/nodereloaderror.go b/typedapi/types/nodereloaderror.go index 3b1c9cf8da..cee5e247ad 100644 --- a/typedapi/types/nodereloaderror.go +++ b/typedapi/types/nodereloaderror.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // NodeReloadError type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/NodeReloadResult.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/NodeReloadResult.ts#L24-L27 type NodeReloadError struct { Name string `json:"name"` ReloadException *ErrorCause `json:"reload_exception,omitempty"` diff --git a/typedapi/types/nodereloadresult.go b/typedapi/types/nodereloadresult.go index 1553d98c3c..0709a92702 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // Stats // NodeReloadError // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/NodeReloadResult.ts#L29-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/NodeReloadResult.ts#L29-L30 type NodeReloadResult any diff --git a/typedapi/types/nodescontext.go b/typedapi/types/nodescontext.go index 7bcf4ba116..16971fba8d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodesContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L997-L1002 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L1068-L1073 type NodesContext struct { CacheEvictions *int64 `json:"cache_evictions,omitempty"` CompilationLimitTriggered *int64 `json:"compilation_limit_triggered,omitempty"` diff --git a/typedapi/types/nodescredentials.go b/typedapi/types/nodescredentials.go index ca140f36c1..db0dc097fc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodesCredentials type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_service_credentials/types.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/nodescredentialsfiletoken.go b/typedapi/types/nodescredentialsfiletoken.go index 89dfb2edb0..e3048f25d2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodesCredentialsFileToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_service_credentials/types.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_service_credentials/types.ts#L30-L32 type NodesCredentialsFileToken struct { Nodes []string `json:"nodes"` } diff --git a/typedapi/types/nodeshard.go b/typedapi/types/nodeshard.go index da72c9165e..d7c00bb506 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // NodeShard type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Node.ts#L60-L71 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Node.ts#L54-L65 type NodeShard struct { AllocationId map[string]string `json:"allocation_id,omitempty"` Index string `json:"index"` diff --git a/typedapi/types/nodeshutdownstatus.go b/typedapi/types/nodeshutdownstatus.go index e878f82365..c2cdaf579a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // NodeShutdownStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L29-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L29-L38 type NodeShutdownStatus struct { NodeId string `json:"node_id"` PersistentTasks PersistentTaskStatus `json:"persistent_tasks"` diff --git a/typedapi/types/nodesindexingpressure.go b/typedapi/types/nodesindexingpressure.go index 2d5c901e0c..16fea7124f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodesIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L116-L121 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L116-L121 type NodesIndexingPressure struct { // Memory Contains statistics for memory consumption from indexing load. Memory *NodesIndexingPressureMemory `json:"memory,omitempty"` diff --git a/typedapi/types/nodesindexingpressurememory.go b/typedapi/types/nodesindexingpressurememory.go index a506b3f66c..737c8114bf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodesIndexingPressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L123-L142 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L123-L142 type NodesIndexingPressureMemory struct { // Current Contains statistics for current indexing load. Current *PressureMemory `json:"current,omitempty"` diff --git a/typedapi/types/nodesingest.go b/typedapi/types/nodesingest.go index 6afbc628a9..5952067ccc 100644 --- a/typedapi/types/nodesingest.go +++ b/typedapi/types/nodesingest.go @@ -16,16 +16,16 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // NodesIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L345-L354 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L345-L354 type NodesIngest struct { // Pipelines Contains statistics about ingest pipelines for the node. - Pipelines map[string]IngestTotal `json:"pipelines,omitempty"` + Pipelines map[string]IngestStats `json:"pipelines,omitempty"` // Total Contains statistics about ingest operations for the node. Total *IngestTotal `json:"total,omitempty"` } @@ -33,7 +33,7 @@ type NodesIngest struct { // NewNodesIngest returns a NodesIngest. func NewNodesIngest() *NodesIngest { r := &NodesIngest{ - Pipelines: make(map[string]IngestTotal, 0), + Pipelines: make(map[string]IngestStats, 0), } return r diff --git a/typedapi/types/nodesrecord.go b/typedapi/types/nodesrecord.go index bd7563e949..7ab1b236c1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/nodes/types.ts#L23-L542 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/nodes/types.ts#L23-L542 type NodesRecord struct { // Build The Elasticsearch build hash. Build *string `json:"build,omitempty"` diff --git a/typedapi/types/nodestatistics.go b/typedapi/types/nodestatistics.go index efd0e53afb..af028caa30 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Node.ts#L28-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/nodetasks.go b/typedapi/types/nodetasks.go index 87ad0772ea..8ecc98e46b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // NodeTasks type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/tasks/_types/TaskListResponseBase.ts#L49-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/tasks/_types/TaskListResponseBase.ts#L49-L57 type NodeTasks struct { Attributes map[string]string `json:"attributes,omitempty"` Host *string `json:"host,omitempty"` diff --git a/typedapi/types/nodethreadpoolinfo.go b/typedapi/types/nodethreadpoolinfo.go index 0a68896283..33ab6d8c69 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // NodeThreadPoolInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/info/types.ts#L297-L304 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/info/types.ts#L302-L309 type NodeThreadPoolInfo struct { Core *int `json:"core,omitempty"` KeepAlive Duration `json:"keep_alive,omitempty"` diff --git a/typedapi/types/nodeusage.go b/typedapi/types/nodeusage.go index a2027957ee..03323f83a2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // NodeUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/usage/types.ts#L25-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/usage/types.ts#L25-L30 type NodeUsage struct { Aggregations map[string]json.RawMessage `json:"aggregations"` RestActions map[string]int `json:"rest_actions"` diff --git a/typedapi/types/norianalyzer.go b/typedapi/types/norianalyzer.go index 516194c33a..e8f5e76298 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // NoriAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L66-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L312-L318 type NoriAnalyzer struct { DecompoundMode *noridecompoundmode.NoriDecompoundMode `json:"decompound_mode,omitempty"` Stoptags []string `json:"stoptags,omitempty"` diff --git a/typedapi/types/noripartofspeechtokenfilter.go b/typedapi/types/noripartofspeechtokenfilter.go index 086049652e..6c3b68b864 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // NoriPartOfSpeechTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L275-L278 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L274-L277 type NoriPartOfSpeechTokenFilter struct { Stoptags []string `json:"stoptags,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/noritokenizer.go b/typedapi/types/noritokenizer.go index 46eda6d1ee..4cb242888f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // NoriTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L81-L87 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/nori-plugin.ts#L28-L34 type NoriTokenizer struct { DecompoundMode *noridecompoundmode.NoriDecompoundMode `json:"decompound_mode,omitempty"` DiscardPunctuation *bool `json:"discard_punctuation,omitempty"` diff --git a/typedapi/types/normalizeaggregation.go b/typedapi/types/normalizeaggregation.go index 0a3deec3f4..3844939770 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // NormalizeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L319-L324 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/normalizer.go b/typedapi/types/normalizer.go index 69df1a1314..f9bcb4d6de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // LowercaseNormalizer // CustomNormalizer // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/normalizers.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/normalizers.ts#L20-L24 type Normalizer any diff --git a/typedapi/types/norwegiananalyzer.go b/typedapi/types/norwegiananalyzer.go new file mode 100644 index 0000000000..7cceb61445 --- /dev/null +++ b/typedapi/types/norwegiananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// NorwegianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L237-L242 +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"` +} + +func (s *NorwegianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 NorwegianAnalyzer) MarshalJSON() ([]byte, error) { + type innerNorwegianAnalyzer NorwegianAnalyzer + tmp := innerNorwegianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "norwegian" + + return json.Marshal(tmp) +} + +// NewNorwegianAnalyzer returns a NorwegianAnalyzer. +func NewNorwegianAnalyzer() *NorwegianAnalyzer { + r := &NorwegianAnalyzer{} + + return r +} diff --git a/typedapi/types/numberrangequery.go b/typedapi/types/numberrangequery.go index 79040177b3..c0dd9b2a4e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // NumberRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L157-L157 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L172-L172 type NumberRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/numericdecayfunction.go b/typedapi/types/numericdecayfunction.go index 992c59bf43..73b2ef92cd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,7 +29,7 @@ import ( // NumericDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L195-L195 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/numericfielddata.go b/typedapi/types/numericfielddata.go index 56c49cd2e8..21632cca1c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // NumericFielddata type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/NumericFielddata.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/NumericFielddata.ts#L22-L24 type NumericFielddata struct { Format numericfielddataformat.NumericFielddataFormat `json:"format"` } diff --git a/typedapi/types/objectproperty.go b/typedapi/types/objectproperty.go index 4f3b50e240..9eb9b1dc0d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // ObjectProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/complex.ts#L46-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/complex.ts#L46-L50 type ObjectProperty struct { CopyTo []string `json:"copy_to,omitempty"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` @@ -43,7 +43,6 @@ type ObjectProperty struct { // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Subobjects *bool `json:"subobjects,omitempty"` Type string `json:"type,omitempty"` @@ -761,18 +760,6 @@ func (s *ObjectProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -822,7 +809,6 @@ func (s ObjectProperty) MarshalJSON() ([]byte, error) { IgnoreAbove: s.IgnoreAbove, Meta: s.Meta, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Subobjects: s.Subobjects, Type: s.Type, diff --git a/typedapi/types/onehotencodingpreprocessor.go b/typedapi/types/onehotencodingpreprocessor.go index 17c7c0a0a9..d56c805075 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // OneHotEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L44-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L44-L47 type OneHotEncodingPreprocessor struct { Field string `json:"field"` HotMap map[string]string `json:"hot_map"` diff --git a/typedapi/types/operatingsystem.go b/typedapi/types/operatingsystem.go index cfa53ca947..0e95db8965 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // OperatingSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L945-L951 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L1016-L1022 type OperatingSystem struct { Cgroup *Cgroup `json:"cgroup,omitempty"` Cpu *Cpu `json:"cpu,omitempty"` diff --git a/typedapi/types/operatingsystemmemoryinfo.go b/typedapi/types/operatingsystemmemoryinfo.go index 7bdbd73f2a..a1da8ac8b4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // OperatingSystemMemoryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/stats/types.ts#L541-L568 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/stats/types.ts#L541-L568 type OperatingSystemMemoryInfo struct { // 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 diff --git a/typedapi/types/operationcontainer.go b/typedapi/types/operationcontainer.go index aa640200bc..66ebbf80c4 100644 --- a/typedapi/types/operationcontainer.go +++ b/typedapi/types/operationcontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // OperationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/bulk/types.ts#L145-L167 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/bulk/types.ts#L145-L167 type OperationContainer struct { // Create Indexes the specified document if it does not already exist. // The following line must contain the source data to be indexed. diff --git a/typedapi/types/outlierdetectionparameters.go b/typedapi/types/outlierdetectionparameters.go index d5982ac37d..64a59f8bfd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // OutlierDetectionParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L527-L561 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/overallbucket.go b/typedapi/types/overallbucket.go index 91308c0220..43fc41344b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // OverallBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Bucket.ts#L130-L145 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. @@ -48,7 +48,7 @@ type OverallBucket struct { // Timestamp The start time of the bucket for which these results were calculated. Timestamp int64 `json:"timestamp"` // TimestampString The start time of the bucket for which these results were calculated. - TimestampString DateTime `json:"timestamp_string"` + TimestampString DateTime `json:"timestamp_string,omitempty"` } func (s *OverallBucket) UnmarshalJSON(data []byte) error { diff --git a/typedapi/types/overallbucketjob.go b/typedapi/types/overallbucketjob.go index 365a4ac89a..c146e7be45 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // OverallBucketJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Bucket.ts#L146-L149 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Bucket.ts#L145-L148 type OverallBucketJob struct { JobId string `json:"job_id"` MaxAnomalyScore Float64 `json:"max_anomaly_score"` diff --git a/typedapi/types/overlapping.go b/typedapi/types/overlapping.go index 1aa3c8701b..c3e65e6897 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Overlapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L39-L42 type Overlapping struct { IndexPatterns []string `json:"index_patterns"` Name string `json:"name"` diff --git a/typedapi/types/page.go b/typedapi/types/page.go index b9c2d512ba..556ad2fe0c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Page type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Page.ts#L22-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Page.ts#L22-L33 type Page struct { // From Skips the specified number of items. From *int `json:"from,omitempty"` diff --git a/typedapi/types/pagerdutyaction.go b/typedapi/types/pagerdutyaction.go index 29267124b5..485422603d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // PagerDutyAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L54-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L54-L54 type PagerDutyAction struct { Account *string `json:"account,omitempty"` AttachPayload bool `json:"attach_payload"` diff --git a/typedapi/types/pagerdutycontext.go b/typedapi/types/pagerdutycontext.go index ee5ee1f528..b6664a4aa4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // PagerDutyContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L61-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L61-L65 type PagerDutyContext struct { Href *string `json:"href,omitempty"` Src *string `json:"src,omitempty"` diff --git a/typedapi/types/pagerdutyevent.go b/typedapi/types/pagerdutyevent.go index 4d8679490a..3aae65ab9c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // PagerDutyEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L40-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L40-L52 type PagerDutyEvent struct { Account *string `json:"account,omitempty"` AttachPayload bool `json:"attach_payload"` diff --git a/typedapi/types/pagerdutyeventproxy.go b/typedapi/types/pagerdutyeventproxy.go index a2b9b4fd9b..dce17513e0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PagerDutyEventProxy type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L56-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L56-L59 type PagerDutyEventProxy struct { Host *string `json:"host,omitempty"` Port *int `json:"port,omitempty"` diff --git a/typedapi/types/pagerdutyresult.go b/typedapi/types/pagerdutyresult.go index 85eb5acdcf..b4489cb9a7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PagerDutyResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L78-L83 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L78-L83 type PagerDutyResult struct { Event PagerDutyEvent `json:"event"` Reason *string `json:"reason,omitempty"` diff --git a/typedapi/types/painlesscontextsetup.go b/typedapi/types/painlesscontextsetup.go index f0dde19e8f..d250174fa0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // PainlessContextSetup type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/scripts_painless_execute/types.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/scripts_painless_execute/types.ts#L25-L39 type PainlessContextSetup struct { // Document Document that’s temporarily indexed in-memory and accessible from the script. Document json.RawMessage `json:"document,omitempty"` @@ -39,7 +39,7 @@ type PainlessContextSetup struct { // alias. Index string `json:"index"` // Query Use this parameter to specify a query for computing a score. - Query Query `json:"query"` + Query *Query `json:"query,omitempty"` } func (s *PainlessContextSetup) UnmarshalJSON(data []byte) error { diff --git a/typedapi/types/parentaggregate.go b/typedapi/types/parentaggregate.go index 77f6a86e7c..4531fe919a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // ParentAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L786-L787 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L894-L898 type ParentAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *ParentAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/parentaggregation.go b/typedapi/types/parentaggregation.go index 3877ecf63d..abe1efd63e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ParentAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L645-L650 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L662-L667 type ParentAggregation struct { // Type The child type that should be selected. Type *string `json:"type,omitempty"` diff --git a/typedapi/types/parentidquery.go b/typedapi/types/parentidquery.go index eaf3b9fc49..8a51c01792 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ParentIdQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/joining.ts#L132-L146 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/parenttaskinfo.go b/typedapi/types/parenttaskinfo.go index f12db04524..e30bdb0a58 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ParentTaskInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/tasks/_types/TaskListResponseBase.ts#L45-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/tasks/_types/TaskListResponseBase.ts#L45-L47 type ParentTaskInfo struct { Action string `json:"action"` Cancellable bool `json:"cancellable"` diff --git a/typedapi/types/passthroughinferenceoptions.go b/typedapi/types/passthroughinferenceoptions.go index 3f7f0a0141..f97ebe8173 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PassThroughInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L224-L231 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L208-L215 type PassThroughInferenceOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. diff --git a/typedapi/types/passthroughinferenceupdateoptions.go b/typedapi/types/passthroughinferenceupdateoptions.go index df16f6920e..f3ff3de3e1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PassThroughInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L385-L390 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L373-L378 type PassThroughInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. diff --git a/typedapi/types/pathhierarchytokenizer.go b/typedapi/types/pathhierarchytokenizer.go index 0d95b1b920..d2e3c311f1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PathHierarchyTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L89-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L95-L102 type PathHierarchyTokenizer struct { BufferSize Stringifiedinteger `json:"buffer_size,omitempty"` Delimiter *string `json:"delimiter,omitempty"` diff --git a/typedapi/types/patternanalyzer.go b/typedapi/types/patternanalyzer.go index 693de37a16..b906543e69 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PatternAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L74-L81 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L320-L327 type PatternAnalyzer struct { Flags *string `json:"flags,omitempty"` Lowercase *bool `json:"lowercase,omitempty"` diff --git a/typedapi/types/patterncapturetokenfilter.go b/typedapi/types/patterncapturetokenfilter.go index ba3f1c11b1..c1257ca5d3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // PatternCaptureTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L280-L284 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L279-L283 type PatternCaptureTokenFilter struct { Patterns []string `json:"patterns"` PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` diff --git a/typedapi/types/patternreplacecharfilter.go b/typedapi/types/patternreplacecharfilter.go index fd34c7ffd3..27cbb4e6a7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PatternReplaceCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/char_filters.ts#L54-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/char_filters.ts#L57-L62 type PatternReplaceCharFilter struct { Flags *string `json:"flags,omitempty"` Pattern string `json:"pattern"` diff --git a/typedapi/types/patternreplacetokenfilter.go b/typedapi/types/patternreplacetokenfilter.go index d264e781d6..57f5f786c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PatternReplaceTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L286-L292 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L285-L291 type PatternReplaceTokenFilter struct { All *bool `json:"all,omitempty"` Flags *string `json:"flags,omitempty"` diff --git a/typedapi/types/patterntokenizer.go b/typedapi/types/patterntokenizer.go index d09aad9995..1a490bb639 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PatternTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L98-L103 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L104-L109 type PatternTokenizer struct { Flags *string `json:"flags,omitempty"` Group *int `json:"group,omitempty"` diff --git a/typedapi/types/pendingtask.go b/typedapi/types/pendingtask.go index bbc8722e78..49c43ef4b0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PendingTask type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/pending_tasks/types.ts#L23-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/pendingtasksrecord.go b/typedapi/types/pendingtasksrecord.go index 844b5ac175..168fa25f3b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PendingTasksRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/pending_tasks/types.ts#L20-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/pending_tasks/types.ts#L20-L41 type PendingTasksRecord struct { // InsertOrder The task insertion order. InsertOrder *string `json:"insertOrder,omitempty"` diff --git a/typedapi/types/percentage.go b/typedapi/types/percentage.go index 8f293ebdef..db8eca1b66 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // float32 // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Numeric.ts#L28-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Numeric.ts#L28-L28 type Percentage any diff --git a/typedapi/types/percentagescoreheuristic.go b/typedapi/types/percentagescoreheuristic.go index 4ae374501e..3bd8dc63ad 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // PercentageScoreHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L766-L766 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L811-L811 type PercentageScoreHeuristic struct { } diff --git a/typedapi/types/percentileranksaggregation.go b/typedapi/types/percentileranksaggregation.go index e4fad4e353..f397ba6b08 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PercentileRanksAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L174-L193 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L180-L202 type PercentileRanksAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/percentiles.go b/typedapi/types/percentiles.go index fb3c7ea5b5..1be4782c7b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // KeyedPercentiles // []ArrayPercentilesItem // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L150-L151 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L152-L153 type Percentiles any diff --git a/typedapi/types/percentilesaggregation.go b/typedapi/types/percentilesaggregation.go index 302ff1221d..a1d4966c47 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PercentilesAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L195-L214 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L204-L223 type PercentilesAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/percentilesbucketaggregate.go b/typedapi/types/percentilesbucketaggregate.go index ce7a0aa682..18c608bded 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // PercentilesBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L178-L179 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L180-L181 type PercentilesBucketAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` diff --git a/typedapi/types/percentilesbucketaggregation.go b/typedapi/types/percentilesbucketaggregation.go index fccd5faa78..056265953d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // PercentilesBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L354-L359 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/percolatequery.go b/typedapi/types/percolatequery.go index 9365c9acfd..51b556eff5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PercolateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L202-L239 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/percolatorproperty.go b/typedapi/types/percolatorproperty.go index e75bcb43d7..a996efdcd9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // PercolatorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L188-L190 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L188-L190 type PercolatorProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/perpartitioncategorization.go b/typedapi/types/perpartitioncategorization.go index a0f35c803c..d2d85f6315 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PerPartitionCategorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Analysis.ts#L150-L159 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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`. diff --git a/typedapi/types/persiananalyzer.go b/typedapi/types/persiananalyzer.go new file mode 100644 index 0000000000..699150004e --- /dev/null +++ b/typedapi/types/persiananalyzer.go @@ -0,0 +1,113 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// PersianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L244-L248 +type PersianAnalyzer struct { + Stopwords []string `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` +} + +func (s *PersianAnalyzer) 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": + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 PersianAnalyzer) MarshalJSON() ([]byte, error) { + type innerPersianAnalyzer PersianAnalyzer + tmp := innerPersianAnalyzer{ + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "persian" + + return json.Marshal(tmp) +} + +// NewPersianAnalyzer returns a PersianAnalyzer. +func NewPersianAnalyzer() *PersianAnalyzer { + r := &PersianAnalyzer{} + + return r +} diff --git a/typedapi/types/persistenttaskstatus.go b/typedapi/types/persistenttaskstatus.go index 5665ecec3d..3d4eeaa960 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // PersistentTaskStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L56-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L56-L58 type PersistentTaskStatus struct { Status shutdownstatus.ShutdownStatus `json:"status"` } diff --git a/typedapi/types/phase.go b/typedapi/types/phase.go index 87b5bd5b84..c546854453 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Phase type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L26-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L26-L32 type Phase struct { Actions *IlmActions `json:"actions,omitempty"` MinAge *Duration `json:"min_age,omitempty"` diff --git a/typedapi/types/phases.go b/typedapi/types/phases.go index 3007dedf1b..10d44f14c4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Phases type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L34-L40 type Phases struct { Cold *Phase `json:"cold,omitempty"` Delete *Phase `json:"delete,omitempty"` diff --git a/typedapi/types/phonetictokenfilter.go b/typedapi/types/phonetictokenfilter.go index cf557fff9d..3bee1e479b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -36,14 +36,14 @@ import ( // PhoneticTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/phonetic-plugin.ts#L64-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/phonetic-plugin.ts#L64-L72 type PhoneticTokenFilter struct { Encoder phoneticencoder.PhoneticEncoder `json:"encoder"` - Languageset []phoneticlanguage.PhoneticLanguage `json:"languageset"` + Languageset []phoneticlanguage.PhoneticLanguage `json:"languageset,omitempty"` MaxCodeLen *int `json:"max_code_len,omitempty"` - NameType phoneticnametype.PhoneticNameType `json:"name_type"` + NameType *phoneticnametype.PhoneticNameType `json:"name_type,omitempty"` Replace *bool `json:"replace,omitempty"` - RuleType phoneticruletype.PhoneticRuleType `json:"rule_type"` + RuleType *phoneticruletype.PhoneticRuleType `json:"rule_type,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` } diff --git a/typedapi/types/phrasesuggest.go b/typedapi/types/phrasesuggest.go index 0ebf86d230..2157bd9eae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L57-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L57-L62 type PhraseSuggest struct { Length int `json:"length"` Offset int `json:"offset"` diff --git a/typedapi/types/phrasesuggestcollate.go b/typedapi/types/phrasesuggestcollate.go index ef299a5778..2a0b9c700e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestCollate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L333-L346 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L333-L346 type PhraseSuggestCollate struct { // Params Parameters to use if the query is templated. Params map[string]json.RawMessage `json:"params,omitempty"` diff --git a/typedapi/types/phrasesuggestcollatequery.go b/typedapi/types/phrasesuggestcollatequery.go index e29832c8e3..ef2024d9d3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestCollateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L348-L357 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L348-L357 type PhraseSuggestCollateQuery struct { // Id The search template ID. Id *string `json:"id,omitempty"` diff --git a/typedapi/types/phrasesuggester.go b/typedapi/types/phrasesuggester.go index 9f7b96afbb..30105073fd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L359-L417 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L359-L417 type PhraseSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. diff --git a/typedapi/types/phrasesuggesthighlight.go b/typedapi/types/phrasesuggesthighlight.go index fd6c6273fe..6f69846825 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestHighlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L419-L428 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L419-L428 type PhraseSuggestHighlight struct { // PostTag Use in conjunction with `pre_tag` to define the HTML tags to use for the // highlighted text. diff --git a/typedapi/types/phrasesuggestoption.go b/typedapi/types/phrasesuggestoption.go index f4957a5424..66bb544ec4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L86-L91 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L86-L91 type PhraseSuggestOption struct { CollateMatch *bool `json:"collate_match,omitempty"` Highlighted *string `json:"highlighted,omitempty"` diff --git a/typedapi/types/pinneddoc.go b/typedapi/types/pinneddoc.go index 181286d458..da8f10a8e8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // PinnedDoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L262-L271 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L269-L278 type PinnedDoc struct { // Id_ The unique document ID. Id_ string `json:"_id"` diff --git a/typedapi/types/pinnedquery.go b/typedapi/types/pinnedquery.go index 9df895bc18..d457a03e18 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PinnedQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L241-L260 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L247-L267 type PinnedQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/pipelineconfig.go b/typedapi/types/pipelineconfig.go index ad14eebc64..2b0df3e027 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PipelineConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Pipeline.ts#L61-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Pipeline.ts#L67-L81 type PipelineConfig struct { // Description Description of the ingest pipeline. Description *string `json:"description,omitempty"` diff --git a/typedapi/types/pipelinemetadata.go b/typedapi/types/pipelinemetadata.go index b4aefd840a..b1d974a76f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PipelineMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/logstash/_types/Pipeline.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/logstash/_types/Pipeline.ts#L23-L26 type PipelineMetadata struct { Type string `json:"type"` Version string `json:"version"` diff --git a/typedapi/types/pipelineprocessor.go b/typedapi/types/pipelineprocessor.go index 2415a4efbe..eea749befc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PipelineProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L928-L939 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1266-L1277 type PipelineProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/pipelinesettings.go b/typedapi/types/pipelinesettings.go index 74f4cc063f..896221c5d5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PipelineSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/logstash/_types/Pipeline.ts#L28-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/logstash/_types/Pipeline.ts#L28-L59 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. diff --git a/typedapi/types/pipelinesimulation.go b/typedapi/types/pipelinesimulation.go index 60c217d253..5815f150e8 100644 --- a/typedapi/types/pipelinesimulation.go +++ b/typedapi/types/pipelinesimulation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,13 +33,15 @@ import ( // PipelineSimulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/simulate/types.ts#L33-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/simulate/types.ts#L52-L60 type PipelineSimulation struct { - Doc *DocumentSimulation `json:"doc,omitempty"` - ProcessorResults []PipelineSimulation `json:"processor_results,omitempty"` - ProcessorType *string `json:"processor_type,omitempty"` - Status *actionstatusoptions.ActionStatusOptions `json:"status,omitempty"` - Tag *string `json:"tag,omitempty"` + 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"` } func (s *PipelineSimulation) UnmarshalJSON(data []byte) error { @@ -57,14 +59,31 @@ func (s *PipelineSimulation) UnmarshalJSON(data []byte) error { switch t { + case "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + case "doc": if err := dec.Decode(&s.Doc); err != nil { return fmt.Errorf("%s | %w", "Doc", err) } - case "processor_results": - if err := dec.Decode(&s.ProcessorResults); err != nil { - return fmt.Errorf("%s | %w", "ProcessorResults", err) + case "error": + if err := dec.Decode(&s.Error); err != nil { + return fmt.Errorf("%s | %w", "Error", err) + } + + case "ignored_error": + if err := dec.Decode(&s.IgnoredError); err != nil { + return fmt.Errorf("%s | %w", "IgnoredError", err) } case "processor_type": diff --git a/typedapi/types/pipeseparatedflagssimplequerystringflag.go b/typedapi/types/pipeseparatedflagssimplequerystringflag.go index 3e0596c549..a1f04b9916 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // simplequerystringflag.SimpleQueryStringFlag // string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_spec_utils/PipeSeparatedFlags.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_spec_utils/PipeSeparatedFlags.ts#L20-L27 type PipeSeparatedFlagsSimpleQueryStringFlag any diff --git a/typedapi/types/pivot.go b/typedapi/types/pivot.go index 35388b9781..beb086ff2e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Pivot type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/_types/Transform.ts#L54-L68 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/pivotgroupbycontainer.go b/typedapi/types/pivotgroupbycontainer.go index 24f3333c53..662e033911 100644 --- a/typedapi/types/pivotgroupbycontainer.go +++ b/typedapi/types/pivotgroupbycontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // PivotGroupByContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/_types/Transform.ts#L70-L78 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/_types/Transform.ts#L70-L78 type PivotGroupByContainer struct { DateHistogram *DateHistogramAggregation `json:"date_histogram,omitempty"` GeotileGrid *GeoTileGridAggregation `json:"geotile_grid,omitempty"` diff --git a/typedapi/types/pluginsrecord.go b/typedapi/types/pluginsrecord.go index f1288e015a..c03df54d8c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PluginsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/plugins/types.ts#L22-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/plugins/types.ts#L22-L52 type PluginsRecord struct { // Component The component name. Component *string `json:"component,omitempty"` diff --git a/typedapi/types/pluginsstatus.go b/typedapi/types/pluginsstatus.go index 0e20085311..74dce76127 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // PluginsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L60-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L60-L62 type PluginsStatus struct { Status shutdownstatus.ShutdownStatus `json:"status"` } diff --git a/typedapi/types/pluginstats.go b/typedapi/types/pluginstats.go index 901815bbb0..1a4ca4f365 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PluginStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L180-L190 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L180-L190 type PluginStats struct { Classname string `json:"classname"` Description string `json:"description"` diff --git a/typedapi/types/pointintimereference.go b/typedapi/types/pointintimereference.go index 5419c1eb6e..0ea18dba36 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // PointInTimeReference type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/PointInTimeReference.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/PointInTimeReference.ts#L23-L26 type PointInTimeReference struct { Id string `json:"id"` KeepAlive Duration `json:"keep_alive,omitempty"` diff --git a/typedapi/types/pointproperty.go b/typedapi/types/pointproperty.go index 5078453f88..88c3a92211 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // PointProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/geo.ts#L66-L71 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/geo.ts#L66-L71 type PointProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -46,7 +46,6 @@ type PointProperty struct { Meta map[string]string `json:"meta,omitempty"` NullValue *string `json:"null_value,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -803,18 +802,6 @@ func (s *PointProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -853,7 +840,6 @@ func (s PointProperty) MarshalJSON() ([]byte, error) { Meta: s.Meta, NullValue: s.NullValue, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/pool.go b/typedapi/types/pool.go index a810df6f7d..5819b71423 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Pool type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L878-L895 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L949-L966 type Pool struct { // MaxInBytes Maximum amount of memory, in bytes, available for use by the heap. MaxInBytes *int64 `json:"max_in_bytes,omitempty"` diff --git a/typedapi/types/porterstemtokenfilter.go b/typedapi/types/porterstemtokenfilter.go index 3d6602f289..0289101eca 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // PorterStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L294-L296 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L293-L295 type PorterStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/portugueseanalyzer.go b/typedapi/types/portugueseanalyzer.go new file mode 100644 index 0000000000..fb1d140d68 --- /dev/null +++ b/typedapi/types/portugueseanalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// PortugueseAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L250-L255 +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"` +} + +func (s *PortugueseAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 PortugueseAnalyzer) MarshalJSON() ([]byte, error) { + type innerPortugueseAnalyzer PortugueseAnalyzer + tmp := innerPortugueseAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "portuguese" + + return json.Marshal(tmp) +} + +// NewPortugueseAnalyzer returns a PortugueseAnalyzer. +func NewPortugueseAnalyzer() *PortugueseAnalyzer { + r := &PortugueseAnalyzer{} + + return r +} diff --git a/typedapi/types/postmigrationfeature.go b/typedapi/types/postmigrationfeature.go index 3a1e3819c0..3599aa3075 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PostMigrationFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L27-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L27-L29 type PostMigrationFeature struct { FeatureName string `json:"feature_name"` } diff --git a/typedapi/types/predicatetokenfilter.go b/typedapi/types/predicatetokenfilter.go index 3433111dea..0ec7806838 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // PredicateTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L298-L301 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L297-L300 type PredicateTokenFilter struct { Script Script `json:"script"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/predictedvalue.go b/typedapi/types/predictedvalue.go index dd4d0e5f68..1fc5a275a6 100644 --- a/typedapi/types/predictedvalue.go +++ b/typedapi/types/predictedvalue.go @@ -16,16 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types -// PredictedValue holds the union for the following types: +// PredictedValue type alias. // -// string -// Float64 -// bool -// int -// -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L457-L457 -type PredictedValue any +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L445-L445 +type PredictedValue []ScalarValue diff --git a/typedapi/types/prefixquery.go b/typedapi/types/prefixquery.go index d1dad92cb8..a181f37a71 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L88-L107 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/preprocessor.go b/typedapi/types/preprocessor.go index 72787544a7..17e3cd48ed 100644 --- a/typedapi/types/preprocessor.go +++ b/typedapi/types/preprocessor.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Preprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L31-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L31-L36 type Preprocessor struct { FrequencyEncoding *FrequencyEncodingPreprocessor `json:"frequency_encoding,omitempty"` OneHotEncoding *OneHotEncodingPreprocessor `json:"one_hot_encoding,omitempty"` diff --git a/typedapi/types/pressurememory.go b/typedapi/types/pressurememory.go index 53045fe685..2851aaf2c2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L144-L199 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L144-L199 type PressureMemory struct { // All Memory consumed by indexing requests in the coordinating, primary, or replica // stage. diff --git a/typedapi/types/privileges.go b/typedapi/types/privileges.go index d06af8485a..c52c743f86 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Privileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/has_privileges/types.ts#L48-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/has_privileges/types.ts#L48-L48 type Privileges map[string]bool diff --git a/typedapi/types/privilegesactions.go b/typedapi/types/privilegesactions.go index 26649ee8a6..4193919b97 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PrivilegesActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/put_privileges/types.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/put_privileges/types.ts#L22-L27 type PrivilegesActions struct { Actions []string `json:"actions"` Application *string `json:"application,omitempty"` diff --git a/typedapi/types/privilegescheck.go b/typedapi/types/privilegescheck.go index cb27e8d81a..903dc39569 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // PrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/has_privileges_user_profile/types.ts#L30-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/process.go b/typedapi/types/process.go index 108c28a001..a4a007ebea 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Process type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L953-L975 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L1024-L1046 type Process struct { // Cpu Contains CPU statistics for the node. Cpu *Cpu `json:"cpu,omitempty"` diff --git a/typedapi/types/processor.go b/typedapi/types/processor.go index 61dbe809d2..65f5f42bba 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Processor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L384-L401 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L420-L437 type Processor struct { // Count Number of documents transformed by the processor. Count *int64 `json:"count,omitempty"` diff --git a/typedapi/types/processorcontainer.go b/typedapi/types/processorcontainer.go index 4e989e625c..6e35a2ddfa 100644 --- a/typedapi/types/processorcontainer.go +++ b/typedapi/types/processorcontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ProcessorContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L27-L239 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L27-L301 type ProcessorContainer struct { // Append Appends one or more values to an existing array if the field already exists // and it is an array. @@ -47,6 +47,10 @@ type ProcessorContainer struct { // Circle Converts circle definitions of shapes to regular polygons which approximate // them. Circle *CircleProcessor `json:"circle,omitempty"` + // CommunityId Computes the Community ID for network flow data as defined in the + // Community ID Specification. You can use a community ID to correlate network + // events related to a single flow. + CommunityId *CommunityIDProcessor `json:"community_id,omitempty"` // Convert Converts a field in the currently ingested document to a different type, such // as converting a string to an integer. // If the field value is an array, all members will be converted. @@ -79,8 +83,16 @@ type ProcessorContainer struct { // This is useful for when you expect a pipeline to fail and want to relay a // specific message to the requester. Fail *FailProcessor `json:"fail,omitempty"` + // Fingerprint Computes a hash of the document’s content. You can use this hash for + // content fingerprinting. + Fingerprint *FingerprintProcessor `json:"fingerprint,omitempty"` // Foreach Runs an ingest processor on each element of an array or object. Foreach *ForeachProcessor `json:"foreach,omitempty"` + // GeoGrid Converts geo-grid definitions of grid tiles or cells to regular bounding + // boxes or polygons which describe their shape. + // This is useful if there is a need to interact with the tile shapes as + // spatially indexable fields. + GeoGrid *GeoGridProcessor `json:"geo_grid,omitempty"` // Geoip The `geoip` processor adds information about the geographical location of an // IPv4 or IPv6 address. Geoip *GeoIpProcessor `json:"geoip,omitempty"` @@ -96,10 +108,16 @@ type ProcessorContainer struct { // If any non-string values are encountered, the processor will throw an // exception. Gsub *GsubProcessor `json:"gsub,omitempty"` + // HtmlStrip Removes HTML tags from the field. + // If the field is an array of strings, HTML tags will be removed from all + // members of the array. + HtmlStrip *HtmlStripProcessor `json:"html_strip,omitempty"` // Inference Uses a pre-trained data frame analytics model or a model deployed for natural // language processing tasks to infer against the data that is being ingested in // the pipeline. Inference *InferenceProcessor `json:"inference,omitempty"` + // IpLocation Currently an undocumented alias for GeoIP Processor. + IpLocation *IpLocationProcessor `json:"ip_location,omitempty"` // Join Joins each element of an array into a single string using a separator // character between each element. // Throws an error when the field is not an array. @@ -113,8 +131,24 @@ type ProcessorContainer struct { // If the field is an array of strings, all members of the array will be // converted. Lowercase *LowercaseProcessor `json:"lowercase,omitempty"` + // NetworkDirection Calculates the network direction given a source IP address, destination IP + // address, and a list of internal networks. + NetworkDirection *NetworkDirectionProcessor `json:"network_direction,omitempty"` // Pipeline Executes another pipeline. Pipeline *PipelineProcessor `json:"pipeline,omitempty"` + // Redact The Redact processor uses the Grok rules engine to obscure text in the input + // document matching the given Grok patterns. + // The processor can be used to obscure Personal Identifying Information (PII) + // by configuring it to detect known patterns such as email or IP addresses. + // Text that matches a Grok pattern is replaced with a configurable string such + // as `` where an email address is matched or simply replace all matches + // with the text `` if preferred. + Redact *RedactProcessor `json:"redact,omitempty"` + // RegisteredDomain Extracts the registered domain (also known as the effective top-level + // domain or eTLD), sub-domain, and top-level domain from a fully qualified + // domain name (FQDN). Uses the registered domains defined in the Mozilla + // Public Suffix List. + RegisteredDomain *RegisteredDomainProcessor `json:"registered_domain,omitempty"` // Remove Removes existing fields. // If one field doesn’t exist, an exception will be thrown. Remove *RemoveProcessor `json:"remove,omitempty"` @@ -149,6 +183,10 @@ type ProcessorContainer struct { // Split Splits a field into an array using a separator character. // Only works on string fields. Split *SplitProcessor `json:"split,omitempty"` + // Terminate Terminates the current ingest pipeline, causing no further processors to be + // run. + // This will normally be executed conditionally, using the `if` option. + Terminate *TerminateProcessor `json:"terminate,omitempty"` // Trim Trims whitespace from a field. // If the field is an array of strings, all members of the array will be // trimmed. @@ -158,6 +196,11 @@ type ProcessorContainer struct { // If the field is an array of strings, all members of the array will be // converted. Uppercase *UppercaseProcessor `json:"uppercase,omitempty"` + // UriParts Parses a Uniform Resource Identifier (URI) string and extracts its components + // as an object. + // This URI object includes properties for the URI’s domain, path, fragment, + // port, query, scheme, user info, username, and password. + UriParts *UriPartsProcessor `json:"uri_parts,omitempty"` // Urldecode URL-decodes a string. // If the field is an array of strings, all members of the array will be // decoded. diff --git a/typedapi/types/profile.go b/typedapi/types/profile.go index c8c36c8f3b..e7038e4ee8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Profile type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L93-L95 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L101-L103 type Profile struct { Shards []ShardProfile `json:"shards"` } diff --git a/typedapi/types/property.go b/typedapi/types/property.go index 254752f341..33bffcfb81 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -72,5 +72,5 @@ package types // LongRangeProperty // IcuCollationProperty // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/Property.ts#L96-L164 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/Property.ts#L96-L164 type Property any diff --git a/typedapi/types/publishedclusterstates.go b/typedapi/types/publishedclusterstates.go index 1475389d4a..9c89a0df6e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // PublishedClusterStates type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L263-L276 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L263-L276 type PublishedClusterStates struct { // CompatibleDiffs Number of compatible differences between published cluster states. CompatibleDiffs *int64 `json:"compatible_diffs,omitempty"` diff --git a/typedapi/types/queries.go b/typedapi/types/queries.go index 843961198e..ebb1cff991 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Queries type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L403-L405 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L403-L405 type Queries struct { Cache *CacheQueries `json:"cache,omitempty"` } diff --git a/typedapi/types/query.go b/typedapi/types/query.go index 34b357d8fc..bc1fb2bd6a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Query type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/abstractions.ts#L102-L427 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/abstractions.ts#L102-L427 type Query struct { // Bool matches documents matching boolean combinations of other queries. Bool *BoolQuery `json:"bool,omitempty"` diff --git a/typedapi/types/querybreakdown.go b/typedapi/types/querybreakdown.go index 3132bd7ee3..14374119b8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // QueryBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L97-L116 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L105-L126 type QueryBreakdown struct { Advance int64 `json:"advance"` AdvanceCount int64 `json:"advance_count"` @@ -39,6 +39,8 @@ type QueryBreakdown struct { BuildScorerCount int64 `json:"build_scorer_count"` ComputeMaxScore int64 `json:"compute_max_score"` ComputeMaxScoreCount int64 `json:"compute_max_score_count"` + CountWeight int64 `json:"count_weight"` + CountWeightCount int64 `json:"count_weight_count"` CreateWeight int64 `json:"create_weight"` CreateWeightCount int64 `json:"create_weight_count"` Match int64 `json:"match"` @@ -158,6 +160,36 @@ func (s *QueryBreakdown) UnmarshalJSON(data []byte) error { s.ComputeMaxScoreCount = f } + case "count_weight": + 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", "CountWeight", err) + } + s.CountWeight = value + case float64: + f := int64(v) + s.CountWeight = f + } + + case "count_weight_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", "CountWeightCount", err) + } + s.CountWeightCount = value + case float64: + f := int64(v) + s.CountWeightCount = f + } + case "create_weight": var tmp any dec.Decode(&tmp) diff --git a/typedapi/types/querycachestats.go b/typedapi/types/querycachestats.go index 7bc83afb05..99bfdbfb31 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // QueryCacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L192-L226 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L192-L226 type QueryCacheStats struct { // CacheCount Total number of entries added to the query cache across all shards assigned // to selected nodes. diff --git a/typedapi/types/queryprofile.go b/typedapi/types/queryprofile.go index f1458a6187..dc4aa2e408 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // QueryProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L118-L124 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L128-L134 type QueryProfile struct { Breakdown QueryBreakdown `json:"breakdown"` Children []QueryProfile `json:"children,omitempty"` diff --git a/typedapi/types/queryrole.go b/typedapi/types/queryrole.go index 1e5439d6df..fecfcd5880 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // QueryRole type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_role/types.ts#L103-L109 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/query_role/types.ts#L103-L109 type QueryRole struct { // Applications A list of application privilege entries Applications []ApplicationPrivileges `json:"applications,omitempty"` @@ -53,6 +53,13 @@ type QueryRole struct { Metadata Metadata `json:"metadata,omitempty"` // Name Name of the role. Name string `json:"name"` + // RemoteCluster A list of cluster permissions for remote clusters. Note - this is limited a + // subset of the cluster permissions. + RemoteCluster []RemoteClusterPrivileges `json:"remote_cluster,omitempty"` + // RemoteIndices A list of indices permissions for remote clusters. + RemoteIndices []RemoteIndicesPrivileges `json:"remote_indices,omitempty"` + // Restriction Restriction for when the role descriptor is allowed to be effective. + Restriction *Restriction `json:"restriction,omitempty"` // RunAs A list of users that the API keys can impersonate. *Note*: in Serverless, the // run-as feature is disabled. For API compatibility, you can still specify an // empty `run_as` field, but a non-empty list will be rejected. @@ -136,6 +143,21 @@ func (s *QueryRole) UnmarshalJSON(data []byte) error { } s.Name = o + case "remote_cluster": + if err := dec.Decode(&s.RemoteCluster); err != nil { + return fmt.Errorf("%s | %w", "RemoteCluster", err) + } + + case "remote_indices": + if err := dec.Decode(&s.RemoteIndices); err != nil { + return fmt.Errorf("%s | %w", "RemoteIndices", err) + } + + case "restriction": + if err := dec.Decode(&s.Restriction); err != nil { + return fmt.Errorf("%s | %w", "Restriction", err) + } + case "run_as": if err := dec.Decode(&s.RunAs); err != nil { return fmt.Errorf("%s | %w", "RunAs", err) diff --git a/typedapi/types/queryrule.go b/typedapi/types/queryrule.go index 53de7da314..0ea5973bf4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // QueryRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/_types/QueryRuleset.ts#L36-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/_types/QueryRuleset.ts#L36-L42 type QueryRule struct { Actions QueryRuleActions `json:"actions"` Criteria []QueryRuleCriteria `json:"criteria"` diff --git a/typedapi/types/queryruleactions.go b/typedapi/types/queryruleactions.go index 1126bdc552..d0e817ae58 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // QueryRuleActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/_types/QueryRuleset.ts#L69-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/_types/QueryRuleset.ts#L70-L73 type QueryRuleActions struct { Docs []PinnedDoc `json:"docs,omitempty"` Ids []string `json:"ids,omitempty"` diff --git a/typedapi/types/queryrulecriteria.go b/typedapi/types/queryrulecriteria.go index 3032c99db8..d12456d89a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // QueryRuleCriteria type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/_types/QueryRuleset.ts#L48-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/_types/QueryRuleset.ts#L49-L53 type QueryRuleCriteria struct { Metadata *string `json:"metadata,omitempty"` Type queryrulecriteriatype.QueryRuleCriteriaType `json:"type"` diff --git a/typedapi/types/queryruleset.go b/typedapi/types/queryruleset.go index 2eba2b3fc3..1552356697 100644 --- a/typedapi/types/queryruleset.go +++ b/typedapi/types/queryruleset.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // QueryRuleset type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/_types/QueryRuleset.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/_types/QueryRuleset.ts#L25-L34 type QueryRuleset struct { // Rules Rules associated with the query ruleset Rules []QueryRule `json:"rules"` diff --git a/typedapi/types/queryrulesetlistitem.go b/typedapi/types/queryrulesetlistitem.go index 1f5bc2afc7..8089a324d6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,12 +31,14 @@ import ( // QueryRulesetListItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/query_rules/list_rulesets/types.ts#L23-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/list_rulesets/types.ts#L23-L42 type QueryRulesetListItem struct { - // RuleCriteriaTypesCounts A map of criteria type to the number of rules of that type + // RuleCriteriaTypesCounts A map of criteria type (e.g. exact) to the number of rules of that type RuleCriteriaTypesCounts map[string]int `json:"rule_criteria_types_counts"` // RuleTotalCount The number of rules associated with this ruleset RuleTotalCount int `json:"rule_total_count"` + // RuleTypeCounts A map of rule type (e.g. pinned) to the number of rules of that type + RuleTypeCounts map[string]int `json:"rule_type_counts"` // RulesetId Ruleset unique identifier RulesetId string `json:"ruleset_id"` } @@ -80,6 +82,14 @@ func (s *QueryRulesetListItem) UnmarshalJSON(data []byte) error { s.RuleTotalCount = f } + case "rule_type_counts": + if s.RuleTypeCounts == nil { + s.RuleTypeCounts = make(map[string]int, 0) + } + if err := dec.Decode(&s.RuleTypeCounts); err != nil { + return fmt.Errorf("%s | %w", "RuleTypeCounts", err) + } + case "ruleset_id": if err := dec.Decode(&s.RulesetId); err != nil { return fmt.Errorf("%s | %w", "RulesetId", err) @@ -94,6 +104,7 @@ func (s *QueryRulesetListItem) UnmarshalJSON(data []byte) error { func NewQueryRulesetListItem() *QueryRulesetListItem { r := &QueryRulesetListItem{ RuleCriteriaTypesCounts: make(map[string]int, 0), + RuleTypeCounts: make(map[string]int, 0), } return r diff --git a/typedapi/types/hotthread.go b/typedapi/types/queryrulesetmatchedrule.go similarity index 52% rename from typedapi/types/hotthread.go rename to typedapi/types/queryrulesetmatchedrule.go index c158fb27a0..c95b32d2d7 100644 --- a/typedapi/types/hotthread.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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -28,17 +28,17 @@ import ( "io" ) -// HotThread type. +// QueryRulesetMatchedRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/hot_threads/types.ts#L23-L28 -type HotThread struct { - Hosts []string `json:"hosts"` - NodeId string `json:"node_id"` - NodeName string `json:"node_name"` - Threads []string `json:"threads"` +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/query_rules/test/QueryRulesetTestResponse.ts#L30-L39 +type QueryRulesetMatchedRule struct { + // RuleId Rule unique identifier within that ruleset + RuleId string `json:"rule_id"` + // RulesetId Ruleset unique identifier + RulesetId string `json:"ruleset_id"` } -func (s *HotThread) UnmarshalJSON(data []byte) error { +func (s *QueryRulesetMatchedRule) UnmarshalJSON(data []byte) error { dec := json.NewDecoder(bytes.NewReader(data)) @@ -53,24 +53,14 @@ func (s *HotThread) UnmarshalJSON(data []byte) error { switch t { - case "hosts": - if err := dec.Decode(&s.Hosts); err != nil { - return fmt.Errorf("%s | %w", "Hosts", err) + case "rule_id": + if err := dec.Decode(&s.RuleId); err != nil { + return fmt.Errorf("%s | %w", "RuleId", err) } - case "node_id": - if err := dec.Decode(&s.NodeId); err != nil { - return fmt.Errorf("%s | %w", "NodeId", err) - } - - case "node_name": - if err := dec.Decode(&s.NodeName); err != nil { - return fmt.Errorf("%s | %w", "NodeName", err) - } - - case "threads": - if err := dec.Decode(&s.Threads); err != nil { - return fmt.Errorf("%s | %w", "Threads", err) + case "ruleset_id": + if err := dec.Decode(&s.RulesetId); err != nil { + return fmt.Errorf("%s | %w", "RulesetId", err) } } @@ -78,9 +68,9 @@ func (s *HotThread) UnmarshalJSON(data []byte) error { return nil } -// NewHotThread returns a HotThread. -func NewHotThread() *HotThread { - r := &HotThread{} +// NewQueryRulesetMatchedRule returns a QueryRulesetMatchedRule. +func NewQueryRulesetMatchedRule() *QueryRulesetMatchedRule { + r := &QueryRulesetMatchedRule{} return r } diff --git a/typedapi/types/querystringquery.go b/typedapi/types/querystringquery.go index 1cb3e1a471..3a22ce0f21 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // QueryStringQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L580-L700 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L598-L721 type QueryStringQuery struct { // AllowLeadingWildcard If `true`, the wildcard characters `*` and `?` are allowed as the first // character of the query string. diff --git a/typedapi/types/queryuser.go b/typedapi/types/queryuser.go index fc0c73a2bf..77afd4c42b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // QueryUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_user/types.ts#L103-L105 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/query_user/types.ts#L103-L105 type QueryUser struct { Email *string `json:"email,omitempty"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/queryvectorbuilder.go b/typedapi/types/queryvectorbuilder.go index 8f03af4a49..6b5cf3b9e0 100644 --- a/typedapi/types/queryvectorbuilder.go +++ b/typedapi/types/queryvectorbuilder.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // QueryVectorBuilder type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Knn.ts#L69-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Knn.ts#L74-L77 type QueryVectorBuilder struct { TextEmbedding *TextEmbedding `json:"text_embedding,omitempty"` } diff --git a/typedapi/types/querywatch.go b/typedapi/types/querywatch.go index 4eb0d48c25..713cf145da 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // QueryWatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Watch.ts#L58-L64 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Watch.ts#L58-L64 type QueryWatch struct { Id_ string `json:"_id"` PrimaryTerm_ *int `json:"_primary_term,omitempty"` diff --git a/typedapi/types/questionansweringinferenceoptions.go b/typedapi/types/questionansweringinferenceoptions.go index 36556b07a5..b141564e32 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // QuestionAnsweringInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L282-L292 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L270-L280 type QuestionAnsweringInferenceOptions struct { // MaxAnswerLength The maximum answer length to consider MaxAnswerLength *int `json:"max_answer_length,omitempty"` diff --git a/typedapi/types/questionansweringinferenceupdateoptions.go b/typedapi/types/questionansweringinferenceupdateoptions.go index 51d78d7da3..bc7bc71636 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // QuestionAnsweringInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L420-L431 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L408-L419 type QuestionAnsweringInferenceUpdateOptions struct { // MaxAnswerLength The maximum answer length to consider for extraction MaxAnswerLength *int `json:"max_answer_length,omitempty"` diff --git a/typedapi/types/randomsampleraggregation.go b/typedapi/types/randomsampleraggregation.go new file mode 100644 index 0000000000..be3f7ec208 --- /dev/null +++ b/typedapi/types/randomsampleraggregation.go @@ -0,0 +1,122 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RandomSamplerAggregation type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. + // The lower the probability, the fewer documents are matched. + Probability Float64 `json:"probability"` + // Seed The seed to generate the random sampling of documents. + // When a seed is provided, the random subset of documents is the same between + // calls. + Seed *int `json:"seed,omitempty"` + // ShardSeed When combined with seed, setting shard_seed ensures 100% consistent sampling + // over shards where data is exactly the same. + ShardSeed *int `json:"shard_seed,omitempty"` +} + +func (s *RandomSamplerAggregation) 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 "probability": + 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", "Probability", err) + } + f := Float64(value) + s.Probability = f + case float64: + f := Float64(v) + s.Probability = f + } + + case "seed": + + 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", "Seed", err) + } + s.Seed = &value + case float64: + f := int(v) + s.Seed = &f + } + + case "shard_seed": + + 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", "ShardSeed", err) + } + s.ShardSeed = &value + case float64: + f := int(v) + s.ShardSeed = &f + } + + } + } + return nil +} + +// NewRandomSamplerAggregation returns a RandomSamplerAggregation. +func NewRandomSamplerAggregation() *RandomSamplerAggregation { + r := &RandomSamplerAggregation{} + + return r +} diff --git a/typedapi/types/randomscorefunction.go b/typedapi/types/randomscorefunction.go index 87e3e52c9f..50d27439a1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RandomScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L131-L134 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/compound.ts#L144-L147 type RandomScoreFunction struct { Field *string `json:"field,omitempty"` Seed string `json:"seed,omitempty"` diff --git a/typedapi/types/rangeaggregate.go b/typedapi/types/rangeaggregate.go index 4e6e73678e..3d0a24b6be 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L535-L536 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L594-L598 type RangeAggregate struct { Buckets BucketsRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/rangeaggregation.go b/typedapi/types/rangeaggregation.go index d91925fccf..916e079d60 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L652-L672 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/rangebucket.go b/typedapi/types/rangebucket.go index 6aec346e40..78614a3e9e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // RangeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L538-L545 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L600-L607 type RangeBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -559,6 +559,13 @@ func (s *RangeBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/rangequery.go b/typedapi/types/rangequery.go index c6ab6d37f7..2a1f60e5c8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -27,5 +27,5 @@ package types // NumberRangeQuery // TermRangeQuery // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L161-L170 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L176-L186 type RangeQuery any diff --git a/typedapi/types/rangequerybasedatemath.go b/typedapi/types/rangequerybasedatemath.go index 2e96acbdba..982b1c53e1 100644 --- a/typedapi/types/rangequerybasedatemath.go +++ b/typedapi/types/rangequerybasedatemath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // RangeQueryBaseDateMath type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L109-L133 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L122-L148 type RangeQueryBaseDateMath struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/rangequerybasedouble.go b/typedapi/types/rangequerybasedouble.go index d85e802a55..fa22a10460 100644 --- a/typedapi/types/rangequerybasedouble.go +++ b/typedapi/types/rangequerybasedouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // RangeQueryBasedouble type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L109-L133 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L122-L148 type RangeQueryBasedouble struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/rangequerybasestring.go b/typedapi/types/rangequerybasestring.go index 4b26094a59..0fde641542 100644 --- a/typedapi/types/rangequerybasestring.go +++ b/typedapi/types/rangequerybasestring.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // RangeQueryBasestring type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L109-L133 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L122-L148 type RangeQueryBasestring struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/rankcontainer.go b/typedapi/types/rankcontainer.go index bb6804dc81..42aa3fea12 100644 --- a/typedapi/types/rankcontainer.go +++ b/typedapi/types/rankcontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RankContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Rank.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Rank.ts#L22-L28 type RankContainer struct { // Rrf The reciprocal rank fusion parameters Rrf *RrfRank `json:"rrf,omitempty"` diff --git a/typedapi/types/rankeddocument.go b/typedapi/types/rankeddocument.go index cd3d43ff34..a710137edf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankedDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/_types/Results.ts#L67-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/_types/Results.ts#L67-L77 type RankedDocument struct { Index int `json:"index"` Score float32 `json:"score"` diff --git a/typedapi/types/rankevalhit.go b/typedapi/types/rankevalhit.go index cd134f7e4b..e725298a1b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankEvalHit type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L144-L148 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/rank_eval/types.ts#L144-L148 type RankEvalHit struct { Id_ string `json:"_id"` Index_ string `json:"_index"` diff --git a/typedapi/types/rankevalhititem.go b/typedapi/types/rankevalhititem.go index 6cca11ff19..1a28781ca7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RankEvalHitItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L139-L142 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/rank_eval/types.ts#L139-L142 type RankEvalHitItem struct { Hit RankEvalHit `json:"hit"` Rating *Float64 `json:"rating,omitempty"` diff --git a/typedapi/types/rankevalmetric.go b/typedapi/types/rankevalmetric.go index f0bce08b6b..036c47624a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RankEvalMetric type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L90-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/rank_eval/types.ts#L90-L96 type RankEvalMetric struct { Dcg *RankEvalMetricDiscountedCumulativeGain `json:"dcg,omitempty"` ExpectedReciprocalRank *RankEvalMetricExpectedReciprocalRank `json:"expected_reciprocal_rank,omitempty"` diff --git a/typedapi/types/rankevalmetricdetail.go b/typedapi/types/rankevalmetricdetail.go index 5421aad022..667d1cde1d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L128-L137 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/rankevalmetricdiscountedcumulativegain.go b/typedapi/types/rankevalmetricdiscountedcumulativegain.go index a04d7ca029..d79b11aa73 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricDiscountedCumulativeGain type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L66-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/rankevalmetricexpectedreciprocalrank.go b/typedapi/types/rankevalmetricexpectedreciprocalrank.go index f6ab9a4228..27908f2ca9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricExpectedReciprocalRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L79-L88 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/rankevalmetricmeanreciprocalrank.go b/typedapi/types/rankevalmetricmeanreciprocalrank.go index 02e0777ea4..20c6790859 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricMeanReciprocalRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L60-L64 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/rankevalmetricprecision.go b/typedapi/types/rankevalmetricprecision.go index 77fe859f5c..b86c5d16e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricPrecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L42-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/rankevalmetricratingtreshold.go b/typedapi/types/rankevalmetricratingtreshold.go index e2bae7cfc7..4b9e62847c 100644 --- a/typedapi/types/rankevalmetricratingtreshold.go +++ b/typedapi/types/rankevalmetricratingtreshold.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricRatingTreshold type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/rank_eval/types.ts#L34-L40 type RankEvalMetricRatingTreshold 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. diff --git a/typedapi/types/rankevalmetricrecall.go b/typedapi/types/rankevalmetricrecall.go index afc7189b8c..2092d85145 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricRecall type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L54-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/rankevalquery.go b/typedapi/types/rankevalquery.go index 25eef0223b..8e1c798522 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankEvalQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L111-L117 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/rank_eval/types.ts#L111-L117 type RankEvalQuery struct { Query Query `json:"query"` Size *int `json:"size,omitempty"` diff --git a/typedapi/types/rankevalrequestitem.go b/typedapi/types/rankevalrequestitem.go index c47770e27a..012efb3407 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RankEvalRequestItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L98-L109 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/rankfeaturefunction.go b/typedapi/types/rankfeaturefunction.go index c70a17411e..7d244f5d05 100644 --- a/typedapi/types/rankfeaturefunction.go +++ b/typedapi/types/rankfeaturefunction.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RankFeatureFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L273-L273 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L280-L280 type RankFeatureFunction struct { } diff --git a/typedapi/types/rankfeaturefunctionlinear.go b/typedapi/types/rankfeaturefunctionlinear.go index db946f6339..e403e5399b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RankFeatureFunctionLinear type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L275-L275 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L282-L282 type RankFeatureFunctionLinear struct { } diff --git a/typedapi/types/rankfeaturefunctionlogarithm.go b/typedapi/types/rankfeaturefunctionlogarithm.go index a0cea016c7..bc24de85fc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionLogarithm type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L277-L282 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L284-L289 type RankFeatureFunctionLogarithm struct { // ScalingFactor Configurable scaling factor. ScalingFactor float32 `json:"scaling_factor"` diff --git a/typedapi/types/rankfeaturefunctionsaturation.go b/typedapi/types/rankfeaturefunctionsaturation.go index 586209b849..a079332d7e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionSaturation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L284-L289 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/rankfeaturefunctionsigmoid.go b/typedapi/types/rankfeaturefunctionsigmoid.go index 51bfd05d3a..9348c5e219 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionSigmoid type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L291-L300 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L298-L307 type RankFeatureFunctionSigmoid struct { // Exponent Configurable Exponent. Exponent float32 `json:"exponent"` diff --git a/typedapi/types/rankfeatureproperty.go b/typedapi/types/rankfeatureproperty.go index 6c7b111aae..824a9eb8e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // RankFeatureProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L192-L195 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L192-L195 type RankFeatureProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/rankfeaturequery.go b/typedapi/types/rankfeaturequery.go index e63d625685..f2b70379cb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RankFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L302-L325 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/rankfeaturesproperty.go b/typedapi/types/rankfeaturesproperty.go index 6c4c7bfce1..699fccf477 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // RankFeaturesProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L197-L200 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L197-L200 type RankFeaturesProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/raretermsaggregation.go b/typedapi/types/raretermsaggregation.go index 8bc47bc5e4..fb5649c69a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RareTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L689-L719 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L706-L739 type RareTermsAggregation struct { // Exclude Terms that should be excluded from the aggregation. Exclude []string `json:"exclude,omitempty"` diff --git a/typedapi/types/rateaggregate.go b/typedapi/types/rateaggregate.go index 225faaf594..4512f3c1a4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RateAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L748-L752 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L847-L854 type RateAggregate struct { Meta Metadata `json:"meta,omitempty"` Value Float64 `json:"value"` diff --git a/typedapi/types/rateaggregation.go b/typedapi/types/rateaggregation.go index 6382e24793..4d086e7f9b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // RateAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L230-L241 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L239-L250 type RateAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/readexception.go b/typedapi/types/readexception.go index cf35c0f69e..826f5cac8b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ReadException type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ccr/_types/FollowIndexStats.ts#L71-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ccr/_types/FollowIndexStats.ts#L71-L75 type ReadException struct { Exception ErrorCause `json:"exception"` FromSeqNo int64 `json:"from_seq_no"` diff --git a/typedapi/types/readonlyurlrepository.go b/typedapi/types/readonlyurlrepository.go index 636f50f83b..9338f3ee86 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ReadOnlyUrlRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L60-L63 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L60-L63 type ReadOnlyUrlRepository struct { Settings ReadOnlyUrlRepositorySettings `json:"settings"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/readonlyurlrepositorysettings.go b/typedapi/types/readonlyurlrepositorysettings.go index 6f115c5be6..b1733aab9b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ReadOnlyUrlRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L110-L115 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L110-L115 type ReadOnlyUrlRepositorySettings struct { ChunkSize ByteSize `json:"chunk_size,omitempty"` Compress *bool `json:"compress,omitempty"` diff --git a/typedapi/types/realmcache.go b/typedapi/types/realmcache.go index 3f73a15772..9f3791f8d7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RealmCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L266-L268 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L264-L266 type RealmCache struct { Size int64 `json:"size"` } diff --git a/typedapi/types/realminfo.go b/typedapi/types/realminfo.go index 7c981c104e..c7eaa21af1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RealmInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/RealmInfo.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/RealmInfo.ts#L22-L25 type RealmInfo struct { Name string `json:"name"` Type string `json:"type"` diff --git a/typedapi/types/recording.go b/typedapi/types/recording.go index 341c39c977..b44b7f0b33 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Recording type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L225-L230 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L225-L230 type Recording struct { CumulativeExecutionCount *int64 `json:"cumulative_execution_count,omitempty"` CumulativeExecutionTime Duration `json:"cumulative_execution_time,omitempty"` diff --git a/typedapi/types/recoverybytes.go b/typedapi/types/recoverybytes.go index 95f9bb685f..9539b4d351 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RecoveryBytes type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/recovery/types.ts#L38-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/recovery/types.ts#L38-L48 type RecoveryBytes struct { Percent Percentage `json:"percent"` Recovered ByteSize `json:"recovered,omitempty"` diff --git a/typedapi/types/recoveryfiles.go b/typedapi/types/recoveryfiles.go index 4730d31719..1149defd01 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RecoveryFiles type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/recovery/types.ts#L56-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/recovery/types.ts#L56-L62 type RecoveryFiles struct { Details []FileDetails `json:"details,omitempty"` Percent Percentage `json:"percent"` diff --git a/typedapi/types/recoveryindexstatus.go b/typedapi/types/recoveryindexstatus.go index 2bbbe8815a..d21d619483 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RecoveryIndexStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/recovery/types.ts#L64-L74 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/recovery/types.ts#L64-L74 type RecoveryIndexStatus struct { Bytes *RecoveryBytes `json:"bytes,omitempty"` Files RecoveryFiles `json:"files"` diff --git a/typedapi/types/recoveryorigin.go b/typedapi/types/recoveryorigin.go index 43d5305133..43c81dce2a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RecoveryOrigin type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/recovery/types.ts#L76-L89 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/recovery/types.ts#L76-L89 type RecoveryOrigin struct { BootstrapNewHistoryUuid *bool `json:"bootstrap_new_history_uuid,omitempty"` Host *string `json:"host,omitempty"` diff --git a/typedapi/types/recoveryrecord.go b/typedapi/types/recoveryrecord.go index b41ac155c5..e5e6e48a83 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RecoveryRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/recovery/types.ts#L24-L155 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/recovery/types.ts#L24-L155 type RecoveryRecord struct { // Bytes The number of bytes to recover. Bytes *string `json:"bytes,omitempty"` diff --git a/typedapi/types/recoverystartstatus.go b/typedapi/types/recoverystartstatus.go index 0f8d55a9b2..6bfea3f44d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RecoveryStartStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/recovery/types.ts#L91-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/recoverystats.go b/typedapi/types/recoverystats.go index 8f85cf4c3e..3214e022a6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RecoveryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L228-L233 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L228-L233 type RecoveryStats struct { CurrentAsSource int64 `json:"current_as_source"` CurrentAsTarget int64 `json:"current_as_target"` diff --git a/typedapi/types/recoverystatus.go b/typedapi/types/recoverystatus.go index 34b49aaea0..49693764f3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RecoveryStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/recovery/types.ts#L98-L100 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/recovery/types.ts#L98-L100 type RecoveryStatus struct { Shards []ShardRecovery `json:"shards"` } diff --git a/typedapi/types/redact.go b/typedapi/types/redact.go new file mode 100644 index 0000000000..e79bedbd6f --- /dev/null +++ b/typedapi/types/redact.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// Redact type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/simulate/types.ts#L39-L44 +type Redact struct { + // IsRedacted_ indicates if document has been redacted + IsRedacted_ bool `json:"_is_redacted"` +} + +func (s *Redact) 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 "_is_redacted": + 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", "IsRedacted_", err) + } + s.IsRedacted_ = value + case bool: + s.IsRedacted_ = v + } + + } + } + return nil +} + +// NewRedact returns a Redact. +func NewRedact() *Redact { + r := &Redact{} + + return r +} diff --git a/typedapi/types/redactprocessor.go b/typedapi/types/redactprocessor.go new file mode 100644 index 0000000000..ba9ebebdec --- /dev/null +++ b/typedapi/types/redactprocessor.go @@ -0,0 +1,234 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RedactProcessor type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1279-L1320 +type RedactProcessor struct { + // Description Description of the processor. + // Useful for describing the purpose of the processor or its configuration. + Description *string `json:"description,omitempty"` + // Field The field to be redacted + Field string `json:"field"` + // If Conditionally execute the processor. + If *string `json:"if,omitempty"` + // IgnoreFailure Ignore failures for the processor. + IgnoreFailure *bool `json:"ignore_failure,omitempty"` + // IgnoreMissing If `true` and `field` does not exist or is `null`, the processor quietly + // exits without modifying the document. + IgnoreMissing *bool `json:"ignore_missing,omitempty"` + // OnFailure Handle failures for the processor. + OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + PatternDefinitions map[string]string `json:"pattern_definitions,omitempty"` + // Patterns A list of grok expressions to match and redact named captures with + Patterns []string `json:"patterns"` + // Prefix Start a redacted section with this token + Prefix *string `json:"prefix,omitempty"` + // SkipIfUnlicensed If `true` and the current license does not support running redact processors, + // then the processor quietly exits without modifying the document + SkipIfUnlicensed *bool `json:"skip_if_unlicensed,omitempty"` + // Suffix End a redacted section with this token + Suffix *string `json:"suffix,omitempty"` + // Tag Identifier for the processor. + // Useful for debugging and metrics. + Tag *string `json:"tag,omitempty"` + // TraceRedact If `true` then ingest metadata `_ingest._redact._is_redacted` is set to + // `true` if the document has been redacted + TraceRedact *bool `json:"trace_redact,omitempty"` +} + +func (s *RedactProcessor) 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 "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + case "field": + if err := dec.Decode(&s.Field); err != nil { + return fmt.Errorf("%s | %w", "Field", err) + } + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "ignore_failure": + 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", "IgnoreFailure", err) + } + s.IgnoreFailure = &value + case bool: + s.IgnoreFailure = &v + } + + case "ignore_missing": + 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", "IgnoreMissing", err) + } + s.IgnoreMissing = &value + case bool: + s.IgnoreMissing = &v + } + + case "on_failure": + if err := dec.Decode(&s.OnFailure); err != nil { + return fmt.Errorf("%s | %w", "OnFailure", err) + } + + case "pattern_definitions": + if s.PatternDefinitions == nil { + s.PatternDefinitions = make(map[string]string, 0) + } + if err := dec.Decode(&s.PatternDefinitions); err != nil { + return fmt.Errorf("%s | %w", "PatternDefinitions", err) + } + + case "patterns": + if err := dec.Decode(&s.Patterns); err != nil { + return fmt.Errorf("%s | %w", "Patterns", err) + } + + case "prefix": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Prefix", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Prefix = &o + + case "skip_if_unlicensed": + 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", "SkipIfUnlicensed", err) + } + s.SkipIfUnlicensed = &value + case bool: + s.SkipIfUnlicensed = &v + } + + case "suffix": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Suffix", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Suffix = &o + + case "tag": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Tag", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Tag = &o + + case "trace_redact": + 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", "TraceRedact", err) + } + s.TraceRedact = &value + case bool: + s.TraceRedact = &v + } + + } + } + return nil +} + +// NewRedactProcessor returns a RedactProcessor. +func NewRedactProcessor() *RedactProcessor { + r := &RedactProcessor{ + PatternDefinitions: make(map[string]string, 0), + } + + return r +} diff --git a/typedapi/types/refreshstats.go b/typedapi/types/refreshstats.go index aea151abc7..f27a8edfca 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RefreshStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L235-L242 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L235-L242 type RefreshStats struct { ExternalTotal int64 `json:"external_total"` ExternalTotalTimeInMillis int64 `json:"external_total_time_in_millis"` diff --git a/typedapi/types/regexoptions.go b/typedapi/types/regexoptions.go index cbc598ad00..e253e65ea8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RegexOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L183-L194 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L183-L194 type RegexOptions struct { // Flags Optional operators for the regular expression. Flags string `json:"flags,omitempty"` diff --git a/typedapi/types/regexpquery.go b/typedapi/types/regexpquery.go index 07bbf6545d..cd0cd262f1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RegexpQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L187-L217 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L203-L236 type RegexpQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/regexvalidation.go b/typedapi/types/regexvalidation.go index 5a5e477ea1..23d501dabf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RegexValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L78-L81 type RegexValidation struct { Constraint string `json:"constraint"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/registereddomainprocessor.go b/typedapi/types/registereddomainprocessor.go new file mode 100644 index 0000000000..da339f4f29 --- /dev/null +++ b/typedapi/types/registereddomainprocessor.go @@ -0,0 +1,162 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RegisteredDomainProcessor type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1322-L1338 +type RegisteredDomainProcessor struct { + // Description Description of the processor. + // Useful for describing the purpose of the processor or its configuration. + Description *string `json:"description,omitempty"` + // Field Field containing the source FQDN. + Field string `json:"field"` + // If Conditionally execute the processor. + If *string `json:"if,omitempty"` + // IgnoreFailure Ignore failures for the processor. + IgnoreFailure *bool `json:"ignore_failure,omitempty"` + // IgnoreMissing If true and any required fields are missing, the processor quietly exits + // without modifying the document. + IgnoreMissing *bool `json:"ignore_missing,omitempty"` + // OnFailure Handle failures for the processor. + OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // Tag Identifier for the processor. + // Useful for debugging and metrics. + Tag *string `json:"tag,omitempty"` + // TargetField Object field containing extracted domain components. If an empty string, + // the processor adds components to the document’s root. + TargetField *string `json:"target_field,omitempty"` +} + +func (s *RegisteredDomainProcessor) 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 "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + case "field": + if err := dec.Decode(&s.Field); err != nil { + return fmt.Errorf("%s | %w", "Field", err) + } + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "ignore_failure": + 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", "IgnoreFailure", err) + } + s.IgnoreFailure = &value + case bool: + s.IgnoreFailure = &v + } + + case "ignore_missing": + 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", "IgnoreMissing", err) + } + s.IgnoreMissing = &value + case bool: + s.IgnoreMissing = &v + } + + case "on_failure": + if err := dec.Decode(&s.OnFailure); err != nil { + return fmt.Errorf("%s | %w", "OnFailure", err) + } + + case "tag": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Tag", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Tag = &o + + case "target_field": + if err := dec.Decode(&s.TargetField); err != nil { + return fmt.Errorf("%s | %w", "TargetField", err) + } + + } + } + return nil +} + +// NewRegisteredDomainProcessor returns a RegisteredDomainProcessor. +func NewRegisteredDomainProcessor() *RegisteredDomainProcessor { + r := &RegisteredDomainProcessor{} + + return r +} diff --git a/typedapi/types/regressioninferenceoptions.go b/typedapi/types/regressioninferenceoptions.go index 34087d7661..2773a9df8f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RegressionInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L82-L91 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L82-L91 type RegressionInferenceOptions struct { // NumTopFeatureImportanceValues Specifies the maximum number of feature importance values per document. NumTopFeatureImportanceValues *int `json:"num_top_feature_importance_values,omitempty"` diff --git a/typedapi/types/reindexdestination.go b/typedapi/types/reindexdestination.go index 90c0ab6f0c..0381751b4a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // ReindexDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/reindex/types.ts#L39-L64 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/reindex/types.ts#L39-L64 type ReindexDestination struct { // Index The name of the data stream, index, or index alias you are copying to. Index string `json:"index"` diff --git a/typedapi/types/reindexnode.go b/typedapi/types/reindexnode.go index 9156c4d290..e93c1de3a3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // ReindexNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/reindex_rethrottle/types.ts#L33-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/reindex_rethrottle/types.ts#L33-L35 type ReindexNode struct { Attributes map[string]string `json:"attributes"` Host string `json:"host"` diff --git a/typedapi/types/reindexsource.go b/typedapi/types/reindexsource.go index ed76a2263e..557ac325a0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ReindexSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/reindex/types.ts#L66-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/reindex/types.ts#L66-L97 type ReindexSource struct { // Index The name of the data stream, index, or alias you are copying from. // Accepts a comma-separated list to reindex from multiple sources. diff --git a/typedapi/types/reindexstatus.go b/typedapi/types/reindexstatus.go index 9413686e18..2fa39d754e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ReindexStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/reindex_rethrottle/types.ts#L37-L85 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/reindextask.go b/typedapi/types/reindextask.go index 4bf44eb6c2..6cf374e2e9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ReindexTask type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/reindex_rethrottle/types.ts#L87-L98 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/reindex_rethrottle/types.ts#L87-L98 type ReindexTask struct { Action string `json:"action"` Cancellable bool `json:"cancellable"` diff --git a/typedapi/types/reloaddetails.go b/typedapi/types/reloaddetails.go index fb881978bf..26c1723fa6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ReloadDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/reload_search_analyzers/types.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/reload_search_analyzers/types.ts#L27-L31 type ReloadDetails struct { Index string `json:"index"` ReloadedAnalyzers []string `json:"reloaded_analyzers"` diff --git a/typedapi/types/reloadresult.go b/typedapi/types/reloadresult.go index 8fd285c374..112304c1d7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ReloadResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/reload_search_analyzers/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/reload_search_analyzers/types.ts#L22-L25 type ReloadResult struct { ReloadDetails []ReloadDetails `json:"reload_details"` Shards_ ShardStatistics `json:"_shards"` diff --git a/typedapi/types/relocationfailureinfo.go b/typedapi/types/relocationfailureinfo.go index b18666fdd3..c94aef7f03 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RelocationFailureInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Node.ts#L73-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Node.ts#L67-L69 type RelocationFailureInfo struct { FailedAttempts int `json:"failed_attempts"` } diff --git a/typedapi/types/remoteclusterprivileges.go b/typedapi/types/remoteclusterprivileges.go new file mode 100644 index 0000000000..33b53b18a0 --- /dev/null +++ b/typedapi/types/remoteclusterprivileges.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/remoteclusterprivilege" +) + +// RemoteClusterPrivileges type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L279-L291 +type RemoteClusterPrivileges struct { + // Clusters A list of cluster aliases to which the permissions in this entry apply. + Clusters []string `json:"clusters"` + // Privileges The cluster level privileges that owners of the role have on the remote + // cluster. + Privileges []remoteclusterprivilege.RemoteClusterPrivilege `json:"privileges"` +} + +func (s *RemoteClusterPrivileges) 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 "clusters": + 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", "Clusters", err) + } + + s.Clusters = append(s.Clusters, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Clusters); err != nil { + return fmt.Errorf("%s | %w", "Clusters", err) + } + } + + case "privileges": + if err := dec.Decode(&s.Privileges); err != nil { + return fmt.Errorf("%s | %w", "Privileges", err) + } + + } + } + return nil +} + +// NewRemoteClusterPrivileges returns a RemoteClusterPrivileges. +func NewRemoteClusterPrivileges() *RemoteClusterPrivileges { + r := &RemoteClusterPrivileges{} + + return r +} diff --git a/typedapi/types/remoteindicesprivileges.go b/typedapi/types/remoteindicesprivileges.go new file mode 100644 index 0000000000..4e2c42aa0d --- /dev/null +++ b/typedapi/types/remoteindicesprivileges.go @@ -0,0 +1,187 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/indexprivilege" +) + +// RemoteIndicesPrivileges type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L245-L277 +type RemoteIndicesPrivileges struct { + // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that + // cover restricted indices. Implicitly, restricted indices have limited + // privileges that can cause pattern tests to fail. If restricted indices are + // explicitly included in the `names` list, Elasticsearch checks privileges + // against these indices regardless of the value set for + // `allow_restricted_indices`. + AllowRestrictedIndices *bool `json:"allow_restricted_indices,omitempty"` + // Clusters A list of cluster aliases to which the permissions in this entry apply. + Clusters []string `json:"clusters"` + // FieldSecurity The document fields that the owners of the role have read access to. + FieldSecurity *FieldSecurity `json:"field_security,omitempty"` + // Names A list of indices (or index name patterns) to which the permissions in this + // entry apply. + Names []string `json:"names"` + // Privileges The index level privileges that owners of the role have on the specified + // indices. + Privileges []indexprivilege.IndexPrivilege `json:"privileges"` + // Query A search query that defines the documents the owners of the role have access + // to. A document within the specified indices must match this query for it to + // be accessible by the owners of the role. + Query IndicesPrivilegesQuery `json:"query,omitempty"` +} + +func (s *RemoteIndicesPrivileges) 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 "allow_restricted_indices": + 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", "AllowRestrictedIndices", err) + } + s.AllowRestrictedIndices = &value + case bool: + s.AllowRestrictedIndices = &v + } + + case "clusters": + 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", "Clusters", err) + } + + s.Clusters = append(s.Clusters, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Clusters); err != nil { + return fmt.Errorf("%s | %w", "Clusters", err) + } + } + + case "field_security": + if err := dec.Decode(&s.FieldSecurity); err != nil { + return fmt.Errorf("%s | %w", "FieldSecurity", err) + } + + case "names": + 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", "Names", err) + } + + s.Names = append(s.Names, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Names); err != nil { + return fmt.Errorf("%s | %w", "Names", err) + } + } + + case "privileges": + if err := dec.Decode(&s.Privileges); err != nil { + return fmt.Errorf("%s | %w", "Privileges", err) + } + + case "query": + message := json.RawMessage{} + if err := dec.Decode(&message); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + keyDec := json.NewDecoder(bytes.NewReader(message)) + query_field: + for { + t, err := keyDec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return fmt.Errorf("%s | %w", "Query", err) + } + + switch t { + + case "bool", "boosting", "combined_fields", "common", "constant_score", "dis_max", "distance_feature", "exists", "function_score", "fuzzy", "geo_bounding_box", "geo_distance", "geo_polygon", "geo_shape", "has_child", "has_parent", "ids", "intervals", "knn", "match", "match_all", "match_bool_prefix", "match_none", "match_phrase", "match_phrase_prefix", "more_like_this", "multi_match", "nested", "parent_id", "percolate", "pinned", "prefix", "query_string", "range", "rank_feature", "regexp", "rule", "script", "script_score", "semantic", "shape", "simple_query_string", "span_containing", "span_field_masking", "span_first", "span_multi", "span_near", "span_not", "span_or", "span_term", "span_within", "sparse_vector", "term", "terms", "terms_set", "text_expansion", "type", "weighted_tokens", "wildcard", "wrapper": + o := NewQuery() + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + s.Query = o + break query_field + + case "template": + o := NewRoleTemplateQuery() + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + s.Query = o + break query_field + + } + } + if s.Query == nil { + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&s.Query); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + } + + } + } + return nil +} + +// NewRemoteIndicesPrivileges returns a RemoteIndicesPrivileges. +func NewRemoteIndicesPrivileges() *RemoteIndicesPrivileges { + r := &RemoteIndicesPrivileges{} + + return r +} diff --git a/typedapi/types/remotesource.go b/typedapi/types/remotesource.go index 43a29927fd..b5f3dfc4f6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RemoteSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/reindex/types.ts#L99-L125 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/reindex/types.ts#L99-L125 type RemoteSource struct { // ConnectTimeout The remote connection timeout. // Defaults to 30 seconds. diff --git a/typedapi/types/removeaction.go b/typedapi/types/removeaction.go index da67d0e2b0..92ccbb2d4c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RemoveAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/update_aliases/types.ts#L97-L122 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/update_aliases/types.ts#L97-L122 type RemoveAction struct { // Alias Alias for the action. // Index alias names support date math. diff --git a/typedapi/types/removeduplicatestokenfilter.go b/typedapi/types/removeduplicatestokenfilter.go index a5d3f0fb61..687194d91a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RemoveDuplicatesTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L303-L305 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L302-L304 type RemoveDuplicatesTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/removeindexaction.go b/typedapi/types/removeindexaction.go index 6c7f045cc3..9076bd3d49 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RemoveIndexAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/update_aliases/types.ts#L124-L139 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/update_aliases/types.ts#L124-L139 type RemoveIndexAction struct { // Index Data stream or index for the action. // Supports wildcards (`*`). diff --git a/typedapi/types/removeprocessor.go b/typedapi/types/removeprocessor.go index 7e6c4f7c7c..6f00611af3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RemoveProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L941-L955 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1340-L1354 type RemoveProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/renameprocessor.go b/typedapi/types/renameprocessor.go index 80afe39241..ae950f7a5b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RenameProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L957-L973 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1356-L1372 type RenameProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/replicationaccess.go b/typedapi/types/replicationaccess.go new file mode 100644 index 0000000000..01a38902a3 --- /dev/null +++ b/typedapi/types/replicationaccess.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ReplicationAccess type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L418-L428 +type ReplicationAccess struct { + // AllowRestrictedIndices This needs to be set to true if the patterns in the names field should cover + // system indices. + AllowRestrictedIndices *bool `json:"allow_restricted_indices,omitempty"` + // Names A list of indices (or index name patterns) to which the permissions in this + // entry apply. + Names []string `json:"names"` +} + +func (s *ReplicationAccess) 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 "allow_restricted_indices": + 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", "AllowRestrictedIndices", err) + } + s.AllowRestrictedIndices = &value + case bool: + s.AllowRestrictedIndices = &v + } + + case "names": + 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", "Names", err) + } + + s.Names = append(s.Names, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Names); err != nil { + return fmt.Errorf("%s | %w", "Names", err) + } + } + + } + } + return nil +} + +// NewReplicationAccess returns a ReplicationAccess. +func NewReplicationAccess() *ReplicationAccess { + r := &ReplicationAccess{} + + return r +} diff --git a/typedapi/types/reportingemailattachment.go b/typedapi/types/reportingemailattachment.go index ef6371af13..e26bd14f51 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ReportingEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L224-L232 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L224-L232 type ReportingEmailAttachment struct { Inline *bool `json:"inline,omitempty"` Interval Duration `json:"interval,omitempty"` diff --git a/typedapi/types/repositoriesrecord.go b/typedapi/types/repositoriesrecord.go index fd7b8bde55..176d89e6b0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RepositoriesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/repositories/types.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/repositories/types.ts#L20-L31 type RepositoriesRecord struct { // Id The unique repository identifier. Id *string `json:"id,omitempty"` diff --git a/typedapi/types/repository.go b/typedapi/types/repository.go index 61db7a030d..fe4171fec0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,5 +29,5 @@ package types // ReadOnlyUrlRepository // SourceOnlyRepository // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L24-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L24-L34 type Repository any diff --git a/typedapi/types/repositoryintegrityindicator.go b/typedapi/types/repositoryintegrityindicator.go index 5282f9d4df..995760891d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // RepositoryIntegrityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L135-L139 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L136-L140 type RepositoryIntegrityIndicator struct { Details *RepositoryIntegrityIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/repositoryintegrityindicatordetails.go b/typedapi/types/repositoryintegrityindicatordetails.go index c2afa54390..199c333741 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RepositoryIntegrityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L140-L144 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L141-L145 type RepositoryIntegrityIndicatorDetails struct { Corrupted []string `json:"corrupted,omitempty"` CorruptedRepositories *int64 `json:"corrupted_repositories,omitempty"` diff --git a/typedapi/types/repositorylocation.go b/typedapi/types/repositorylocation.go index c6e8e076ec..895d62fe65 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RepositoryLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/RepositoryMeteringInformation.ts#L68-L74 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/RepositoryMeteringInformation.ts#L68-L74 type RepositoryLocation struct { BasePath string `json:"base_path"` // Bucket Bucket name (GCP, S3) diff --git a/typedapi/types/repositorymeteringinformation.go b/typedapi/types/repositorymeteringinformation.go index 0ee9b82719..517f3b7820 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RepositoryMeteringInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/RepositoryMeteringInformation.ts#L24-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/requestcachestats.go b/typedapi/types/requestcachestats.go index 42b1d140dc..27244abc60 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RequestCacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L244-L250 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L244-L250 type RequestCacheStats struct { Evictions int64 `json:"evictions"` HitCount int64 `json:"hit_count"` diff --git a/typedapi/types/requestcounts.go b/typedapi/types/requestcounts.go index 4a5c471656..85046c831a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RequestCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/RepositoryMeteringInformation.ts#L76-L103 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/RepositoryMeteringInformation.ts#L76-L103 type RequestCounts struct { // GetBlob Number of Get Blob requests (Azure) GetBlob *int64 `json:"GetBlob,omitempty"` diff --git a/typedapi/types/requestitem.go b/typedapi/types/requestitem.go index 25661b4968..6e378bba5e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // MultisearchHeader // TemplateConfig // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch_template/types.ts#L25-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch_template/types.ts#L25-L26 type RequestItem any diff --git a/typedapi/types/reroutedecision.go b/typedapi/types/reroutedecision.go index 61b22f7f5d..69e78f83c8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RerouteDecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/reroute/types.ts#L86-L90 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/reroute/types.ts#L86-L90 type RerouteDecision struct { Decider string `json:"decider"` Decision string `json:"decision"` diff --git a/typedapi/types/rerouteexplanation.go b/typedapi/types/rerouteexplanation.go index fbb0752c08..abe97badb1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RerouteExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/reroute/types.ts#L92-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/reroute/types.ts#L92-L96 type RerouteExplanation struct { Command string `json:"command"` Decisions []RerouteDecision `json:"decisions"` diff --git a/typedapi/types/rerouteparameters.go b/typedapi/types/rerouteparameters.go index b3bb346a20..d42e0401e9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RerouteParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/reroute/types.ts#L98-L105 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/reroute/types.ts#L98-L105 type RerouteParameters struct { AllowPrimary bool `json:"allow_primary"` FromNode *string `json:"from_node,omitempty"` diff --git a/typedapi/types/rerouteprocessor.go b/typedapi/types/rerouteprocessor.go index 8eec914358..734ebbcc05 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RerouteProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L975-L1003 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1374-L1402 type RerouteProcessor struct { // Dataset Field references or a static value for the dataset part of the data stream // name. diff --git a/typedapi/types/rescore.go b/typedapi/types/rescore.go index 3bd62282e2..bf4df3618c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Rescore type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/rescoring.ts#L25-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/rescoring.ts#L25-L38 type Rescore struct { LearningToRank *LearningToRank `json:"learning_to_rank,omitempty"` Query *RescoreQuery `json:"query,omitempty"` diff --git a/typedapi/types/rescorequery.go b/typedapi/types/rescorequery.go index 9d81908e34..88c4e4d7b8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // RescoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/rescoring.ts#L40-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/reservedsize.go b/typedapi/types/reservedsize.go index ed6d6245f6..af16738f79 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ReservedSize type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L71-L76 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/types.ts#L72-L77 type ReservedSize struct { NodeId string `json:"node_id"` Path string `json:"path"` diff --git a/typedapi/types/resolveclusterinfo.go b/typedapi/types/resolveclusterinfo.go index 35711e21b7..43e2c16c51 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ResolveClusterInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L29-L55 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/resolveindexaliasitem.go b/typedapi/types/resolveindexaliasitem.go index 123a069e72..7b61b757c3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ResolveIndexAliasItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/resolve_index/ResolveIndexResponse.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/resolve_index/ResolveIndexResponse.ts#L37-L40 type ResolveIndexAliasItem struct { Indices []string `json:"indices"` Name string `json:"name"` diff --git a/typedapi/types/resolveindexdatastreamsitem.go b/typedapi/types/resolveindexdatastreamsitem.go index 43c617f36d..c4a9646464 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ResolveIndexDataStreamsItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/resolve_index/ResolveIndexResponse.ts#L42-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/resolve_index/ResolveIndexResponse.ts#L42-L46 type ResolveIndexDataStreamsItem struct { BackingIndices []string `json:"backing_indices"` Name string `json:"name"` diff --git a/typedapi/types/resolveindexitem.go b/typedapi/types/resolveindexitem.go index 6db3662ab6..dc89e41752 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ResolveIndexItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/resolve_index/ResolveIndexResponse.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/resolve_index/ResolveIndexResponse.ts#L30-L35 type ResolveIndexItem struct { Aliases []string `json:"aliases,omitempty"` Attributes []string `json:"attributes"` diff --git a/typedapi/types/resourceprivileges.go b/typedapi/types/resourceprivileges.go index c608d8ff2e..7ee225a606 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ResourcePrivileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/has_privileges/types.ts#L47-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/has_privileges/types.ts#L47-L47 type ResourcePrivileges map[string]Privileges diff --git a/typedapi/types/responsebody.go b/typedapi/types/responsebody.go index 212baacca8..0f50510825 100644 --- a/typedapi/types/responsebody.go +++ b/typedapi/types/responsebody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // ResponseBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/SearchResponse.ts#L38-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/SearchResponse.ts#L38-L54 type ResponseBody struct { Aggregations map[string]Aggregate `json:"aggregations,omitempty"` Clusters_ *ClusterStatistics `json:"_clusters,omitempty"` @@ -493,6 +493,13 @@ func (s *ResponseBody) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/responseitem.go b/typedapi/types/responseitem.go index c744da5d29..2bfd4a0c20 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ResponseItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/bulk/types.ts#L37-L81 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/bulk/types.ts#L37-L81 type ResponseItem struct { // Error Contains additional information about the failed operation. // The parameter is only returned for failed operations. diff --git a/typedapi/types/restriction.go b/typedapi/types/restriction.go new file mode 100644 index 0000000000..3cded93e57 --- /dev/null +++ b/typedapi/types/restriction.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/restrictionworkflow" +) + +// Restriction type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/RoleDescriptor.ts#L130-L132 +type Restriction struct { + Workflows []restrictionworkflow.RestrictionWorkflow `json:"workflows"` +} + +// NewRestriction returns a Restriction. +func NewRestriction() *Restriction { + r := &Restriction{} + + return r +} diff --git a/typedapi/types/retention.go b/typedapi/types/retention.go index 0c156ca371..e42e0e0c86 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Retention type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/_types/SnapshotLifecycle.ts#L84-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/_types/SnapshotLifecycle.ts#L84-L97 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. diff --git a/typedapi/types/retentionlease.go b/typedapi/types/retentionlease.go index bd3f38eb01..e557162fdf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RetentionLease type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L65-L67 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L65-L67 type RetentionLease struct { Period Duration `json:"period"` } diff --git a/typedapi/types/retentionpolicy.go b/typedapi/types/retentionpolicy.go index 6d8aa65776..940910526c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RetentionPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/_types/Transform.ts#L88-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/retentionpolicycontainer.go b/typedapi/types/retentionpolicycontainer.go index 5d3e03d16c..2da8f149bf 100644 --- a/typedapi/types/retentionpolicycontainer.go +++ b/typedapi/types/retentionpolicycontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RetentionPolicyContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/_types/Transform.ts#L80-L86 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/_types/Transform.ts#L80-L86 type RetentionPolicyContainer struct { // Time Specifies that the transform uses a time field to set the retention policy. Time *RetentionPolicy `json:"time,omitempty"` diff --git a/typedapi/types/retries.go b/typedapi/types/retries.go index fd635a7b3b..e57392c4c5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Retries type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Retries.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Retries.ts#L22-L25 type Retries struct { Bulk int64 `json:"bulk"` Search int64 `json:"search"` diff --git a/typedapi/types/retrievercontainer.go b/typedapi/types/retrievercontainer.go index dd5ad002a4..d43cce1a18 100644 --- a/typedapi/types/retrievercontainer.go +++ b/typedapi/types/retrievercontainer.go @@ -16,20 +16,25 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RetrieverContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Retriever.ts#L26-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Retriever.ts#L28-L42 type RetrieverContainer struct { // Knn A retriever that replaces the functionality of a knn search. Knn *KnnRetriever `json:"knn,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. + Rule *RuleRetriever `json:"rule,omitempty"` // Standard A retriever that replaces the functionality of a traditional query. Standard *StandardRetriever `json:"standard,omitempty"` + // TextSimilarityReranker A retriever that reranks the top documents based on a reranking model using + // the InferenceAPI + TextSimilarityReranker *TextSimilarityReranker `json:"text_similarity_reranker,omitempty"` } // NewRetrieverContainer returns a RetrieverContainer. diff --git a/typedapi/types/reversenestedaggregate.go b/typedapi/types/reversenestedaggregate.go index d9d5f95447..72b3326731 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // ReverseNestedAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L493-L494 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L540-L544 type ReverseNestedAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *ReverseNestedAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/reversenestedaggregation.go b/typedapi/types/reversenestedaggregation.go index 6a47d4c1b8..785dfbb907 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ReverseNestedAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L721-L727 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/reversetokenfilter.go b/typedapi/types/reversetokenfilter.go index 0e629d5cd8..a71d253542 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ReverseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L307-L309 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L306-L308 type ReverseTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/role.go b/typedapi/types/role.go index ffa568fafd..c0ca35059b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,17 +26,21 @@ import ( "errors" "fmt" "io" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/clusterprivilege" ) // Role type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_role/types.ts#L29-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_role/types.ts#L32-L53 type Role struct { Applications []ApplicationPrivileges `json:"applications"` - Cluster []string `json:"cluster"` + Cluster []clusterprivilege.ClusterPrivilege `json:"cluster"` Global map[string]map[string]map[string][]string `json:"global,omitempty"` Indices []IndicesPrivileges `json:"indices"` Metadata Metadata `json:"metadata"` + RemoteCluster []RemoteClusterPrivileges `json:"remote_cluster,omitempty"` + RemoteIndices []RemoteIndicesPrivileges `json:"remote_indices,omitempty"` RoleTemplates []RoleTemplate `json:"role_templates,omitempty"` RunAs []string `json:"run_as"` TransientMetadata map[string]json.RawMessage `json:"transient_metadata,omitempty"` @@ -85,6 +89,16 @@ func (s *Role) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Metadata", err) } + case "remote_cluster": + if err := dec.Decode(&s.RemoteCluster); err != nil { + return fmt.Errorf("%s | %w", "RemoteCluster", err) + } + + case "remote_indices": + if err := dec.Decode(&s.RemoteIndices); err != nil { + return fmt.Errorf("%s | %w", "RemoteIndices", err) + } + case "role_templates": if err := dec.Decode(&s.RoleTemplates); err != nil { return fmt.Errorf("%s | %w", "RoleTemplates", err) diff --git a/typedapi/types/roledescriptor.go b/typedapi/types/roledescriptor.go index 1f872ac923..7ea2287d5f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // RoleDescriptor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/RoleDescriptor.ts#L28-L61 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/RoleDescriptor.ts#L33-L80 type RoleDescriptor struct { // Applications A list of application privilege entries Applications []ApplicationPrivileges `json:"applications,omitempty"` @@ -51,6 +51,13 @@ type RoleDescriptor struct { // Metadata Optional meta-data. Within the metadata object, keys that begin with `_` are // reserved for system usage. Metadata Metadata `json:"metadata,omitempty"` + // RemoteCluster A list of cluster permissions for remote clusters. Note - this is limited a + // subset of the cluster permissions. + RemoteCluster []RemoteClusterPrivileges `json:"remote_cluster,omitempty"` + // RemoteIndices A list of indices permissions for remote clusters. + RemoteIndices []RemoteIndicesPrivileges `json:"remote_indices,omitempty"` + // Restriction Restriction for when the role descriptor is allowed to be effective. + Restriction *Restriction `json:"restriction,omitempty"` // RunAs A list of users that the API keys can impersonate. *Note*: in Serverless, the // run-as feature is disabled. For API compatibility, you can still specify an // empty `run_as` field, but a non-empty list will be rejected. @@ -121,6 +128,21 @@ func (s *RoleDescriptor) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Metadata", err) } + case "remote_cluster": + if err := dec.Decode(&s.RemoteCluster); err != nil { + return fmt.Errorf("%s | %w", "RemoteCluster", err) + } + + case "remote_indices": + if err := dec.Decode(&s.RemoteIndices); err != nil { + return fmt.Errorf("%s | %w", "RemoteIndices", err) + } + + case "restriction": + if err := dec.Decode(&s.Restriction); err != nil { + return fmt.Errorf("%s | %w", "Restriction", err) + } + case "run_as": if err := dec.Decode(&s.RunAs); err != nil { return fmt.Errorf("%s | %w", "RunAs", err) diff --git a/typedapi/types/roledescriptorread.go b/typedapi/types/roledescriptorread.go index 5cb50fec8b..60f1962183 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // RoleDescriptorRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/RoleDescriptor.ts#L63-L95 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/RoleDescriptor.ts#L82-L128 type RoleDescriptorRead struct { // Applications A list of application privilege entries Applications []ApplicationPrivileges `json:"applications,omitempty"` @@ -51,6 +51,13 @@ type RoleDescriptorRead struct { // Metadata Optional meta-data. Within the metadata object, keys that begin with `_` are // reserved for system usage. Metadata Metadata `json:"metadata,omitempty"` + // RemoteCluster A list of cluster permissions for remote clusters. Note - this is limited a + // subset of the cluster permissions. + RemoteCluster []RemoteClusterPrivileges `json:"remote_cluster,omitempty"` + // RemoteIndices A list of indices permissions for remote clusters. + RemoteIndices []RemoteIndicesPrivileges `json:"remote_indices,omitempty"` + // Restriction Restriction for when the role descriptor is allowed to be effective. + Restriction *Restriction `json:"restriction,omitempty"` // RunAs A list of users that the API keys can impersonate. RunAs []string `json:"run_as,omitempty"` TransientMetadata map[string]json.RawMessage `json:"transient_metadata,omitempty"` @@ -119,6 +126,21 @@ func (s *RoleDescriptorRead) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Metadata", err) } + case "remote_cluster": + if err := dec.Decode(&s.RemoteCluster); err != nil { + return fmt.Errorf("%s | %w", "RemoteCluster", err) + } + + case "remote_indices": + if err := dec.Decode(&s.RemoteIndices); err != nil { + return fmt.Errorf("%s | %w", "RemoteIndices", err) + } + + case "restriction": + if err := dec.Decode(&s.Restriction); err != nil { + return fmt.Errorf("%s | %w", "Restriction", err) + } + case "run_as": if err := dec.Decode(&s.RunAs); err != nil { return fmt.Errorf("%s | %w", "RunAs", err) diff --git a/typedapi/types/roledescriptorwrapper.go b/typedapi/types/roledescriptorwrapper.go index a497e87a05..547e4738f7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RoleDescriptorWrapper type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_service_accounts/types.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_service_accounts/types.ts#L22-L24 type RoleDescriptorWrapper struct { RoleDescriptor RoleDescriptorRead `json:"role_descriptor"` } diff --git a/typedapi/types/rolemappingrule.go b/typedapi/types/rolemappingrule.go index 94e6b51abb..af1647c706 100644 --- a/typedapi/types/rolemappingrule.go +++ b/typedapi/types/rolemappingrule.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RoleMappingRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/RoleMappingRule.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/RoleMappingRule.ts#L22-L33 type RoleMappingRule struct { All []RoleMappingRule `json:"all,omitempty"` Any []RoleMappingRule `json:"any,omitempty"` diff --git a/typedapi/types/rolequerycontainer.go b/typedapi/types/rolequerycontainer.go index 744f26ae2a..ed084c46ce 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RoleQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_role/types.ts#L37-L101 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/query_role/types.ts#L37-L101 type RoleQueryContainer struct { // Bool matches roles matching boolean combinations of other queries. Bool *BoolQuery `json:"bool,omitempty"` diff --git a/typedapi/types/roletemplate.go b/typedapi/types/roletemplate.go index 8a75ed6ceb..df9d2eeb76 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // RoleTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/RoleTemplate.ts#L28-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/RoleTemplate.ts#L28-L31 type RoleTemplate struct { Format *templateformat.TemplateFormat `json:"format,omitempty"` Template Script `json:"template"` diff --git a/typedapi/types/roletemplateinlinequery.go b/typedapi/types/roletemplateinlinequery.go index 67b0a9f426..5377a3859f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // Query // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L289-L290 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L359-L360 type RoleTemplateInlineQuery any diff --git a/typedapi/types/roletemplatequery.go b/typedapi/types/roletemplatequery.go index d44ce52c1d..34e79dd820 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RoleTemplateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L257-L267 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L327-L337 type RoleTemplateQuery struct { // Template When you create a role, you can specify a query that defines the document // level security permissions. You can optionally diff --git a/typedapi/types/roletemplatescript.go b/typedapi/types/roletemplatescript.go index 57dcd77eec..9d1024bc87 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // RoleTemplateScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L269-L287 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L339-L357 type RoleTemplateScript struct { // Id The `id` for a stored script. Id *string `json:"id,omitempty"` diff --git a/typedapi/types/rolloveraction.go b/typedapi/types/rolloveraction.go index 5a57abfcfe..9f0dc3609c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RolloverAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L102-L113 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L102-L113 type RolloverAction struct { MaxAge Duration `json:"max_age,omitempty"` MaxDocs *int64 `json:"max_docs,omitempty"` diff --git a/typedapi/types/rolloverconditions.go b/typedapi/types/rolloverconditions.go index 49a824cc99..a52019bbbd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RolloverConditions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/rollover/types.ts#L24-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/rollover/types.ts#L24-L40 type RolloverConditions struct { MaxAge Duration `json:"max_age,omitempty"` MaxAgeMillis *int64 `json:"max_age_millis,omitempty"` diff --git a/typedapi/types/rollupcapabilities.go b/typedapi/types/rollupcapabilities.go index 080c8415bb..09949fcf3a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RollupCapabilities type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_rollup_caps/types.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/get_rollup_caps/types.ts#L24-L26 type RollupCapabilities struct { RollupJobs []RollupCapabilitySummary `json:"rollup_jobs"` } diff --git a/typedapi/types/rollupcapabilitysummary.go b/typedapi/types/rollupcapabilitysummary.go index a013c571d2..8715c92256 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RollupCapabilitySummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_rollup_caps/types.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/get_rollup_caps/types.ts#L28-L33 type RollupCapabilitySummary struct { Fields map[string][]RollupFieldSummary `json:"fields"` IndexPattern string `json:"index_pattern"` diff --git a/typedapi/types/rollupfieldsummary.go b/typedapi/types/rollupfieldsummary.go index b93b5a59ee..716ba3b303 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RollupFieldSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_rollup_caps/types.ts#L36-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/get_rollup_caps/types.ts#L35-L39 type RollupFieldSummary struct { Agg string `json:"agg"` CalendarInterval Duration `json:"calendar_interval,omitempty"` diff --git a/typedapi/types/rollupjob.go b/typedapi/types/rollupjob.go index 87d4ec89df..77cc04b892 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RollupJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_jobs/types.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/get_jobs/types.ts#L28-L32 type RollupJob struct { Config RollupJobConfiguration `json:"config"` Stats RollupJobStats `json:"stats"` diff --git a/typedapi/types/rollupjobconfiguration.go b/typedapi/types/rollupjobconfiguration.go index 3594706410..bf871be87a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RollupJobConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_jobs/types.ts#L34-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/get_jobs/types.ts#L34-L43 type RollupJobConfiguration struct { Cron string `json:"cron"` Groups Groupings `json:"groups"` diff --git a/typedapi/types/rollupjobstats.go b/typedapi/types/rollupjobstats.go index 6edfe417c6..8c69d3bfbf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RollupJobStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_jobs/types.ts#L45-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/get_jobs/types.ts#L45-L58 type RollupJobStats struct { DocumentsProcessed int64 `json:"documents_processed"` IndexFailures int64 `json:"index_failures"` diff --git a/typedapi/types/rollupjobstatus.go b/typedapi/types/rollupjobstatus.go index 0b03c8fef9..c51793a9da 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // RollupJobStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_jobs/types.ts#L60-L64 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/get_jobs/types.ts#L60-L64 type RollupJobStatus struct { CurrentPosition map[string]json.RawMessage `json:"current_position,omitempty"` JobState indexingjobstate.IndexingJobState `json:"job_state"` diff --git a/typedapi/types/rollupjobsummary.go b/typedapi/types/rollupjobsummary.go index e83be14220..b809e16ff3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RollupJobSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_rollup_index_caps/types.ts#L28-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/get_rollup_index_caps/types.ts#L28-L33 type RollupJobSummary struct { Fields map[string][]RollupJobSummaryField `json:"fields"` IndexPattern string `json:"index_pattern"` diff --git a/typedapi/types/rollupjobsummaryfield.go b/typedapi/types/rollupjobsummaryfield.go index e5cb0f551a..5d99e36d3a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RollupJobSummaryField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/get_rollup_index_caps/types.ts#L35-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/rollup/get_rollup_index_caps/types.ts#L35-L39 type RollupJobSummaryField struct { Agg string `json:"agg"` CalendarInterval Duration `json:"calendar_interval,omitempty"` diff --git a/typedapi/types/romaniananalyzer.go b/typedapi/types/romaniananalyzer.go new file mode 100644 index 0000000000..fe5c8552fd --- /dev/null +++ b/typedapi/types/romaniananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RomanianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L257-L262 +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"` +} + +func (s *RomanianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 RomanianAnalyzer) MarshalJSON() ([]byte, error) { + type innerRomanianAnalyzer RomanianAnalyzer + tmp := innerRomanianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "romanian" + + return json.Marshal(tmp) +} + +// NewRomanianAnalyzer returns a RomanianAnalyzer. +func NewRomanianAnalyzer() *RomanianAnalyzer { + r := &RomanianAnalyzer{} + + return r +} diff --git a/typedapi/types/routingfield.go b/typedapi/types/routingfield.go index 617c758782..29b4ac2d6c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RoutingField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/meta-fields.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/meta-fields.ts#L50-L52 type RoutingField struct { Required bool `json:"required"` } diff --git a/typedapi/types/rrfrank.go b/typedapi/types/rrfrank.go index 93a13af9e1..eaa83ff40a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RrfRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Rank.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/rrfretriever.go b/typedapi/types/rrfretriever.go index 354cf5c92d..b7fac72244 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,10 +31,13 @@ import ( // RRFRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Retriever.ts#L73-L80 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Retriever.ts#L79-L86 type RRFRetriever 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"` // 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"` @@ -76,6 +79,22 @@ func (s *RRFRetriever) UnmarshalJSON(data []byte) error { } } + 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 "rank_constant": var tmp any diff --git a/typedapi/types/rulecondition.go b/typedapi/types/rulecondition.go index 6e01bd2cc1..832ac33679 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // RuleCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Rule.ts#L52-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/rulequery.go b/typedapi/types/rulequery.go index 6814b365d5..d8883538ac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RuleQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L381-L385 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L398-L405 type RuleQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/ruleretriever.go b/typedapi/types/ruleretriever.go new file mode 100644 index 0000000000..65193f6d28 --- /dev/null +++ b/typedapi/types/ruleretriever.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RuleRetriever type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Retriever.ts#L101-L110 +type RuleRetriever struct { + // Filter Query to filter the documents that can match. + Filter []Query `json:"filter,omitempty"` + // MatchCriteria The match criteria that will determine if a rule in the provided rulesets + // should be applied. + MatchCriteria json.RawMessage `json:"match_criteria,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"` + // 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. + Retriever *RetrieverContainer `json:"retriever,omitempty"` + // RulesetIds The ruleset IDs containing the rules this retriever is evaluating against. + RulesetIds []string `json:"ruleset_ids"` +} + +func (s *RuleRetriever) 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 "match_criteria": + if err := dec.Decode(&s.MatchCriteria); err != nil { + return fmt.Errorf("%s | %w", "MatchCriteria", 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 "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) + } + + case "ruleset_ids": + if err := dec.Decode(&s.RulesetIds); err != nil { + return fmt.Errorf("%s | %w", "RulesetIds", err) + } + + } + } + return nil +} + +// NewRuleRetriever returns a RuleRetriever. +func NewRuleRetriever() *RuleRetriever { + r := &RuleRetriever{} + + return r +} diff --git a/typedapi/types/runningstatesearchinterval.go b/typedapi/types/runningstatesearchinterval.go index 6354e288f6..1b0e9faf83 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // RunningStateSearchInterval type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Datafeed.ts#L213-L230 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/Datafeed.ts#L226-L243 type RunningStateSearchInterval struct { // End The end time. End Duration `json:"end,omitempty"` diff --git a/typedapi/types/runtimefield.go b/typedapi/types/runtimefield.go index 37e9edffe6..448067d5cc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,10 +33,12 @@ import ( // RuntimeField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/RuntimeFields.ts#L26-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/RuntimeFields.ts#L26-L50 type RuntimeField struct { // FetchFields For type `lookup` FetchFields []RuntimeFieldFetchFields `json:"fetch_fields,omitempty"` + // Fields For type `composite` + Fields map[string]CompositeSubField `json:"fields,omitempty"` // Format A custom format for `date` type runtime fields. Format *string `json:"format,omitempty"` // InputField For type `lookup` @@ -72,6 +74,14 @@ func (s *RuntimeField) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "FetchFields", err) } + case "fields": + if s.Fields == nil { + s.Fields = make(map[string]CompositeSubField, 0) + } + if err := dec.Decode(&s.Fields); err != nil { + return fmt.Errorf("%s | %w", "Fields", err) + } + case "format": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { @@ -116,7 +126,9 @@ func (s *RuntimeField) UnmarshalJSON(data []byte) error { // NewRuntimeField returns a RuntimeField. func NewRuntimeField() *RuntimeField { - r := &RuntimeField{} + r := &RuntimeField{ + Fields: make(map[string]CompositeSubField, 0), + } return r } diff --git a/typedapi/types/runtimefieldfetchfields.go b/typedapi/types/runtimefieldfetchfields.go index b2526515d6..424d435fc0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RuntimeFieldFetchFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/RuntimeFields.ts#L50-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/RuntimeFields.ts#L56-L60 type RuntimeFieldFetchFields struct { Field string `json:"field"` Format *string `json:"format,omitempty"` diff --git a/typedapi/types/runtimefields.go b/typedapi/types/runtimefields.go index f0d33e2562..8fc7fc307f 100644 --- a/typedapi/types/runtimefields.go +++ b/typedapi/types/runtimefields.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // RuntimeFields type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/RuntimeFields.ts#L24-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/RuntimeFields.ts#L24-L24 type RuntimeFields map[string]RuntimeField diff --git a/typedapi/types/runtimefieldstype.go b/typedapi/types/runtimefieldstype.go index b797b490c8..f93fe368e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // RuntimeFieldsType type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L279-L294 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L277-L292 type RuntimeFieldsType struct { CharsMax int64 `json:"chars_max"` CharsTotal int64 `json:"chars_total"` diff --git a/typedapi/types/russiananalyzer.go b/typedapi/types/russiananalyzer.go new file mode 100644 index 0000000000..aea35835ea --- /dev/null +++ b/typedapi/types/russiananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RussianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L264-L269 +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"` +} + +func (s *RussianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 RussianAnalyzer) MarshalJSON() ([]byte, error) { + type innerRussianAnalyzer RussianAnalyzer + tmp := innerRussianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "russian" + + return json.Marshal(tmp) +} + +// NewRussianAnalyzer returns a RussianAnalyzer. +func NewRussianAnalyzer() *RussianAnalyzer { + r := &RussianAnalyzer{} + + return r +} diff --git a/typedapi/types/s3repository.go b/typedapi/types/s3repository.go index 4b4915ab76..aacbb00ea6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // S3Repository type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L50-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L50-L53 type S3Repository struct { Settings S3RepositorySettings `json:"settings"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/s3repositorysettings.go b/typedapi/types/s3repositorysettings.go index 7afd61183c..d2d452ebf2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // S3RepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L93-L102 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L93-L102 type S3RepositorySettings struct { BasePath *string `json:"base_path,omitempty"` Bucket string `json:"bucket"` diff --git a/typedapi/types/samplediversity.go b/typedapi/types/samplediversity.go index 8e0c713660..d141e5df24 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SampleDiversity type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/graph/_types/ExploreControls.ts#L51-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/graph/_types/ExploreControls.ts#L51-L54 type SampleDiversity struct { Field string `json:"field"` MaxDocsPerValue int `json:"max_docs_per_value"` diff --git a/typedapi/types/sampleraggregate.go b/typedapi/types/sampleraggregate.go index 4a534c73df..2ae4b5a5a0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // SamplerAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L502-L503 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L558-L559 type SamplerAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *SamplerAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/sampleraggregation.go b/typedapi/types/sampleraggregation.go index 5f5a57e95b..22ee7f5b82 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SamplerAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L729-L735 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/scalarvalue.go b/typedapi/types/scalarvalue.go index 7942d07c57..548c41774f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -28,5 +28,5 @@ package types // bool // nil // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L39-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L39-L43 type ScalarValue any diff --git a/typedapi/types/scaledfloatnumberproperty.go b/typedapi/types/scaledfloatnumberproperty.go index bff70618dc..be6f77383e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // ScaledFloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L182-L186 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L182-L186 type ScaledFloatNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -53,7 +53,6 @@ type ScaledFloatNumberProperty struct { Properties map[string]Property `json:"properties,omitempty"` ScalingFactor *Float64 `json:"scaling_factor,omitempty"` Script *Script `json:"script,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` // TimeSeriesDimension For internal use by Elastic only. Marks the field as a time series dimension. // Defaults to false. @@ -876,18 +875,6 @@ func (s *ScaledFloatNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Script", err) } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -950,7 +937,6 @@ func (s ScaledFloatNumberProperty) MarshalJSON() ([]byte, error) { Properties: s.Properties, ScalingFactor: s.ScalingFactor, Script: s.Script, - Similarity: s.Similarity, Store: s.Store, TimeSeriesDimension: s.TimeSeriesDimension, TimeSeriesMetric: s.TimeSeriesMetric, diff --git a/typedapi/types/schedulecontainer.go b/typedapi/types/schedulecontainer.go index 1c98d87ab1..7486c735d2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ScheduleContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Schedule.ts#L80-L91 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Schedule.ts#L80-L91 type ScheduleContainer struct { Cron *string `json:"cron,omitempty"` Daily *DailySchedule `json:"daily,omitempty"` diff --git a/typedapi/types/scheduletimeofday.go b/typedapi/types/scheduletimeofday.go index bedd67ac4d..e582ea3bd4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // HourAndMinute // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Schedule.ts#L98-L103 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Schedule.ts#L98-L103 type ScheduleTimeOfDay any diff --git a/typedapi/types/scheduletriggerevent.go b/typedapi/types/scheduletriggerevent.go index f9d03bd250..3239b0d905 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ScheduleTriggerEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Schedule.ts#L93-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Schedule.ts#L93-L96 type ScheduleTriggerEvent struct { ScheduledTime DateTime `json:"scheduled_time"` TriggeredTime DateTime `json:"triggered_time,omitempty"` diff --git a/typedapi/types/schedulingconfiguration.go b/typedapi/types/schedulingconfiguration.go index 27785359b0..746afd4490 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SchedulingConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L231-L235 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L231-L235 type SchedulingConfiguration struct { AccessControl *ConnectorScheduling `json:"access_control,omitempty"` Full *ConnectorScheduling `json:"full,omitempty"` diff --git a/typedapi/types/scoresort.go b/typedapi/types/scoresort.go index 9b04d31850..171069d193 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // ScoreSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L55-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/sort.ts#L54-L56 type ScoreSort struct { Order *sortorder.SortOrder `json:"order,omitempty"` } diff --git a/typedapi/types/script.go b/typedapi/types/script.go index 0a2e5d3837..16eedb5cfc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // Script type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Scripting.ts#L73-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Scripting.ts#L73-L97 type Script struct { // Id The `id` for a stored script. Id *string `json:"id,omitempty"` diff --git a/typedapi/types/scriptcache.go b/typedapi/types/scriptcache.go index f78540129a..ad352d7da5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ScriptCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L1031-L1045 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L1102-L1116 type ScriptCache struct { // CacheEvictions Total number of times the script cache has evicted old data. CacheEvictions *int64 `json:"cache_evictions,omitempty"` diff --git a/typedapi/types/scriptcondition.go b/typedapi/types/scriptcondition.go index 7ee89b9bbc..f510c58b28 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ScriptCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Conditions.ts#L79-L87 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Conditions.ts#L79-L87 type ScriptCondition struct { Id *string `json:"id,omitempty"` Lang *string `json:"lang,omitempty"` diff --git a/typedapi/types/scriptedheuristic.go b/typedapi/types/scriptedheuristic.go index 5ec9492b28..362b872018 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ScriptedHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L768-L770 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L813-L815 type ScriptedHeuristic struct { Script Script `json:"script"` } diff --git a/typedapi/types/scriptedmetricaggregate.go b/typedapi/types/scriptedmetricaggregate.go index 39e42b759d..bf188a220f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ScriptedMetricAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L653-L656 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L739-L745 type ScriptedMetricAggregate struct { Meta Metadata `json:"meta,omitempty"` Value json.RawMessage `json:"value,omitempty"` diff --git a/typedapi/types/scriptedmetricaggregation.go b/typedapi/types/scriptedmetricaggregation.go index 421a9f6372..5253512a26 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ScriptedMetricAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L254-L280 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L263-L289 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. diff --git a/typedapi/types/scriptfield.go b/typedapi/types/scriptfield.go index a7517c9cd3..9d8208ffbc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ScriptField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Scripting.ts#L99-L102 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Scripting.ts#L99-L102 type ScriptField struct { IgnoreFailure *bool `json:"ignore_failure,omitempty"` Script Script `json:"script"` diff --git a/typedapi/types/scripting.go b/typedapi/types/scripting.go index ea3b0498c3..3561d0b3ca 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Scripting type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L977-L995 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L1048-L1066 type Scripting struct { // CacheEvictions Total number of times the script cache has evicted old data. CacheEvictions *int64 `json:"cache_evictions,omitempty"` diff --git a/typedapi/types/scriptprocessor.go b/typedapi/types/scriptprocessor.go index 98c7cd0c00..264297f3a7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ScriptProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L1005-L1025 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1404-L1424 type ScriptProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/scriptquery.go b/typedapi/types/scriptquery.go index 2570f8608c..eefc04f2e4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ScriptQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L327-L333 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/scriptscorefunction.go b/typedapi/types/scriptscorefunction.go index 756c2ca740..a391b2d6f4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ScriptScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L124-L129 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/compound.ts#L137-L142 type ScriptScoreFunction struct { // Script A script that computes a score. Script Script `json:"script"` diff --git a/typedapi/types/scriptscorequery.go b/typedapi/types/scriptscorequery.go index a21a5698b1..5ad1d3b5d5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ScriptScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L335-L349 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/scriptsort.go b/typedapi/types/scriptsort.go index e99ea49916..6c36c1b0f0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -28,7 +28,7 @@ import ( // ScriptSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L73-L79 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/sort.ts#L72-L78 type ScriptSort struct { Mode *sortmode.SortMode `json:"mode,omitempty"` Nested *NestedSortValue `json:"nested,omitempty"` diff --git a/typedapi/types/scripttransform.go b/typedapi/types/scripttransform.go index 04eaab437e..f7428bdb9d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ScriptTransform type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Transform.ts#L36-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Transform.ts#L36-L44 type ScriptTransform struct { Id *string `json:"id,omitempty"` Lang *string `json:"lang,omitempty"` diff --git a/typedapi/types/scrollids.go b/typedapi/types/scrollids.go index 915fc3f100..516c3b54a8 100644 --- a/typedapi/types/scrollids.go +++ b/typedapi/types/scrollids.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ScrollIds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L56-L56 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L56-L56 type ScrollIds []string diff --git a/typedapi/types/searchablesnapshotaction.go b/typedapi/types/searchablesnapshotaction.go index 1a95d2834d..e4e660941a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SearchableSnapshotAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L131-L134 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L131-L134 type SearchableSnapshotAction struct { ForceMergeIndex *bool `json:"force_merge_index,omitempty"` SnapshotRepository string `json:"snapshot_repository"` diff --git a/typedapi/types/searchablesnapshots.go b/typedapi/types/searchablesnapshots.go index 171d4d25e5..08c98aa35b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SearchableSnapshots type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L428-L432 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L426-L430 type SearchableSnapshots struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/searchaccess.go b/typedapi/types/searchaccess.go new file mode 100644 index 0000000000..0465684d27 --- /dev/null +++ b/typedapi/types/searchaccess.go @@ -0,0 +1,159 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SearchAccess type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L430-L450 +type SearchAccess struct { + // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that + // cover restricted indices. Implicitly, restricted indices have limited + // privileges that can cause pattern tests to fail. If restricted indices are + // explicitly included in the `names` list, Elasticsearch checks privileges + // against these indices regardless of the value set for + // `allow_restricted_indices`. + AllowRestrictedIndices *bool `json:"allow_restricted_indices,omitempty"` + // FieldSecurity The document fields that the owners of the role have read access to. + FieldSecurity *FieldSecurity `json:"field_security,omitempty"` + // Names A list of indices (or index name patterns) to which the permissions in this + // entry apply. + Names []string `json:"names"` + // Query A search query that defines the documents the owners of the role have access + // to. A document within the specified indices must match this query for it to + // be accessible by the owners of the role. + Query IndicesPrivilegesQuery `json:"query,omitempty"` +} + +func (s *SearchAccess) 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 "allow_restricted_indices": + 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", "AllowRestrictedIndices", err) + } + s.AllowRestrictedIndices = &value + case bool: + s.AllowRestrictedIndices = &v + } + + case "field_security": + if err := dec.Decode(&s.FieldSecurity); err != nil { + return fmt.Errorf("%s | %w", "FieldSecurity", err) + } + + case "names": + 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", "Names", err) + } + + s.Names = append(s.Names, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Names); err != nil { + return fmt.Errorf("%s | %w", "Names", err) + } + } + + case "query": + message := json.RawMessage{} + if err := dec.Decode(&message); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + keyDec := json.NewDecoder(bytes.NewReader(message)) + query_field: + for { + t, err := keyDec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return fmt.Errorf("%s | %w", "Query", err) + } + + switch t { + + case "bool", "boosting", "combined_fields", "common", "constant_score", "dis_max", "distance_feature", "exists", "function_score", "fuzzy", "geo_bounding_box", "geo_distance", "geo_polygon", "geo_shape", "has_child", "has_parent", "ids", "intervals", "knn", "match", "match_all", "match_bool_prefix", "match_none", "match_phrase", "match_phrase_prefix", "more_like_this", "multi_match", "nested", "parent_id", "percolate", "pinned", "prefix", "query_string", "range", "rank_feature", "regexp", "rule", "script", "script_score", "semantic", "shape", "simple_query_string", "span_containing", "span_field_masking", "span_first", "span_multi", "span_near", "span_not", "span_or", "span_term", "span_within", "sparse_vector", "term", "terms", "terms_set", "text_expansion", "type", "weighted_tokens", "wildcard", "wrapper": + o := NewQuery() + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + s.Query = o + break query_field + + case "template": + o := NewRoleTemplateQuery() + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + s.Query = o + break query_field + + } + } + if s.Query == nil { + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&s.Query); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + } + + } + } + return nil +} + +// NewSearchAccess returns a SearchAccess. +func NewSearchAccess() *SearchAccess { + r := &SearchAccess{} + + return r +} diff --git a/typedapi/types/searchapplication.go b/typedapi/types/searchapplication.go index fa88fd5928..e490dbe240 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SearchApplication type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/_types/SearchApplication.ts#L24-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/_types/SearchApplication.ts#L24-L45 type SearchApplication struct { // AnalyticsCollectionName Analytics collection associated to the Search Application. AnalyticsCollectionName *string `json:"analytics_collection_name,omitempty"` diff --git a/typedapi/types/searchapplicationlistitem.go b/typedapi/types/searchapplicationlistitem.go index 7030ce5210..314a912c59 100644 --- a/typedapi/types/searchapplicationlistitem.go +++ b/typedapi/types/searchapplicationlistitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SearchApplicationListItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/list/SearchApplicationsListResponse.ts#L31-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/list/SearchApplicationsListResponse.ts#L31-L48 type SearchApplicationListItem struct { // AnalyticsCollectionName Analytics collection associated to the Search Application AnalyticsCollectionName *string `json:"analytics_collection_name,omitempty"` diff --git a/typedapi/types/searchapplicationtemplate.go b/typedapi/types/searchapplicationtemplate.go index 35dbc96ff8..fffd0921e3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SearchApplicationTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/search_application/_types/SearchApplication.ts#L47-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/search_application/_types/SearchApplication.ts#L47-L52 type SearchApplicationTemplate struct { // Script The associated mustache template. Script Script `json:"script"` diff --git a/typedapi/types/searchasyoutypeproperty.go b/typedapi/types/searchasyoutypeproperty.go index 379a6c9522..7a88aee85a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // SearchAsYouTypeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L212-L222 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L212-L223 type SearchAsYouTypeProperty struct { Analyzer *string `json:"analyzer,omitempty"` CopyTo []string `json:"copy_to,omitempty"` diff --git a/typedapi/types/searchidle.go b/typedapi/types/searchidle.go index 30ae80f526..73e4efd9dc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SearchIdle type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L245-L248 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L245-L248 type SearchIdle struct { After Duration `json:"after,omitempty"` } diff --git a/typedapi/types/searchinput.go b/typedapi/types/searchinput.go index 48296a5cc6..9d825019d7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SearchInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L112-L116 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L112-L116 type SearchInput struct { Extract []string `json:"extract,omitempty"` Request SearchInputRequestDefinition `json:"request"` diff --git a/typedapi/types/searchinputrequestbody.go b/typedapi/types/searchinputrequestbody.go index ac6695a5ed..638b053a8d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SearchInputRequestBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L147-L149 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L147-L149 type SearchInputRequestBody struct { Query Query `json:"query"` } diff --git a/typedapi/types/searchinputrequestdefinition.go b/typedapi/types/searchinputrequestdefinition.go index 7044274c85..7061f952ac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SearchInputRequestDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L118-L125 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L118-L125 type SearchInputRequestDefinition struct { Body *SearchInputRequestBody `json:"body,omitempty"` Indices []string `json:"indices,omitempty"` diff --git a/typedapi/types/searchprofile.go b/typedapi/types/searchprofile.go index e4335c3512..d1d7cdc395 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SearchProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L126-L130 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L136-L140 type SearchProfile struct { Collector []Collector `json:"collector"` Query []QueryProfile `json:"query"` diff --git a/typedapi/types/searchshardsnodeattributes.go b/typedapi/types/searchshardsnodeattributes.go new file mode 100644 index 0000000000..93d9d8ebb9 --- /dev/null +++ b/typedapi/types/searchshardsnodeattributes.go @@ -0,0 +1,157 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/noderole" +) + +// SearchShardsNodeAttributes type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search_shards/SearchShardsResponse.ts#L42-L60 +type SearchShardsNodeAttributes struct { + // Attributes Lists node attributes. + Attributes map[string]string `json:"attributes"` + // EphemeralId The ephemeral ID of the node. + EphemeralId string `json:"ephemeral_id"` + ExternalId string `json:"external_id"` + MaxIndexVersion int `json:"max_index_version"` + MinIndexVersion int `json:"min_index_version"` + // Name The human-readable identifier of the node. + Name string `json:"name"` + Roles []noderole.NodeRole `json:"roles"` + // TransportAddress The host and port where transport HTTP connections are accepted. + TransportAddress string `json:"transport_address"` + Version string `json:"version"` +} + +func (s *SearchShardsNodeAttributes) 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 "attributes": + if s.Attributes == nil { + s.Attributes = make(map[string]string, 0) + } + if err := dec.Decode(&s.Attributes); err != nil { + return fmt.Errorf("%s | %w", "Attributes", err) + } + + case "ephemeral_id": + if err := dec.Decode(&s.EphemeralId); err != nil { + return fmt.Errorf("%s | %w", "EphemeralId", err) + } + + case "external_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ExternalId", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ExternalId = o + + case "max_index_version": + + 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", "MaxIndexVersion", err) + } + s.MaxIndexVersion = value + case float64: + f := int(v) + s.MaxIndexVersion = f + } + + case "min_index_version": + + 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", "MinIndexVersion", err) + } + s.MinIndexVersion = value + case float64: + f := int(v) + s.MinIndexVersion = f + } + + case "name": + if err := dec.Decode(&s.Name); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + + case "roles": + if err := dec.Decode(&s.Roles); err != nil { + return fmt.Errorf("%s | %w", "Roles", err) + } + + case "transport_address": + if err := dec.Decode(&s.TransportAddress); err != nil { + return fmt.Errorf("%s | %w", "TransportAddress", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// NewSearchShardsNodeAttributes returns a SearchShardsNodeAttributes. +func NewSearchShardsNodeAttributes() *SearchShardsNodeAttributes { + r := &SearchShardsNodeAttributes{ + Attributes: make(map[string]string, 0), + } + + return r +} diff --git a/typedapi/types/searchstats.go b/typedapi/types/searchstats.go index a176debedb..bd2e58acf1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SearchStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L252-L271 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L252-L271 type SearchStats struct { FetchCurrent int64 `json:"fetch_current"` FetchTime Duration `json:"fetch_time,omitempty"` diff --git a/typedapi/types/searchtemplaterequestbody.go b/typedapi/types/searchtemplaterequestbody.go index 16072f9f0c..ad56f2df53 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SearchTemplateRequestBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L128-L145 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L128-L145 type SearchTemplateRequestBody struct { Explain *bool `json:"explain,omitempty"` // Id ID of the search template to use. If no source is specified, diff --git a/typedapi/types/searchtransform.go b/typedapi/types/searchtransform.go index 6a611cb376..9420cf8f49 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SearchTransform type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Transform.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Transform.ts#L46-L49 type SearchTransform struct { Request SearchInputRequestDefinition `json:"request"` Timeout Duration `json:"timeout"` diff --git a/typedapi/types/security.go b/typedapi/types/security.go index f630b42ec6..ff234a00fc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Security type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L434-L447 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L432-L445 type Security struct { Anonymous FeatureToggle `json:"anonymous"` ApiKeyService FeatureToggle `json:"api_key_service"` diff --git a/typedapi/types/securityrolemapping.go b/typedapi/types/securityrolemapping.go index 5cb804024d..e2f715d209 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SecurityRoleMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/RoleMapping.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/RoleMapping.ts#L25-L33 type SecurityRoleMapping struct { Enabled bool `json:"enabled"` Metadata Metadata `json:"metadata"` diff --git a/typedapi/types/securityroles.go b/typedapi/types/securityroles.go index 27047e10e2..17094017a9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SecurityRoles type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L296-L300 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L294-L298 type SecurityRoles struct { Dls SecurityRolesDls `json:"dls"` File SecurityRolesFile `json:"file"` diff --git a/typedapi/types/securityrolesdls.go b/typedapi/types/securityrolesdls.go index cb24fe8b78..474e3e2657 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SecurityRolesDls type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L308-L310 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L306-L308 type SecurityRolesDls struct { BitSetCache SecurityRolesDlsBitSetCache `json:"bit_set_cache"` } diff --git a/typedapi/types/securityrolesdlsbitsetcache.go b/typedapi/types/securityrolesdlsbitsetcache.go index a9b859f7da..cace5a7d4e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SecurityRolesDlsBitSetCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L312-L316 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L310-L314 type SecurityRolesDlsBitSetCache struct { Count int `json:"count"` Memory ByteSize `json:"memory,omitempty"` diff --git a/typedapi/types/securityrolesfile.go b/typedapi/types/securityrolesfile.go index ac8f25ed4b..3dcf1aafe8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SecurityRolesFile type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L318-L322 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L316-L320 type SecurityRolesFile struct { Dls bool `json:"dls"` Fls bool `json:"fls"` diff --git a/typedapi/types/securityrolesnative.go b/typedapi/types/securityrolesnative.go index 1a64ab6dd2..7148a66753 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SecurityRolesNative type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L302-L306 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L300-L304 type SecurityRolesNative struct { Dls bool `json:"dls"` Fls bool `json:"fls"` diff --git a/typedapi/types/segment.go b/typedapi/types/segment.go index 60b492cf5e..79f00d78b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Segment type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/segments/types.ts#L28-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/segments/types.ts#L28-L38 type Segment struct { Attributes map[string]string `json:"attributes"` Committed bool `json:"committed"` diff --git a/typedapi/types/segmentsrecord.go b/typedapi/types/segmentsrecord.go index 9fd7504aa4..186b09c849 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SegmentsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/segments/types.ts#L22-L107 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/segmentsstats.go b/typedapi/types/segmentsstats.go index 598d97e8e2..d6286b95f2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SegmentsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L273-L366 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L273-L366 type SegmentsStats struct { // Count Total number of segments across all shards assigned to selected nodes. Count int `json:"count"` diff --git a/typedapi/types/selectoption.go b/typedapi/types/selectoption.go index e6cca2aebd..ca0b1720f8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SelectOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L25-L28 type SelectOption struct { Label string `json:"label"` Value ScalarValue `json:"value"` diff --git a/typedapi/types/semanticquery.go b/typedapi/types/semanticquery.go index 70cd67c851..3796a32a29 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SemanticQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/SemanticQuery.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/semantictextproperty.go b/typedapi/types/semantictextproperty.go index 9af76a1a2f..ce6a8037e9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SemanticTextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L206-L210 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L206-L210 type SemanticTextProperty struct { InferenceId string `json:"inference_id"` Meta map[string]string `json:"meta,omitempty"` diff --git a/typedapi/types/serbiananalyzer.go b/typedapi/types/serbiananalyzer.go new file mode 100644 index 0000000000..e6be0b345c --- /dev/null +++ b/typedapi/types/serbiananalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SerbianAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L271-L276 +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"` +} + +func (s *SerbianAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 SerbianAnalyzer) MarshalJSON() ([]byte, error) { + type innerSerbianAnalyzer SerbianAnalyzer + tmp := innerSerbianAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "serbian" + + return json.Marshal(tmp) +} + +// NewSerbianAnalyzer returns a SerbianAnalyzer. +func NewSerbianAnalyzer() *SerbianAnalyzer { + r := &SerbianAnalyzer{} + + return r +} diff --git a/typedapi/types/serialdifferencingaggregation.go b/typedapi/types/serialdifferencingaggregation.go index 519dadfa25..c734bdd82c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SerialDifferencingAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L361-L367 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/serializedclusterstate.go b/typedapi/types/serializedclusterstate.go index f9661af5d7..e5f1b0717e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SerializedClusterState type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L232-L238 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L232-L238 type SerializedClusterState struct { Diffs *SerializedClusterStateDetail `json:"diffs,omitempty"` // FullStates Number of published cluster states. diff --git a/typedapi/types/serializedclusterstatedetail.go b/typedapi/types/serializedclusterstatedetail.go index ce45d1cef6..15c2f63856 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SerializedClusterStateDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L240-L246 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L240-L246 type SerializedClusterStateDetail struct { CompressedSize *string `json:"compressed_size,omitempty"` CompressedSizeInBytes *int64 `json:"compressed_size_in_bytes,omitempty"` diff --git a/typedapi/types/servicetoken.go b/typedapi/types/servicetoken.go index 1bbd8e34fc..8b916eab83 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ServiceToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/create_service_token/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/create_service_token/types.ts#L22-L25 type ServiceToken struct { Name string `json:"name"` Value string `json:"value"` diff --git a/typedapi/types/setpriorityaction.go b/typedapi/types/setpriorityaction.go index 4f44138316..911df078b7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SetPriorityAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L98-L100 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L98-L100 type SetPriorityAction struct { Priority *int `json:"priority,omitempty"` } diff --git a/typedapi/types/setprocessor.go b/typedapi/types/setprocessor.go index ceacffd6b6..88ddb57db3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SetProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L1027-L1061 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1426-L1460 type SetProcessor struct { // CopyFrom The origin field which will be copied to `field`, cannot set `value` // simultaneously. diff --git a/typedapi/types/setsecurityuserprocessor.go b/typedapi/types/setsecurityuserprocessor.go index e6cd1ad0c9..2f0b4251cf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SetSecurityUserProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L1063-L1072 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1462-L1471 type SetSecurityUserProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/settings.go b/typedapi/types/settings.go index ca000085a0..e4914d75cc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Settings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/_types/Transform.ts#L98-L144 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/settingsanalyze.go b/typedapi/types/settingsanalyze.go index 57f604f062..b5871b196a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SettingsAnalyze type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L235-L238 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L235-L238 type SettingsAnalyze struct { MaxTokenCount Stringifiedinteger `json:"max_token_count,omitempty"` } diff --git a/typedapi/types/settingshighlight.go b/typedapi/types/settingshighlight.go index c9aff73435..ca81bd14ce 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SettingsHighlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L230-L233 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L230-L233 type SettingsHighlight struct { MaxAnalyzedOffset *int `json:"max_analyzed_offset,omitempty"` } diff --git a/typedapi/types/settingsquerystring.go b/typedapi/types/settingsquerystring.go index 4a3de37939..73034cc7d1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SettingsQueryString type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L250-L252 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L250-L252 type SettingsQueryString struct { Lenient Stringifiedboolean `json:"lenient"` } diff --git a/typedapi/types/settingssearch.go b/typedapi/types/settingssearch.go index 473b58a317..c8a4de7c2c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SettingsSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L240-L243 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L240-L243 type SettingsSearch struct { Idle *SearchIdle `json:"idle,omitempty"` Slowlog *SlowlogSettings `json:"slowlog,omitempty"` diff --git a/typedapi/types/settingssimilarity.go b/typedapi/types/settingssimilarity.go index 458137d05e..27bbcfe43b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,5 +31,5 @@ package types // SettingsSimilarityLmj // SettingsSimilarityScripted // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L171-L182 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L171-L182 type SettingsSimilarity any diff --git a/typedapi/types/settingssimilaritybm25.go b/typedapi/types/settingssimilaritybm25.go index 7fac335ca3..6222c0b955 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityBm25 type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L188-L193 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L188-L193 type SettingsSimilarityBm25 struct { B *Float64 `json:"b,omitempty"` DiscountOverlaps *bool `json:"discount_overlaps,omitempty"` diff --git a/typedapi/types/settingssimilarityboolean.go b/typedapi/types/settingssimilarityboolean.go index 8944f0a892..ba7403b495 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // SettingsSimilarityBoolean type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L184-L186 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L184-L186 type SettingsSimilarityBoolean struct { Type string `json:"type,omitempty"` } diff --git a/typedapi/types/settingssimilaritydfi.go b/typedapi/types/settingssimilaritydfi.go index d7cd71720f..1be1ec905c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -28,7 +28,7 @@ import ( // SettingsSimilarityDfi type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L195-L198 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L195-L198 type SettingsSimilarityDfi struct { IndependenceMeasure dfiindependencemeasure.DFIIndependenceMeasure `json:"independence_measure"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/settingssimilaritydfr.go b/typedapi/types/settingssimilaritydfr.go index ae50183fa8..c26dc7e6b9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SettingsSimilarityDfr type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L200-L205 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L200-L205 type SettingsSimilarityDfr struct { AfterEffect dfraftereffect.DFRAfterEffect `json:"after_effect"` BasicModel dfrbasicmodel.DFRBasicModel `json:"basic_model"` diff --git a/typedapi/types/settingssimilarityib.go b/typedapi/types/settingssimilarityib.go index fae7305011..0657b77e88 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SettingsSimilarityIb type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L207-L212 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L207-L212 type SettingsSimilarityIb struct { Distribution ibdistribution.IBDistribution `json:"distribution"` Lambda iblambda.IBLambda `json:"lambda"` diff --git a/typedapi/types/settingssimilaritylmd.go b/typedapi/types/settingssimilaritylmd.go index 94fb16e47e..75b44270ba 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityLmd type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L214-L217 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L214-L217 type SettingsSimilarityLmd struct { Mu *Float64 `json:"mu,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/settingssimilaritylmj.go b/typedapi/types/settingssimilaritylmj.go index fa9a4febf9..45d7ab311e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityLmj type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L219-L222 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L219-L222 type SettingsSimilarityLmj struct { Lambda *Float64 `json:"lambda,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/settingssimilarityscripted.go b/typedapi/types/settingssimilarityscripted.go index efccd1e559..ec2eda9c7e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // SettingsSimilarityScripted type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L224-L228 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L224-L228 type SettingsSimilarityScripted struct { Script Script `json:"script"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/shapefieldquery.go b/typedapi/types/shapefieldquery.go index cecee434ad..262d1cd4c5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // ShapeFieldQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L366-L379 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/specialized.ts#L383-L396 type ShapeFieldQuery struct { // IndexedShape Queries using a pre-indexed shape. IndexedShape *FieldLookup `json:"indexed_shape,omitempty"` diff --git a/typedapi/types/shapeproperty.go b/typedapi/types/shapeproperty.go index f7e10af989..bb5e87fcd2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // ShapeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/geo.ts#L73-L85 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/geo.ts#L73-L85 type ShapeProperty struct { Coerce *bool `json:"coerce,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -48,7 +48,6 @@ type ShapeProperty struct { Meta map[string]string `json:"meta,omitempty"` Orientation *geoorientation.GeoOrientation `json:"orientation,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -812,18 +811,6 @@ func (s *ShapeProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -863,7 +850,6 @@ func (s ShapeProperty) MarshalJSON() ([]byte, error) { Meta: s.Meta, Orientation: s.Orientation, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/shapequery.go b/typedapi/types/shapequery.go index 4e7ab807c8..60edf1b37d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShapeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L351-L364 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/shardcommit.go b/typedapi/types/shardcommit.go index 8e1de2b364..ed88617430 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardCommit type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L112-L117 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L112-L117 type ShardCommit struct { Generation int `json:"generation"` Id string `json:"id"` diff --git a/typedapi/types/shardfailure.go b/typedapi/types/shardfailure.go index 06a24d1ab2..8c7d0c672c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Errors.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Errors.ts#L52-L58 type ShardFailure struct { Index *string `json:"index,omitempty"` Node *string `json:"node,omitempty"` diff --git a/typedapi/types/shardfilesizeinfo.go b/typedapi/types/shardfilesizeinfo.go index 13b9c0e9c9..94ee7b26e1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardFileSizeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L124-L131 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L124-L131 type ShardFileSizeInfo struct { AverageSizeInBytes *int64 `json:"average_size_in_bytes,omitempty"` Count *int64 `json:"count,omitempty"` diff --git a/typedapi/types/shardhealthstats.go b/typedapi/types/shardhealthstats.go index 34de5057a5..c3672fa195 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,14 +33,15 @@ import ( // ShardHealthStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/health/types.ts#L36-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/health/types.ts#L37-L45 type ShardHealthStats struct { - ActiveShards int `json:"active_shards"` - InitializingShards int `json:"initializing_shards"` - PrimaryActive bool `json:"primary_active"` - RelocatingShards int `json:"relocating_shards"` - Status healthstatus.HealthStatus `json:"status"` - UnassignedShards int `json:"unassigned_shards"` + ActiveShards int `json:"active_shards"` + InitializingShards int `json:"initializing_shards"` + PrimaryActive bool `json:"primary_active"` + RelocatingShards int `json:"relocating_shards"` + Status healthstatus.HealthStatus `json:"status"` + UnassignedPrimaryShards int `json:"unassigned_primary_shards"` + UnassignedShards int `json:"unassigned_shards"` } func (s *ShardHealthStats) UnmarshalJSON(data []byte) error { @@ -125,6 +126,22 @@ func (s *ShardHealthStats) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Status", err) } + case "unassigned_primary_shards": + + 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", "UnassignedPrimaryShards", err) + } + s.UnassignedPrimaryShards = value + case float64: + f := int(v) + s.UnassignedPrimaryShards = f + } + case "unassigned_shards": var tmp any diff --git a/typedapi/types/shardlease.go b/typedapi/types/shardlease.go index 9c583ffb93..1771b4e0cd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardLease type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L133-L138 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L133-L138 type ShardLease struct { Id string `json:"id"` RetainingSeqNo int64 `json:"retaining_seq_no"` diff --git a/typedapi/types/shardmigrationstatus.go b/typedapi/types/shardmigrationstatus.go index a718f6221a..fcfd04eaec 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // ShardMigrationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L52-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L52-L54 type ShardMigrationStatus struct { Status shutdownstatus.ShutdownStatus `json:"status"` } diff --git a/typedapi/types/shardpath.go b/typedapi/types/shardpath.go index bcdaef1859..6a6708e57d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardPath type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L140-L144 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L140-L144 type ShardPath struct { DataPath string `json:"data_path"` IsCustomDataPath bool `json:"is_custom_data_path"` diff --git a/typedapi/types/shardprofile.go b/typedapi/types/shardprofile.go index 3b3702d8d7..a425b0f1b5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,12 +31,17 @@ import ( // ShardProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/profile.ts#L132-L137 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/profile.ts#L142-L152 type ShardProfile struct { Aggregations []AggregationProfile `json:"aggregations"` + Cluster string `json:"cluster"` + Dfs *DfsProfile `json:"dfs,omitempty"` Fetch *FetchProfile `json:"fetch,omitempty"` Id string `json:"id"` + Index string `json:"index"` + NodeId string `json:"node_id"` Searches []SearchProfile `json:"searches"` + ShardId int64 `json:"shard_id"` } func (s *ShardProfile) UnmarshalJSON(data []byte) error { @@ -59,6 +64,23 @@ func (s *ShardProfile) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Aggregations", err) } + case "cluster": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Cluster", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Cluster = o + + case "dfs": + if err := dec.Decode(&s.Dfs); err != nil { + return fmt.Errorf("%s | %w", "Dfs", err) + } + case "fetch": if err := dec.Decode(&s.Fetch); err != nil { return fmt.Errorf("%s | %w", "Fetch", err) @@ -76,11 +98,36 @@ func (s *ShardProfile) UnmarshalJSON(data []byte) error { } s.Id = o + case "index": + if err := dec.Decode(&s.Index); err != nil { + return fmt.Errorf("%s | %w", "Index", err) + } + + case "node_id": + if err := dec.Decode(&s.NodeId); err != nil { + return fmt.Errorf("%s | %w", "NodeId", err) + } + case "searches": if err := dec.Decode(&s.Searches); err != nil { return fmt.Errorf("%s | %w", "Searches", err) } + case "shard_id": + 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", "ShardId", err) + } + s.ShardId = value + case float64: + f := int64(v) + s.ShardId = f + } + } } return nil diff --git a/typedapi/types/shardquerycache.go b/typedapi/types/shardquerycache.go index 6108690e73..7507a680f7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardQueryCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L146-L154 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L146-L154 type ShardQueryCache struct { CacheCount int64 `json:"cache_count"` CacheSize int64 `json:"cache_size"` diff --git a/typedapi/types/shardrecovery.go b/typedapi/types/shardrecovery.go index a3ba13286d..204d3808ef 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardRecovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/recovery/types.ts#L118-L135 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/recovery/types.ts#L118-L135 type ShardRecovery struct { Id int64 `json:"id"` Index RecoveryIndexStatus `json:"index"` diff --git a/typedapi/types/shardretentionleases.go b/typedapi/types/shardretentionleases.go index c59b8cd028..e571cfcd70 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardRetentionLeases type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L156-L160 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L156-L160 type ShardRetentionLeases struct { Leases []ShardLease `json:"leases"` PrimaryTerm int64 `json:"primary_term"` diff --git a/typedapi/types/shardrouting.go b/typedapi/types/shardrouting.go index a8ff479b16..4b2002869c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // ShardRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L162-L167 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L162-L167 type ShardRouting struct { Node string `json:"node"` Primary bool `json:"primary"` diff --git a/typedapi/types/shardsavailabilityindicator.go b/typedapi/types/shardsavailabilityindicator.go index a58bbc5a40..2ff611e575 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // ShardsAvailabilityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L104-L108 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L105-L109 type ShardsAvailabilityIndicator struct { Details *ShardsAvailabilityIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/shardsavailabilityindicatordetails.go b/typedapi/types/shardsavailabilityindicatordetails.go index a10c3e7aa6..6326a243c3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardsAvailabilityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L109-L120 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L110-L121 type ShardsAvailabilityIndicatorDetails struct { CreatingPrimaries int64 `json:"creating_primaries"` CreatingReplicas int64 `json:"creating_replicas"` diff --git a/typedapi/types/shardscapacityindicator.go b/typedapi/types/shardscapacityindicator.go index 462df65b9f..9768040737 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // ShardsCapacityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L173-L177 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L190-L194 type ShardsCapacityIndicator struct { Details *ShardsCapacityIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/shardscapacityindicatordetails.go b/typedapi/types/shardscapacityindicatordetails.go index 17c2df6599..8e0393f853 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ShardsCapacityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L179-L182 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L196-L199 type ShardsCapacityIndicatorDetails struct { Data ShardsCapacityIndicatorTierDetail `json:"data"` Frozen ShardsCapacityIndicatorTierDetail `json:"frozen"` diff --git a/typedapi/types/shardscapacityindicatortierdetail.go b/typedapi/types/shardscapacityindicatortierdetail.go index 4014afd777..97c13952dc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardsCapacityIndicatorTierDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L184-L187 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L201-L204 type ShardsCapacityIndicatorTierDetail struct { CurrentUsedShards *int `json:"current_used_shards,omitempty"` MaxShardsInCluster int `json:"max_shards_in_cluster"` diff --git a/typedapi/types/shardsegmentrouting.go b/typedapi/types/shardsegmentrouting.go index bbfe394c95..883ef168ab 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardSegmentRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/segments/types.ts#L40-L44 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/segments/types.ts#L40-L44 type ShardSegmentRouting struct { Node string `json:"node"` Primary bool `json:"primary"` diff --git a/typedapi/types/shardsequencenumber.go b/typedapi/types/shardsequencenumber.go index 17a5f0943b..a434b1d338 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardSequenceNumber type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L176-L180 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L176-L180 type ShardSequenceNumber struct { GlobalCheckpoint int64 `json:"global_checkpoint"` LocalCheckpoint int64 `json:"local_checkpoint"` diff --git a/typedapi/types/shardsrecord.go b/typedapi/types/shardsrecord.go index da93d5f995..06442d781d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/shards/types.ts#L20-L421 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` @@ -45,6 +45,8 @@ type ShardsRecord struct { BulkTotalTime *string `json:"bulk.total_time,omitempty"` // CompletionSize The size of completion. CompletionSize *string `json:"completion.size,omitempty"` + // Dataset total size of dataset (including the cache for partially mounted indices) + Dataset *string `json:"dataset,omitempty"` // Docs The number of documents in the shard. Docs *string `json:"docs,omitempty"` // FielddataEvictions The fielddata cache evictions. @@ -314,6 +316,18 @@ func (s *ShardsRecord) UnmarshalJSON(data []byte) error { } s.CompletionSize = &o + case "dataset": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Dataset", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Dataset = &o + case "docs", "d", "dc": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/shardssegment.go b/typedapi/types/shardssegment.go index 51f22f6fc2..8cba139a41 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardsSegment type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/segments/types.ts#L46-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/segments/types.ts#L46-L51 type ShardsSegment struct { NumCommittedSegments int `json:"num_committed_segments"` NumSearchSegments int `json:"num_search_segments"` diff --git a/typedapi/types/shardsstatssummary.go b/typedapi/types/shardsstatssummary.go index eeb97a9fdc..17b9dfd7e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // ShardsStatsSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotShardsStatus.ts#L29-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotShardsStatus.ts#L29-L35 type ShardsStatsSummary struct { Incremental ShardsStatsSummaryItem `json:"incremental"` StartTimeInMillis int64 `json:"start_time_in_millis"` diff --git a/typedapi/types/shardsstatssummaryitem.go b/typedapi/types/shardsstatssummaryitem.go index ebad79c027..e64400533e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardsStatsSummaryItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotShardsStatus.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotShardsStatus.ts#L37-L40 type ShardsStatsSummaryItem struct { FileCount int64 `json:"file_count"` SizeInBytes int64 `json:"size_in_bytes"` diff --git a/typedapi/types/shardstatistics.go b/typedapi/types/shardstatistics.go index 5be6757889..0fdd069a07 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ShardStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L54-L66 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L54-L66 type ShardStatistics struct { Failed uint `json:"failed"` Failures []ShardFailure `json:"failures,omitempty"` diff --git a/typedapi/types/shardstore.go b/typedapi/types/shardstore.go index 68f5e3a86f..0d4e80afed 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // ShardStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/shard_stores/types.ts#L30-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/shard_stores/types.ts#L29-L36 type ShardStore struct { Allocation shardstoreallocation.ShardStoreAllocation `json:"allocation"` AllocationId *string `json:"allocation_id,omitempty"` diff --git a/typedapi/types/shardstoreexception.go b/typedapi/types/shardstoreexception.go index d0a16536ee..6d325706f8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardStoreException type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/shard_stores/types.ts#L54-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/shard_stores/types.ts#L53-L56 type ShardStoreException struct { Reason string `json:"reason"` Type string `json:"type"` diff --git a/typedapi/types/shardstoreindex.go b/typedapi/types/shardstoreindex.go index ea53311d96..14bb03a25d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ShardStoreIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search_shards/SearchShardsResponse.ts#L33-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search_shards/SearchShardsResponse.ts#L62-L65 type ShardStoreIndex struct { Aliases []string `json:"aliases,omitempty"` Filter *Query `json:"filter,omitempty"` diff --git a/typedapi/types/shardstorenode.go b/typedapi/types/shardstorenode.go index 84ab24691e..29fe055398 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardStoreNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/shard_stores/types.ts#L39-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/shard_stores/types.ts#L38-L45 type ShardStoreNode struct { Attributes map[string]string `json:"attributes"` EphemeralId *string `json:"ephemeral_id,omitempty"` diff --git a/typedapi/types/shardstorewrapper.go b/typedapi/types/shardstorewrapper.go index 2222491da6..f7383f273f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // ShardStoreWrapper type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/shard_stores/types.ts#L59-L61 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/shard_stores/types.ts#L58-L60 type ShardStoreWrapper struct { Stores []ShardStore `json:"stores"` } diff --git a/typedapi/types/shardstotalstats.go b/typedapi/types/shardstotalstats.go index 66180f5234..b1570f056c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShardsTotalStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/stats/types.ts#L182-L184 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/stats/types.ts#L182-L184 type ShardsTotalStats struct { TotalCount int64 `json:"total_count"` } diff --git a/typedapi/types/shared.go b/typedapi/types/shared.go index f169c48660..3f934368c8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Shared type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/searchable_snapshots/cache_stats/Response.ts#L34-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/sharedfilesystemrepository.go b/typedapi/types/sharedfilesystemrepository.go index 1b267a99e0..268733acd7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SharedFileSystemRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L55-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L55-L58 type SharedFileSystemRepository struct { Settings SharedFileSystemRepositorySettings `json:"settings"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/sharedfilesystemrepositorysettings.go b/typedapi/types/sharedfilesystemrepositorysettings.go index 38825b6f93..359b77a077 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SharedFileSystemRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L104-L108 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L104-L108 type SharedFileSystemRepositorySettings struct { ChunkSize ByteSize `json:"chunk_size,omitempty"` Compress *bool `json:"compress,omitempty"` diff --git a/typedapi/types/shingletokenfilter.go b/typedapi/types/shingletokenfilter.go index fc782f6ebb..60788feb35 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShingleTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L87-L95 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L86-L94 type ShingleTokenFilter struct { FillerToken *string `json:"filler_token,omitempty"` MaxShingleSize string `json:"max_shingle_size,omitempty"` diff --git a/typedapi/types/shortnumberproperty.go b/typedapi/types/shortnumberproperty.go index 29ebe45744..014f5d099f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // ShortNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L167-L170 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L167-L170 type ShortNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -52,7 +52,6 @@ type ShortNumberProperty struct { OnScriptError *onscripterror.OnScriptError `json:"on_script_error,omitempty"` Properties map[string]Property `json:"properties,omitempty"` Script *Script `json:"script,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` // TimeSeriesDimension For internal use by Elastic only. Marks the field as a time series dimension. // Defaults to false. @@ -848,18 +847,6 @@ func (s *ShortNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Script", err) } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -921,7 +908,6 @@ func (s ShortNumberProperty) MarshalJSON() ([]byte, error) { OnScriptError: s.OnScriptError, Properties: s.Properties, Script: s.Script, - Similarity: s.Similarity, Store: s.Store, TimeSeriesDimension: s.TimeSeriesDimension, TimeSeriesMetric: s.TimeSeriesMetric, diff --git a/typedapi/types/shrinkaction.go b/typedapi/types/shrinkaction.go index add7899bad..d8c32209be 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ShrinkAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L120-L124 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L120-L124 type ShrinkAction struct { AllowWriteAfterShrink *bool `json:"allow_write_after_shrink,omitempty"` MaxPrimaryShardSize ByteSize `json:"max_primary_shard_size,omitempty"` diff --git a/typedapi/types/significantlongtermsaggregate.go b/typedapi/types/significantlongtermsaggregate.go index 9e8816ffb0..4c7fb92e6c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SignificantLongTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L592-L594 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L668-L670 type SignificantLongTermsAggregate struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsSignificantLongTermsBucket `json:"buckets"` diff --git a/typedapi/types/significantlongtermsbucket.go b/typedapi/types/significantlongtermsbucket.go index 9f215034d1..2281da75a3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // SignificantLongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L601-L604 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L677-L680 type SignificantLongTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` BgCount int64 `json:"bg_count"` @@ -547,6 +547,13 @@ func (s *SignificantLongTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/significantstringtermsaggregate.go b/typedapi/types/significantstringtermsaggregate.go index 4d54c792a7..7d9f307c96 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SignificantStringTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L606-L608 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L682-L684 type SignificantStringTermsAggregate struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsSignificantStringTermsBucket `json:"buckets"` diff --git a/typedapi/types/significantstringtermsbucket.go b/typedapi/types/significantstringtermsbucket.go index dc03092e33..4e0b54bf71 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // SignificantStringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L610-L612 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L686-L688 type SignificantStringTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` BgCount int64 `json:"bg_count"` @@ -531,6 +531,13 @@ func (s *SignificantStringTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/significanttermsaggregatebasesignificantlongtermsbucket.go b/typedapi/types/significanttermsaggregatebasesignificantlongtermsbucket.go index aaeb6f914d..a7f30f9002 100644 --- a/typedapi/types/significanttermsaggregatebasesignificantlongtermsbucket.go +++ b/typedapi/types/significanttermsaggregatebasesignificantlongtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SignificantTermsAggregateBaseSignificantLongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L585-L590 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L658-L666 type SignificantTermsAggregateBaseSignificantLongTermsBucket struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsSignificantLongTermsBucket `json:"buckets"` diff --git a/typedapi/types/significanttermsaggregatebasesignificantstringtermsbucket.go b/typedapi/types/significanttermsaggregatebasesignificantstringtermsbucket.go index e2abf3b080..96e9d4b853 100644 --- a/typedapi/types/significanttermsaggregatebasesignificantstringtermsbucket.go +++ b/typedapi/types/significanttermsaggregatebasesignificantstringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SignificantTermsAggregateBaseSignificantStringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L585-L590 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L658-L666 type SignificantTermsAggregateBaseSignificantStringTermsBucket struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsSignificantStringTermsBucket `json:"buckets"` diff --git a/typedapi/types/significanttermsaggregatebasevoid.go b/typedapi/types/significanttermsaggregatebasevoid.go index 7500247fa7..69757b0d73 100644 --- a/typedapi/types/significanttermsaggregatebasevoid.go +++ b/typedapi/types/significanttermsaggregatebasevoid.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SignificantTermsAggregateBaseVoid type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L585-L590 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L658-L666 type SignificantTermsAggregateBaseVoid struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsVoid `json:"buckets"` diff --git a/typedapi/types/significanttermsaggregation.go b/typedapi/types/significanttermsaggregation.go index 9c4856c46c..f308cbac48 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SignificantTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L772-L836 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/significanttextaggregation.go b/typedapi/types/significanttextaggregation.go index 5c315fbaf7..3afcb20d57 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SignificantTextAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L838-L910 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/simpleanalyzer.go b/typedapi/types/simpleanalyzer.go index cf5a4b9bfe..76d4daecfb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SimpleAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L83-L86 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L329-L332 type SimpleAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/simplemovingaverageaggregation.go b/typedapi/types/simplemovingaverageaggregation.go index 75c2b4f779..e0d58df358 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SimpleMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L247-L250 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/simplepatternsplittokenizer.go b/typedapi/types/simplepatternsplittokenizer.go new file mode 100644 index 0000000000..8e6cda8185 --- /dev/null +++ b/typedapi/types/simplepatternsplittokenizer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SimplePatternSplitTokenizer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L116-L119 +type SimplePatternSplitTokenizer struct { + Pattern *string `json:"pattern,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *SimplePatternSplitTokenizer) 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 "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 "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 SimplePatternSplitTokenizer) MarshalJSON() ([]byte, error) { + type innerSimplePatternSplitTokenizer SimplePatternSplitTokenizer + tmp := innerSimplePatternSplitTokenizer{ + Pattern: s.Pattern, + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "simple_pattern_split" + + return json.Marshal(tmp) +} + +// NewSimplePatternSplitTokenizer returns a SimplePatternSplitTokenizer. +func NewSimplePatternSplitTokenizer() *SimplePatternSplitTokenizer { + r := &SimplePatternSplitTokenizer{} + + return r +} diff --git a/typedapi/types/simplepatterntokenizer.go b/typedapi/types/simplepatterntokenizer.go new file mode 100644 index 0000000000..72b99ae169 --- /dev/null +++ b/typedapi/types/simplepatterntokenizer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SimplePatternTokenizer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L111-L114 +type SimplePatternTokenizer struct { + Pattern *string `json:"pattern,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *SimplePatternTokenizer) 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 "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 "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 SimplePatternTokenizer) MarshalJSON() ([]byte, error) { + type innerSimplePatternTokenizer SimplePatternTokenizer + tmp := innerSimplePatternTokenizer{ + Pattern: s.Pattern, + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "simple_pattern" + + return json.Marshal(tmp) +} + +// NewSimplePatternTokenizer returns a SimplePatternTokenizer. +func NewSimplePatternTokenizer() *SimplePatternTokenizer { + r := &SimplePatternTokenizer{} + + return r +} diff --git a/typedapi/types/simplequerystringflags.go b/typedapi/types/simplequerystringflags.go index 546ade9661..1798915431 100644 --- a/typedapi/types/simplequerystringflags.go +++ b/typedapi/types/simplequerystringflags.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SimpleQueryStringFlags type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L702-L706 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L723-L727 type SimpleQueryStringFlags PipeSeparatedFlagsSimpleQueryStringFlag diff --git a/typedapi/types/simplequerystringquery.go b/typedapi/types/simplequerystringquery.go index 865c697055..bd345d8fd0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SimpleQueryStringQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/fulltext.ts#L765-L830 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/fulltext.ts#L786-L854 type SimpleQueryStringQuery struct { // AnalyzeWildcard If `true`, the query attempts to analyze wildcard terms in the query string. AnalyzeWildcard *bool `json:"analyze_wildcard,omitempty"` diff --git a/typedapi/types/simplevalueaggregate.go b/typedapi/types/simplevalueaggregate.go index dd325c67de..5ab24cd92a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SimpleValueAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L224-L225 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/simulatedactions.go b/typedapi/types/simulatedactions.go index e63707bc53..2d18b7047e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SimulatedActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Action.ts#L96-L100 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Action.ts#L90-L94 type SimulatedActions struct { Actions []string `json:"actions"` All *SimulatedActions `json:"all,omitempty"` diff --git a/typedapi/types/simulatedocumentresult.go b/typedapi/types/simulatedocumentresult.go new file mode 100644 index 0000000000..e508984d26 --- /dev/null +++ b/typedapi/types/simulatedocumentresult.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +// SimulateDocumentResult type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/simulate/types.ts#L46-L50 +type SimulateDocumentResult struct { + Doc *DocumentSimulation `json:"doc,omitempty"` + Error *ErrorCause `json:"error,omitempty"` + ProcessorResults []PipelineSimulation `json:"processor_results,omitempty"` +} + +// NewSimulateDocumentResult returns a SimulateDocumentResult. +func NewSimulateDocumentResult() *SimulateDocumentResult { + r := &SimulateDocumentResult{} + + return r +} diff --git a/typedapi/types/simulateingest.go b/typedapi/types/simulateingest.go index bf4685cdb0..fe4952903a 100644 --- a/typedapi/types/simulateingest.go +++ b/typedapi/types/simulateingest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,9 +30,10 @@ import ( // SimulateIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/simulate/types.ts#L28-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/simulate/types.ts#L29-L37 type SimulateIngest struct { Pipeline *string `json:"pipeline,omitempty"` + Redact_ *Redact `json:"_redact,omitempty"` Timestamp DateTime `json:"timestamp"` } @@ -56,6 +57,11 @@ func (s *SimulateIngest) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Pipeline", err) } + case "_redact": + if err := dec.Decode(&s.Redact_); err != nil { + return fmt.Errorf("%s | %w", "Redact_", err) + } + case "timestamp": if err := dec.Decode(&s.Timestamp); err != nil { return fmt.Errorf("%s | %w", "Timestamp", err) diff --git a/typedapi/types/sizefield.go b/typedapi/types/sizefield.go index 41120fbb25..48eec827ae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SizeField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/meta-fields.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/meta-fields.ts#L54-L56 type SizeField struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/sizehttphistogram.go b/typedapi/types/sizehttphistogram.go new file mode 100644 index 0000000000..842cf8ee52 --- /dev/null +++ b/typedapi/types/sizehttphistogram.go @@ -0,0 +1,111 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SizeHttpHistogram type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L714-L718 +type SizeHttpHistogram struct { + Count int64 `json:"count"` + GeBytes *int64 `json:"ge_bytes,omitempty"` + LtBytes *int64 `json:"lt_bytes,omitempty"` +} + +func (s *SizeHttpHistogram) 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 "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", "Count", err) + } + s.Count = value + case float64: + f := int64(v) + s.Count = f + } + + case "ge_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", "GeBytes", err) + } + s.GeBytes = &value + case float64: + f := int64(v) + s.GeBytes = &f + } + + case "lt_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", "LtBytes", err) + } + s.LtBytes = &value + case float64: + f := int64(v) + s.LtBytes = &f + } + + } + } + return nil +} + +// NewSizeHttpHistogram returns a SizeHttpHistogram. +func NewSizeHttpHistogram() *SizeHttpHistogram { + r := &SizeHttpHistogram{} + + return r +} diff --git a/typedapi/types/slackaction.go b/typedapi/types/slackaction.go index 4d077f8743..b5d74729e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SlackAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L91-L94 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L91-L94 type SlackAction struct { Account *string `json:"account,omitempty"` Message SlackMessage `json:"message"` diff --git a/typedapi/types/slackattachment.go b/typedapi/types/slackattachment.go index da4fb1a1f9..b2eb26150e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SlackAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L101-L117 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L101-L117 type SlackAttachment struct { AuthorIcon *string `json:"author_icon,omitempty"` AuthorLink *string `json:"author_link,omitempty"` diff --git a/typedapi/types/slackattachmentfield.go b/typedapi/types/slackattachmentfield.go index 4ce0ae98c9..bd9d990791 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SlackAttachmentField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L119-L123 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L119-L123 type SlackAttachmentField struct { Int bool `json:"short"` Title string `json:"title"` diff --git a/typedapi/types/slackdynamicattachment.go b/typedapi/types/slackdynamicattachment.go index 3548d05e66..91ba9d5857 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SlackDynamicAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L125-L128 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L125-L128 type SlackDynamicAttachment struct { AttachmentTemplate SlackAttachment `json:"attachment_template"` ListPath string `json:"list_path"` diff --git a/typedapi/types/slackmessage.go b/typedapi/types/slackmessage.go index 0f3be52640..07dadd96ae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SlackMessage type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L130-L137 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L130-L137 type SlackMessage struct { Attachments []SlackAttachment `json:"attachments"` DynamicAttachments *SlackDynamicAttachment `json:"dynamic_attachments,omitempty"` diff --git a/typedapi/types/slackresult.go b/typedapi/types/slackresult.go index 5a058cb852..6637b3ebdf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SlackResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L96-L99 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L96-L99 type SlackResult struct { Account *string `json:"account,omitempty"` Message SlackMessage `json:"message"` diff --git a/typedapi/types/slicedscroll.go b/typedapi/types/slicedscroll.go index 6366a7f640..166a0e151a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SlicedScroll type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/SlicedScroll.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/SlicedScroll.ts#L23-L27 type SlicedScroll struct { Field *string `json:"field,omitempty"` Id string `json:"id"` diff --git a/typedapi/types/slices.go b/typedapi/types/slices.go index 7d8c69b404..0ffc8d2f79 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // int // slicescalculation.SlicesCalculation // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L364-L369 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L365-L370 type Slices any diff --git a/typedapi/types/slm.go b/typedapi/types/slm.go index fc0ebf27a6..eebc938d2c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Slm type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L449-L452 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L447-L450 type Slm struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/slmindicator.go b/typedapi/types/slmindicator.go index 4c137e5c69..812a6f3011 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SlmIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L157-L161 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L174-L178 type SlmIndicator struct { Details *SlmIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/slmindicatordetails.go b/typedapi/types/slmindicatordetails.go index de0ec36106..6bbbe16029 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SlmIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L162-L166 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L179-L183 type SlmIndicatorDetails struct { Policies int64 `json:"policies"` SlmStatus lifecycleoperationmode.LifecycleOperationMode `json:"slm_status"` diff --git a/typedapi/types/slmindicatorunhealthypolicies.go b/typedapi/types/slmindicatorunhealthypolicies.go index b712f9015b..3cc9f0f252 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SlmIndicatorUnhealthyPolicies type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/health_report/types.ts#L168-L171 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L185-L188 type SlmIndicatorUnhealthyPolicies struct { Count int64 `json:"count"` InvocationsSinceLastSuccess map[string]int64 `json:"invocations_since_last_success,omitempty"` diff --git a/typedapi/types/slmpolicy.go b/typedapi/types/slmpolicy.go index 04d102e3b3..dba52efa2d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SLMPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/_types/SnapshotLifecycle.ts#L76-L82 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/_types/SnapshotLifecycle.ts#L76-L82 type SLMPolicy struct { Config *Configuration `json:"config,omitempty"` Name string `json:"name"` diff --git a/typedapi/types/slowlogsettings.go b/typedapi/types/slowlogsettings.go index 18bb905327..9b3ed2d04f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SlowlogSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L490-L495 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L490-L495 type SlowlogSettings struct { Level *string `json:"level,omitempty"` Reformat *bool `json:"reformat,omitempty"` diff --git a/typedapi/types/slowlogtresholdlevels.go b/typedapi/types/slowlogtresholdlevels.go index d9b493f1cd..af0908e20f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SlowlogTresholdLevels type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L502-L507 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L502-L507 type SlowlogTresholdLevels struct { Debug Duration `json:"debug,omitempty"` Info Duration `json:"info,omitempty"` diff --git a/typedapi/types/slowlogtresholds.go b/typedapi/types/slowlogtresholds.go index 3d6f7e20d4..ff086a140b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SlowlogTresholds type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L497-L500 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L497-L500 type SlowlogTresholds struct { Fetch *SlowlogTresholdLevels `json:"fetch,omitempty"` Query *SlowlogTresholdLevels `json:"query,omitempty"` diff --git a/typedapi/types/smoothingmodelcontainer.go b/typedapi/types/smoothingmodelcontainer.go index c5f015c6d2..d36cf9b8c5 100644 --- a/typedapi/types/smoothingmodelcontainer.go +++ b/typedapi/types/smoothingmodelcontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SmoothingModelContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L445-L461 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L445-L461 type SmoothingModelContainer struct { // Laplace A smoothing model that uses an additive smoothing where a constant (typically // `1.0` or smaller) is added to all counts to balance weights. diff --git a/typedapi/types/snapshotindexstats.go b/typedapi/types/snapshotindexstats.go index d6a7cebc23..f1799b8c86 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SnapshotIndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotIndexStats.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotIndexStats.ts#L25-L29 type SnapshotIndexStats struct { Shards map[string]SnapshotShardsStatus `json:"shards"` ShardsStats SnapshotShardsStats `json:"shards_stats"` diff --git a/typedapi/types/snapshotinfo.go b/typedapi/types/snapshotinfo.go index 4b5d5764a1..e902d32a34 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SnapshotInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotInfo.ts#L41-L71 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotInfo.ts#L41-L71 type SnapshotInfo struct { DataStreams []string `json:"data_streams"` Duration Duration `json:"duration,omitempty"` diff --git a/typedapi/types/snapshotlifecycle.go b/typedapi/types/snapshotlifecycle.go index 1656af0031..7d165994d3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SnapshotLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/_types/SnapshotLifecycle.ts#L38-L49 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/_types/SnapshotLifecycle.ts#L38-L49 type SnapshotLifecycle struct { InProgress *InProgress `json:"in_progress,omitempty"` LastFailure *Invocation `json:"last_failure,omitempty"` diff --git a/typedapi/types/snapshotresponseitem.go b/typedapi/types/snapshotresponseitem.go index f7f3d4cd21..915e65fc31 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SnapshotResponseItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/get/SnapshotGetResponse.ts#L44-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/get/SnapshotGetResponse.ts#L44-L48 type SnapshotResponseItem struct { Error *ErrorCause `json:"error,omitempty"` Repository string `json:"repository"` diff --git a/typedapi/types/snapshotrestore.go b/typedapi/types/snapshotrestore.go index e26690878c..172455b1a1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SnapshotRestore type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/restore/SnapshotRestoreResponse.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/restore/SnapshotRestoreResponse.ts#L30-L34 type SnapshotRestore struct { Indices []string `json:"indices"` Shards ShardStatistics `json:"shards"` diff --git a/typedapi/types/snapshotshardfailure.go b/typedapi/types/snapshotshardfailure.go index 52bf0fc353..854b3d0475 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,13 +31,14 @@ import ( // SnapshotShardFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotShardFailure.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotShardFailure.ts#L22-L29 type SnapshotShardFailure struct { - Index string `json:"index"` - NodeId *string `json:"node_id,omitempty"` - Reason string `json:"reason"` - ShardId string `json:"shard_id"` - Status string `json:"status"` + Index string `json:"index"` + IndexUuid string `json:"index_uuid"` + NodeId *string `json:"node_id,omitempty"` + Reason string `json:"reason"` + ShardId string `json:"shard_id"` + Status string `json:"status"` } func (s *SnapshotShardFailure) UnmarshalJSON(data []byte) error { @@ -60,6 +61,11 @@ func (s *SnapshotShardFailure) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Index", err) } + case "index_uuid": + if err := dec.Decode(&s.IndexUuid); err != nil { + return fmt.Errorf("%s | %w", "IndexUuid", err) + } + case "node_id": if err := dec.Decode(&s.NodeId); err != nil { return fmt.Errorf("%s | %w", "NodeId", err) diff --git a/typedapi/types/snapshotshardsstats.go b/typedapi/types/snapshotshardsstats.go index 1714ff19d9..0b452822b8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SnapshotShardsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotShardsStats.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotShardsStats.ts#L22-L29 type SnapshotShardsStats struct { Done int64 `json:"done"` Failed int64 `json:"failed"` diff --git a/typedapi/types/snapshotshardsstatus.go b/typedapi/types/snapshotshardsstatus.go index c1a21d7316..eadd5e16db 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // SnapshotShardsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotShardsStatus.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotShardsStatus.ts#L24-L27 type SnapshotShardsStatus struct { Stage shardsstatsstage.ShardsStatsStage `json:"stage"` Stats ShardsStatsSummary `json:"stats"` diff --git a/typedapi/types/snapshotsrecord.go b/typedapi/types/snapshotsrecord.go index 0004b0a44a..db950c6917 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SnapshotsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/snapshots/types.ts#L24-L96 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/snapshotstats.go b/typedapi/types/snapshotstats.go index d07f8b54cf..f87ad2a3d3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SnapshotStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotStats.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotStats.ts#L23-L29 type SnapshotStats struct { Incremental FileCountSnapshotStats `json:"incremental"` StartTimeInMillis int64 `json:"start_time_in_millis"` diff --git a/typedapi/types/snowballanalyzer.go b/typedapi/types/snowballanalyzer.go index 00dd3dbf82..d21293d1e0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // SnowballAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L88-L93 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L334-L339 type SnowballAnalyzer struct { Language snowballlanguage.SnowballLanguage `json:"language"` Stopwords []string `json:"stopwords,omitempty"` diff --git a/typedapi/types/snowballtokenfilter.go b/typedapi/types/snowballtokenfilter.go index 53ad25c635..c5d2efe1d8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // SnowballTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L311-L314 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L310-L313 type SnowballTokenFilter struct { Language *snowballlanguage.SnowballLanguage `json:"language,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/softdeletes.go b/typedapi/types/softdeletes.go index 3de18f96c2..a55e11b6d7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SoftDeletes type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L50-L63 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L50-L63 type SoftDeletes struct { // Enabled Indicates whether soft deletes are enabled on the index. Enabled *bool `json:"enabled,omitempty"` diff --git a/typedapi/types/soranianalyzer.go b/typedapi/types/soranianalyzer.go new file mode 100644 index 0000000000..e4dc3f6105 --- /dev/null +++ b/typedapi/types/soranianalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SoraniAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L278-L283 +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"` +} + +func (s *SoraniAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 SoraniAnalyzer) MarshalJSON() ([]byte, error) { + type innerSoraniAnalyzer SoraniAnalyzer + tmp := innerSoraniAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "sorani" + + return json.Marshal(tmp) +} + +// NewSoraniAnalyzer returns a SoraniAnalyzer. +func NewSoraniAnalyzer() *SoraniAnalyzer { + r := &SoraniAnalyzer{} + + return r +} diff --git a/typedapi/types/sort.go b/typedapi/types/sort.go index a716eb4899..ba98fd431c 100644 --- a/typedapi/types/sort.go +++ b/typedapi/types/sort.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Sort type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L105-L105 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/sort.ts#L104-L104 type Sort []SortCombinations diff --git a/typedapi/types/sortcombinations.go b/typedapi/types/sortcombinations.go index 235007534c..45379229e7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // SortOptions // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L99-L103 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/sort.ts#L98-L102 type SortCombinations any diff --git a/typedapi/types/sortoptions.go b/typedapi/types/sortoptions.go index facea9b2a2..e1488bdd05 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -27,7 +27,7 @@ import ( // SortOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/sort.ts#L87-L97 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/sort.ts#L86-L96 type SortOptions struct { Doc_ *ScoreSort `json:"_doc,omitempty"` GeoDistance_ *GeoDistanceSort `json:"_geo_distance,omitempty"` diff --git a/typedapi/types/sortprocessor.go b/typedapi/types/sortprocessor.go index a464187227..58f8bcad63 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SortProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L1079-L1095 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1478-L1494 type SortProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/sourceconfig.go b/typedapi/types/sourceconfig.go index 37046db4f9..68b1989ab4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // bool // SourceFilter // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/SourceFilter.ts#L33-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/SourceFilter.ts#L33-L37 type SourceConfig any diff --git a/typedapi/types/sourceconfigparam.go b/typedapi/types/sourceconfigparam.go index dde0bb3407..c34a2bfc3d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // bool // []string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/SourceFilter.ts#L39-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/SourceFilter.ts#L39-L45 type SourceConfigParam any diff --git a/typedapi/types/sourcefield.go b/typedapi/types/sourcefield.go index 528862083a..fff74ea0e5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SourceField type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/meta-fields.ts#L58-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/meta-fields.ts#L58-L65 type SourceField struct { Compress *bool `json:"compress,omitempty"` CompressThreshold *string `json:"compress_threshold,omitempty"` diff --git a/typedapi/types/sourcefilter.go b/typedapi/types/sourcefilter.go index 58a9c0f87f..4860f7ee4f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SourceFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/SourceFilter.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/SourceFilter.ts#L23-L31 type SourceFilter struct { Excludes []string `json:"excludes,omitempty"` Includes []string `json:"includes,omitempty"` diff --git a/typedapi/types/sourceonlyrepository.go b/typedapi/types/sourceonlyrepository.go index 1a431c6b68..ed5c709a34 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SourceOnlyRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L65-L68 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L65-L68 type SourceOnlyRepository struct { Settings SourceOnlyRepositorySettings `json:"settings"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/sourceonlyrepositorysettings.go b/typedapi/types/sourceonlyrepositorysettings.go index 5e1b1d786e..fb0a706119 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SourceOnlyRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotRepository.ts#L117-L124 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotRepository.ts#L117-L124 type SourceOnlyRepositorySettings struct { ChunkSize ByteSize `json:"chunk_size,omitempty"` Compress *bool `json:"compress,omitempty"` diff --git a/typedapi/types/spancontainingquery.go b/typedapi/types/spancontainingquery.go index 729935d78d..737e3221f1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SpanContainingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/span.ts#L25-L36 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/spanfieldmaskingquery.go b/typedapi/types/spanfieldmaskingquery.go index fde77c6d1f..33c8e35f77 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SpanFieldMaskingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/span.ts#L38-L41 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/spanfirstquery.go b/typedapi/types/spanfirstquery.go index 72d2e739c9..b679cb8195 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SpanFirstQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/span.ts#L43-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/spangapquery.go b/typedapi/types/spangapquery.go index f1081f0987..1bdc918b3a 100644 --- a/typedapi/types/spangapquery.go +++ b/typedapi/types/spangapquery.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SpanGapQuery type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/span.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/span.ts#L63-L65 type SpanGapQuery map[string]int diff --git a/typedapi/types/spanishanalyzer.go b/typedapi/types/spanishanalyzer.go new file mode 100644 index 0000000000..91c227b12b --- /dev/null +++ b/typedapi/types/spanishanalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SpanishAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L285-L290 +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"` +} + +func (s *SpanishAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 SpanishAnalyzer) MarshalJSON() ([]byte, error) { + type innerSpanishAnalyzer SpanishAnalyzer + tmp := innerSpanishAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "spanish" + + return json.Marshal(tmp) +} + +// NewSpanishAnalyzer returns a SpanishAnalyzer. +func NewSpanishAnalyzer() *SpanishAnalyzer { + r := &SpanishAnalyzer{} + + return r +} diff --git a/typedapi/types/spanmultitermquery.go b/typedapi/types/spanmultitermquery.go index a14aac47bf..5c50c43185 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SpanMultiTermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/span.ts#L58-L63 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/spannearquery.go b/typedapi/types/spannearquery.go index 2ba83a4192..52e8aeb1d4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SpanNearQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/span.ts#L65-L78 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/spannotquery.go b/typedapi/types/spannotquery.go index 3c0c8dab93..f474fd8bc4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SpanNotQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/span.ts#L80-L104 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/spanorquery.go b/typedapi/types/spanorquery.go index 5b4530158c..a0b1a477b2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SpanOrQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/span.ts#L106-L111 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/spanquery.go b/typedapi/types/spanquery.go index e8624eabca..59eb48909c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SpanQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/span.ts#L131-L173 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/span.ts#L158-L200 type SpanQuery struct { // SpanContaining Accepts a list of span queries, but only returns those spans which also match // a second span query. diff --git a/typedapi/types/spantermquery.go b/typedapi/types/spantermquery.go index 0ecb831bc7..4381cd2df1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SpanTermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/span.ts#L113-L116 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/span.ts#L134-L140 type SpanTermQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/spanwithinquery.go b/typedapi/types/spanwithinquery.go index 55c790cefa..1d3b1cc7c7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SpanWithinQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/span.ts#L118-L129 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/span.ts#L142-L156 type SpanWithinQuery struct { // Big Can be any span query. // Matching spans from `little` that are enclosed within `big` are returned. diff --git a/typedapi/types/sparseembeddingresult.go b/typedapi/types/sparseembeddingresult.go index abf3a50e51..a7655bbc1a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SparseEmbeddingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/_types/Results.ts#L36-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/_types/Results.ts#L36-L38 type SparseEmbeddingResult struct { Embedding SparseVector `json:"embedding"` } diff --git a/typedapi/types/sparsevector.go b/typedapi/types/sparsevector.go index 9814992119..74baed4360 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SparseVector type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/_types/Results.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/_types/Results.ts#L24-L28 type SparseVector map[string]float32 diff --git a/typedapi/types/sparsevectorproperty.go b/typedapi/types/sparsevectorproperty.go index a5e30cfc96..d7a8f45e68 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SparseVectorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L202-L204 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L202-L204 type SparseVectorProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/sparsevectorquery.go b/typedapi/types/sparsevectorquery.go index bd90efb297..d691a2f5b0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SparseVectorQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/SparseVectorQuery.ts#L26-L79 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/SparseVectorQuery.ts#L26-L80 type SparseVectorQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/splitprocessor.go b/typedapi/types/splitprocessor.go index cd36293ea4..708d9bab90 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SplitProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L1097-L1122 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1496-L1521 type SplitProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/sql.go b/typedapi/types/sql.go index 51319c480e..56c4cfa9be 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Sql type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L386-L389 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L384-L387 type Sql struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/ssl.go b/typedapi/types/ssl.go index 219d3afd8a..483b98f97b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Ssl type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L391-L394 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L389-L392 type Ssl struct { Http FeatureToggle `json:"http"` Transport FeatureToggle `json:"transport"` diff --git a/typedapi/types/stagnatingbackingindices.go b/typedapi/types/stagnatingbackingindices.go new file mode 100644 index 0000000000..d79d18a0b2 --- /dev/null +++ b/typedapi/types/stagnatingbackingindices.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// StagnatingBackingIndices type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/health_report/types.ts#L157-L161 +type StagnatingBackingIndices struct { + FirstOccurrenceTimestamp int64 `json:"first_occurrence_timestamp"` + IndexName string `json:"index_name"` + RetryCount int `json:"retry_count"` +} + +func (s *StagnatingBackingIndices) 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 "first_occurrence_timestamp": + 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", "FirstOccurrenceTimestamp", err) + } + s.FirstOccurrenceTimestamp = value + case float64: + f := int64(v) + s.FirstOccurrenceTimestamp = f + } + + case "index_name": + if err := dec.Decode(&s.IndexName); err != nil { + return fmt.Errorf("%s | %w", "IndexName", err) + } + + case "retry_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", "RetryCount", err) + } + s.RetryCount = value + case float64: + f := int(v) + s.RetryCount = f + } + + } + } + return nil +} + +// NewStagnatingBackingIndices returns a StagnatingBackingIndices. +func NewStagnatingBackingIndices() *StagnatingBackingIndices { + r := &StagnatingBackingIndices{} + + return r +} diff --git a/typedapi/types/standardanalyzer.go b/typedapi/types/standardanalyzer.go index f16e71ee64..636f511aa4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StandardAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L95-L99 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L341-L345 type StandardAnalyzer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Stopwords []string `json:"stopwords,omitempty"` diff --git a/typedapi/types/standarddeviationbounds.go b/typedapi/types/standarddeviationbounds.go index 872979fac2..e06d90b480 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // StandardDeviationBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L260-L267 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L281-L288 type StandardDeviationBounds struct { Lower *Float64 `json:"lower,omitempty"` LowerPopulation *Float64 `json:"lower_population,omitempty"` diff --git a/typedapi/types/standarddeviationboundsasstring.go b/typedapi/types/standarddeviationboundsasstring.go index 6c7c8f0b45..332cba753f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StandardDeviationBoundsAsString type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L269-L276 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L290-L297 type StandardDeviationBoundsAsString struct { Lower string `json:"lower"` LowerPopulation string `json:"lower_population"` diff --git a/typedapi/types/standardretriever.go b/typedapi/types/standardretriever.go index 7fddacd5f4..c29ace671e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StandardRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Retriever.ts#L43-L56 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Retriever.ts#L51-L62 type StandardRetriever struct { // Collapse Collapses the top documents by a specified key into a single top document per // key. diff --git a/typedapi/types/standardtokenizer.go b/typedapi/types/standardtokenizer.go index 14d4e4d11c..0bf063f7dd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StandardTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L105-L108 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L121-L124 type StandardTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/statistics.go b/typedapi/types/statistics.go index bcee6733ed..bb6d7dc678 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Statistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/slm/_types/SnapshotLifecycle.ts#L51-L74 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/slm/_types/SnapshotLifecycle.ts#L51-L74 type Statistics struct { Policy *string `json:"policy,omitempty"` RetentionDeletionTime Duration `json:"retention_deletion_time,omitempty"` diff --git a/typedapi/types/stats.go b/typedapi/types/stats.go index 723e8ae632..df5949dd48 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // Stats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L30-L114 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L30-L114 type Stats struct { // AdaptiveSelection Statistics about adaptive replica selection. AdaptiveSelection map[string]AdaptiveSelection `json:"adaptive_selection,omitempty"` diff --git a/typedapi/types/statsaggregate.go b/typedapi/types/statsaggregate.go index 0d568fc522..7f01e38c10 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L240-L255 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L257-L273 type StatsAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` diff --git a/typedapi/types/statsaggregation.go b/typedapi/types/statsaggregation.go index 544f58e237..73ebb2fb1d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L282-L282 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L291-L291 type StatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/statsbucketaggregate.go b/typedapi/types/statsbucketaggregate.go index b1c480a280..81224a9daa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StatsBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L257-L258 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L275-L279 type StatsBucketAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` diff --git a/typedapi/types/statsbucketaggregation.go b/typedapi/types/statsbucketaggregation.go index cdcf990953..cb6e801ed3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // StatsBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L369-L369 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/status.go b/typedapi/types/status.go index bf594000b5..6714967b5c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Status type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/snapshot/_types/SnapshotStatus.ts#L26-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/snapshot/_types/SnapshotStatus.ts#L26-L35 type Status struct { IncludeGlobalState bool `json:"include_global_state"` Indices map[string]SnapshotIndexStats `json:"indices"` diff --git a/typedapi/types/stemmeroverridetokenfilter.go b/typedapi/types/stemmeroverridetokenfilter.go index fa96ed8a0a..2002fb0452 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StemmerOverrideTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L316-L320 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L315-L319 type StemmerOverrideTokenFilter struct { Rules []string `json:"rules,omitempty"` RulesPath *string `json:"rules_path,omitempty"` diff --git a/typedapi/types/stemmertokenfilter.go b/typedapi/types/stemmertokenfilter.go index ac008e6a8c..26741c5a4b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StemmerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L322-L326 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L321-L325 type StemmerTokenFilter struct { Language *string `json:"language,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/stepkey.go b/typedapi/types/stepkey.go index 8c73eac693..67498bea58 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,11 +31,11 @@ import ( // StepKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/move_to_step/types.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/move_to_step/types.ts#L20-L25 type StepKey struct { - Action string `json:"action"` - Name string `json:"name"` - Phase string `json:"phase"` + Action *string `json:"action,omitempty"` + Name *string `json:"name,omitempty"` + Phase string `json:"phase"` } func (s *StepKey) UnmarshalJSON(data []byte) error { @@ -63,7 +63,7 @@ func (s *StepKey) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Action = o + s.Action = &o case "name": var tmp json.RawMessage @@ -75,7 +75,7 @@ func (s *StepKey) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Name = o + s.Name = &o case "phase": var tmp json.RawMessage diff --git a/typedapi/types/stopanalyzer.go b/typedapi/types/stopanalyzer.go index 76ef6c70cc..a2e2c32fd9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StopAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L101-L106 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L347-L352 type StopAnalyzer struct { Stopwords []string `json:"stopwords,omitempty"` StopwordsPath *string `json:"stopwords_path,omitempty"` diff --git a/typedapi/types/stoptokenfilter.go b/typedapi/types/stoptokenfilter.go index 5888e14daa..92ebe1894a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StopTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L97-L103 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L96-L102 type StopTokenFilter struct { IgnoreCase *bool `json:"ignore_case,omitempty"` RemoveTrailing *bool `json:"remove_trailing,omitempty"` diff --git a/typedapi/types/stopwords.go b/typedapi/types/stopwords.go index 8bbf3664af..d5e4152d7d 100644 --- a/typedapi/types/stopwords.go +++ b/typedapi/types/stopwords.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // StopWords type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/StopWords.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/StopWords.ts#L20-L26 type StopWords []string diff --git a/typedapi/types/storage.go b/typedapi/types/storage.go index 538eaf8691..00141d902a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // Storage type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L509-L518 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L509-L518 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. diff --git a/typedapi/types/storedscript.go b/typedapi/types/storedscript.go index 186dd75b6d..9fcbe29073 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // StoredScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Scripting.ts#L47-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Scripting.ts#L47-L57 type StoredScript struct { // Lang Specifies the language the script is written in. Lang scriptlanguage.ScriptLanguage `json:"lang"` diff --git a/typedapi/types/storestats.go b/typedapi/types/storestats.go index f066d69991..0170ce1e8f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StoreStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L368-L395 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L368-L395 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. diff --git a/typedapi/types/stringifiedboolean.go b/typedapi/types/stringifiedboolean.go index b027802677..c1c90d74dd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // bool // string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_spec_utils/Stringified.ts#L20-L27 type Stringifiedboolean any diff --git a/typedapi/types/stringifieddouble.go b/typedapi/types/stringifieddouble.go new file mode 100644 index 0000000000..fc39b28540 --- /dev/null +++ b/typedapi/types/stringifieddouble.go @@ -0,0 +1,29 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +// Stringifieddouble holds the union for the following types: +// +// Float64 +// string +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_spec_utils/Stringified.ts#L20-L27 +type Stringifieddouble any diff --git a/typedapi/types/stringifiedepochtimeunitmillis.go b/typedapi/types/stringifiedepochtimeunitmillis.go index 046843df60..e5fa77e7e6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedEpochTimeUnitMillis any diff --git a/typedapi/types/stringifiedepochtimeunitseconds.go b/typedapi/types/stringifiedepochtimeunitseconds.go index 34351f8252..5a4874658a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedEpochTimeUnitSeconds any diff --git a/typedapi/types/stringifiedinteger.go b/typedapi/types/stringifiedinteger.go index 68809e830d..e101ac8e26 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_spec_utils/Stringified.ts#L20-L27 type Stringifiedinteger any diff --git a/typedapi/types/stringifiedversionnumber.go b/typedapi/types/stringifiedversionnumber.go index a3560182d0..214da21afd 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedVersionNumber any diff --git a/typedapi/types/stringraretermsaggregate.go b/typedapi/types/stringraretermsaggregate.go index 16922aa846..4ccfaacf8d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // StringRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L445-L449 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L483-L487 type StringRareTermsAggregate struct { Buckets BucketsStringRareTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/stringraretermsbucket.go b/typedapi/types/stringraretermsbucket.go index 0c66bd1b84..ad9cc04c5e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // StringRareTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L451-L453 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L489-L491 type StringRareTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -498,6 +498,13 @@ func (s *StringRareTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/stringstatsaggregate.go b/typedapi/types/stringstatsaggregate.go index 07f4d71f8f..f9ccbff075 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StringStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L700-L711 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L793-L804 type StringStatsAggregate struct { AvgLength *Float64 `json:"avg_length,omitempty"` AvgLengthAsString *string `json:"avg_length_as_string,omitempty"` diff --git a/typedapi/types/stringstatsaggregation.go b/typedapi/types/stringstatsaggregation.go index 4b749eaaf3..e8042341c2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StringStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L284-L290 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L293-L299 type StringStatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/stringtermsaggregate.go b/typedapi/types/stringtermsaggregate.go index 3d2069e0e7..37ef6f4ee0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StringTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L386-L391 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L424-L429 type StringTermsAggregate struct { Buckets BucketsStringTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/stringtermsbucket.go b/typedapi/types/stringtermsbucket.go index dc5c51ba92..9800ed1889 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // StringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L397-L399 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L435-L437 type StringTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -507,6 +507,13 @@ func (s *StringTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/stupidbackoffsmoothingmodel.go b/typedapi/types/stupidbackoffsmoothingmodel.go index b6344c5638..c8de18ea43 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // StupidBackoffSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L463-L468 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L463-L468 type StupidBackoffSmoothingModel struct { // Discount A constant factor that the lower order n-gram model is discounted by. Discount Float64 `json:"discount"` diff --git a/typedapi/types/suggest.go b/typedapi/types/suggest.go index dcb00c06b3..efdd031625 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ package types // PhraseSuggest // TermSuggest // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L34-L40 type Suggest any diff --git a/typedapi/types/suggestcontext.go b/typedapi/types/suggestcontext.go index 89d6ab9c4e..1af7a8c509 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SuggestContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/specialized.ts#L43-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/specialized.ts#L43-L48 type SuggestContext struct { Name string `json:"name"` Path *string `json:"path,omitempty"` diff --git a/typedapi/types/suggester.go b/typedapi/types/suggester.go index 98a67af8a4..e4e246574a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Suggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L101-L107 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L101-L107 type Suggester struct { Suggesters map[string]FieldSuggester `json:"-"` // Text Global suggest text, to avoid repetition when the same text is used in diff --git a/typedapi/types/suggestfuzziness.go b/typedapi/types/suggestfuzziness.go index 41272b9e94..6fb3489308 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SuggestFuzziness type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L196-L224 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L196-L224 type SuggestFuzziness struct { // Fuzziness The fuzziness factor. Fuzziness Fuzziness `json:"fuzziness,omitempty"` diff --git a/typedapi/types/sumaggregate.go b/typedapi/types/sumaggregate.go index 5480219199..728f28c7f2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SumAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L203-L207 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/sumaggregation.go b/typedapi/types/sumaggregation.go index 15b5da7d3e..79551ed532 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SumAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L292-L292 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L301-L301 type SumAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/sumbucketaggregation.go b/typedapi/types/sumbucketaggregation.go index df1699fa0a..43074630ce 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SumBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/pipeline.ts#L371-L371 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/summary.go b/typedapi/types/summary.go index e0aebd6245..d25670c739 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // Summary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/enrich/_types/Policy.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/enrich/_types/Policy.ts#L24-L26 type Summary struct { Config map[policytype.PolicyType]EnrichPolicy `json:"config"` } diff --git a/typedapi/types/swedishanalyzer.go b/typedapi/types/swedishanalyzer.go new file mode 100644 index 0000000000..7f822871d6 --- /dev/null +++ b/typedapi/types/swedishanalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SwedishAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L292-L297 +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"` +} + +func (s *SwedishAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 SwedishAnalyzer) MarshalJSON() ([]byte, error) { + type innerSwedishAnalyzer SwedishAnalyzer + tmp := innerSwedishAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "swedish" + + return json.Marshal(tmp) +} + +// NewSwedishAnalyzer returns a SwedishAnalyzer. +func NewSwedishAnalyzer() *SwedishAnalyzer { + r := &SwedishAnalyzer{} + + return r +} diff --git a/typedapi/types/synccontainer.go b/typedapi/types/synccontainer.go index 544b2cbf3e..641ce7579a 100644 --- a/typedapi/types/synccontainer.go +++ b/typedapi/types/synccontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SyncContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/_types/Transform.ts#L169-L175 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/_types/Transform.ts#L169-L175 type SyncContainer struct { // Time Specifies that the transform uses a time field to synchronize the source and // destination indices. diff --git a/typedapi/types/syncjobconnectorreference.go b/typedapi/types/syncjobconnectorreference.go index 6c40706c36..da736311d5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SyncJobConnectorReference type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/SyncJob.ts#L31-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/SyncJob.ts#L31-L40 type SyncJobConnectorReference struct { Configuration ConnectorConfiguration `json:"configuration"` Filtering FilteringRules `json:"filtering"` diff --git a/typedapi/types/syncrulesfeature.go b/typedapi/types/syncrulesfeature.go index cbf1cdb5ce..df1a58a9b1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // SyncRulesFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L219-L222 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L219-L222 type SyncRulesFeature struct { Advanced *FeatureEnabled `json:"advanced,omitempty"` Basic *FeatureEnabled `json:"basic,omitempty"` diff --git a/typedapi/types/synonymgraphtokenfilter.go b/typedapi/types/synonymgraphtokenfilter.go index 97422af1a1..41969327f8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SynonymGraphTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L110-L120 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L109-L119 type SynonymGraphTokenFilter struct { Expand *bool `json:"expand,omitempty"` Format *synonymformat.SynonymFormat `json:"format,omitempty"` diff --git a/typedapi/types/synonymrule.go b/typedapi/types/synonymrule.go index 95a014a038..0b4dd337be 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SynonymRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/_types/SynonymRule.ts#L26-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/_types/SynonymRule.ts#L26-L35 type SynonymRule struct { // Id Synonym Rule identifier Id *string `json:"id,omitempty"` diff --git a/typedapi/types/synonymruleread.go b/typedapi/types/synonymruleread.go index 8a08ba6865..4033bcec26 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // SynonymRuleRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/_types/SynonymRule.ts#L38-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/_types/SynonymRule.ts#L38-L47 type SynonymRuleRead struct { // Id Synonym Rule identifier Id string `json:"id"` diff --git a/typedapi/types/synonymssetitem.go b/typedapi/types/synonymssetitem.go index 62bb280a5e..d7b364fbe6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // SynonymsSetItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L30-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L30-L39 type SynonymsSetItem struct { // Count Number of synonym rules that the synonym set contains Count int `json:"count"` diff --git a/typedapi/types/synonymsupdateresult.go b/typedapi/types/synonymsupdateresult.go index 71753dbaf8..3736db3695 100644 --- a/typedapi/types/synonymsupdateresult.go +++ b/typedapi/types/synonymsupdateresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // SynonymsUpdateResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/synonyms/_types/SynonymsUpdateResult.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/synonyms/_types/SynonymsUpdateResult.ts#L23-L34 type SynonymsUpdateResult struct { // ReloadAnalyzersDetails Updating synonyms in a synonym set reloads the associated analyzers. // This is the analyzers reloading result diff --git a/typedapi/types/synonymtokenfilter.go b/typedapi/types/synonymtokenfilter.go index 2441576bdf..0b633cf1ad 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // SynonymTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L122-L132 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L121-L131 type SynonymTokenFilter struct { Expand *bool `json:"expand,omitempty"` Format *synonymformat.SynonymFormat `json:"format,omitempty"` diff --git a/typedapi/types/tablevaluescontainer.go b/typedapi/types/tablevaluescontainer.go index 89713a05d4..e703fad254 100644 --- a/typedapi/types/tablevaluescontainer.go +++ b/typedapi/types/tablevaluescontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TableValuesContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/esql/_types/TableValuesContainer.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/esql/_types/TableValuesContainer.ts#L22-L28 type TableValuesContainer struct { Float64 [][]Float64 `json:"double,omitempty"` Int [][]int `json:"integer,omitempty"` diff --git a/typedapi/types/tablevaluesintegervalue.go b/typedapi/types/tablevaluesintegervalue.go index de895b4714..8fd312a581 100644 --- a/typedapi/types/tablevaluesintegervalue.go +++ b/typedapi/types/tablevaluesintegervalue.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TableValuesIntegerValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/esql/_types/TableValuesContainer.ts#L30-L30 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/esql/_types/TableValuesContainer.ts#L30-L30 type TableValuesIntegerValue []int diff --git a/typedapi/types/tablevalueskeywordvalue.go b/typedapi/types/tablevalueskeywordvalue.go index 697f1ad2fa..919280f9ba 100644 --- a/typedapi/types/tablevalueskeywordvalue.go +++ b/typedapi/types/tablevalueskeywordvalue.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TableValuesKeywordValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/esql/_types/TableValuesContainer.ts#L31-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/esql/_types/TableValuesContainer.ts#L31-L31 type TableValuesKeywordValue []string diff --git a/typedapi/types/tablevalueslongdouble.go b/typedapi/types/tablevalueslongdouble.go index e83a3501c1..ed1ac7a7e3 100644 --- a/typedapi/types/tablevalueslongdouble.go +++ b/typedapi/types/tablevalueslongdouble.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TableValuesLongDouble type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/esql/_types/TableValuesContainer.ts#L33-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/esql/_types/TableValuesContainer.ts#L33-L33 type TableValuesLongDouble []Float64 diff --git a/typedapi/types/tablevalueslongvalue.go b/typedapi/types/tablevalueslongvalue.go index e36fea7d00..edfde40d06 100644 --- a/typedapi/types/tablevalueslongvalue.go +++ b/typedapi/types/tablevalueslongvalue.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TableValuesLongValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/esql/_types/TableValuesContainer.ts#L32-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/esql/_types/TableValuesContainer.ts#L32-L32 type TableValuesLongValue []int64 diff --git a/typedapi/types/targetmeanencodingpreprocessor.go b/typedapi/types/targetmeanencodingpreprocessor.go index 1b103b0331..0275b95438 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TargetMeanEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L49-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L49-L54 type TargetMeanEncodingPreprocessor struct { DefaultValue Float64 `json:"default_value"` FeatureName string `json:"feature_name"` diff --git a/typedapi/types/taskfailure.go b/typedapi/types/taskfailure.go index c0ebd04ab4..ade3c4f414 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TaskFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Errors.ts#L68-L73 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Errors.ts#L68-L73 type TaskFailure struct { NodeId string `json:"node_id"` Reason ErrorCause `json:"reason"` diff --git a/typedapi/types/taskid.go b/typedapi/types/taskid.go index c869dc94c2..80faf7665d 100644 --- a/typedapi/types/taskid.go +++ b/typedapi/types/taskid.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // int // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L132-L132 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L133-L133 type TaskId any diff --git a/typedapi/types/taskinfo.go b/typedapi/types/taskinfo.go index e43b3a5b59..5aac8900d0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TaskInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/tasks/_types/TaskInfo.ts#L32-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/tasks/_types/TaskInfo.ts#L32-L47 type TaskInfo struct { Action string `json:"action"` Cancellable bool `json:"cancellable"` diff --git a/typedapi/types/taskinfos.go b/typedapi/types/taskinfos.go index 4e4e193d35..4123643986 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // []TaskInfo // map[string]ParentTaskInfo // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/tasks/_types/TaskListResponseBase.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/tasks/_types/TaskListResponseBase.ts#L40-L43 type TaskInfos any diff --git a/typedapi/types/tasksrecord.go b/typedapi/types/tasksrecord.go index f077e3065c..7f237a8f3f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TasksRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/tasks/types.ts#L22-L101 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cat/tasks/types.ts#L22-L101 type TasksRecord struct { // Action The task action. Action *string `json:"action,omitempty"` diff --git a/typedapi/types/tdigest.go b/typedapi/types/tdigest.go index 7aa4477ff0..7478cfc33a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TDigest type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L223-L228 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L232-L237 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 diff --git a/typedapi/types/tdigestpercentileranksaggregate.go b/typedapi/types/tdigestpercentileranksaggregate.go index 6d78c23dc7..1688ad528e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TDigestPercentileRanksAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L175-L176 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L177-L178 type TDigestPercentileRanksAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` diff --git a/typedapi/types/tdigestpercentilesaggregate.go b/typedapi/types/tdigestpercentilesaggregate.go index d3407b67c8..f38fe8ba19 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TDigestPercentilesAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L172-L173 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L174-L175 type TDigestPercentilesAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` diff --git a/typedapi/types/template.go b/typedapi/types/template.go index a1e0e25936..151605ab2f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // Template type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L33-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L33-L37 type Template struct { Aliases map[string]Alias `json:"aliases"` Mappings TypeMapping `json:"mappings"` diff --git a/typedapi/types/templateconfig.go b/typedapi/types/templateconfig.go index 3f334ec043..49da35b2ff 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TemplateConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/msearch_template/types.ts#L28-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/msearch_template/types.ts#L28-L54 type TemplateConfig struct { // Explain If `true`, returns detailed information about score calculation as part of // each hit. diff --git a/typedapi/types/templatemapping.go b/typedapi/types/templatemapping.go index d2f9083ec7..8445e3a154 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TemplateMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/TemplateMapping.ts#L27-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/TemplateMapping.ts#L27-L34 type TemplateMapping struct { Aliases map[string]Alias `json:"aliases"` IndexPatterns []string `json:"index_patterns"` diff --git a/typedapi/types/templatesrecord.go b/typedapi/types/templatesrecord.go index c7091a771b..1e6a6343d6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TemplatesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/templates/types.ts#L22-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/term.go b/typedapi/types/term.go index d7ce4a9e38..506eb064c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Term type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/termvectors/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/termvectors/types.ts#L34-L40 type Term struct { DocFreq *int `json:"doc_freq,omitempty"` Score *Float64 `json:"score,omitempty"` diff --git a/typedapi/types/terminateprocessor.go b/typedapi/types/terminateprocessor.go new file mode 100644 index 0000000000..9f32be5ebf --- /dev/null +++ b/typedapi/types/terminateprocessor.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// TerminateProcessor type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1523-L1523 +type TerminateProcessor struct { + // Description Description of the processor. + // Useful for describing the purpose of the processor or its configuration. + Description *string `json:"description,omitempty"` + // If Conditionally execute the processor. + If *string `json:"if,omitempty"` + // IgnoreFailure Ignore failures for the processor. + IgnoreFailure *bool `json:"ignore_failure,omitempty"` + // OnFailure Handle failures for the processor. + OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // Tag Identifier for the processor. + // Useful for debugging and metrics. + Tag *string `json:"tag,omitempty"` +} + +func (s *TerminateProcessor) 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 "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "ignore_failure": + 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", "IgnoreFailure", err) + } + s.IgnoreFailure = &value + case bool: + s.IgnoreFailure = &v + } + + case "on_failure": + if err := dec.Decode(&s.OnFailure); err != nil { + return fmt.Errorf("%s | %w", "OnFailure", err) + } + + case "tag": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Tag", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Tag = &o + + } + } + return nil +} + +// NewTerminateProcessor returns a TerminateProcessor. +func NewTerminateProcessor() *TerminateProcessor { + r := &TerminateProcessor{} + + return r +} diff --git a/typedapi/types/termquery.go b/typedapi/types/termquery.go index 98d981bfbb..783b35edaf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L219-L233 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L238-L255 type TermQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/termrangequery.go b/typedapi/types/termrangequery.go index 886b642615..b6c4229882 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // TermRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L159-L159 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L174-L174 type TermRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/termsaggregatebasedoubletermsbucket.go b/typedapi/types/termsaggregatebasedoubletermsbucket.go index 911398c36c..bfc5dfa0fb 100644 --- a/typedapi/types/termsaggregatebasedoubletermsbucket.go +++ b/typedapi/types/termsaggregatebasedoubletermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermsAggregateBaseDoubleTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L379-L384 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L417-L422 type TermsAggregateBaseDoubleTermsBucket struct { Buckets BucketsDoubleTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/termsaggregatebaselongtermsbucket.go b/typedapi/types/termsaggregatebaselongtermsbucket.go index 506e83eacf..00fdf8d07b 100644 --- a/typedapi/types/termsaggregatebaselongtermsbucket.go +++ b/typedapi/types/termsaggregatebaselongtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermsAggregateBaseLongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L379-L384 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L417-L422 type TermsAggregateBaseLongTermsBucket struct { Buckets BucketsLongTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/termsaggregatebasemultitermsbucket.go b/typedapi/types/termsaggregatebasemultitermsbucket.go index 7b63b1c6e1..d718b4e864 100644 --- a/typedapi/types/termsaggregatebasemultitermsbucket.go +++ b/typedapi/types/termsaggregatebasemultitermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermsAggregateBaseMultiTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L379-L384 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L417-L422 type TermsAggregateBaseMultiTermsBucket struct { Buckets BucketsMultiTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/termsaggregatebasestringtermsbucket.go b/typedapi/types/termsaggregatebasestringtermsbucket.go index edd7ec635f..0d254afc84 100644 --- a/typedapi/types/termsaggregatebasestringtermsbucket.go +++ b/typedapi/types/termsaggregatebasestringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermsAggregateBaseStringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L379-L384 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L417-L422 type TermsAggregateBaseStringTermsBucket struct { Buckets BucketsStringTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/termsaggregatebasevoid.go b/typedapi/types/termsaggregatebasevoid.go index ddc4164c0c..1760c50023 100644 --- a/typedapi/types/termsaggregatebasevoid.go +++ b/typedapi/types/termsaggregatebasevoid.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermsAggregateBaseVoid type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L379-L384 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L417-L422 type TermsAggregateBaseVoid struct { Buckets BucketsVoid `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/termsaggregation.go b/typedapi/types/termsaggregation.go index dbb4211202..1ae1429998 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -36,7 +36,7 @@ import ( // TermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L912-L977 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L963-L1031 type TermsAggregation struct { // CollectMode Determines how child aggregations should be calculated: breadth-first or // depth-first. diff --git a/typedapi/types/termsexclude.go b/typedapi/types/termsexclude.go index 2be14e1201..26f5c681f9 100644 --- a/typedapi/types/termsexclude.go +++ b/typedapi/types/termsexclude.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TermsExclude type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L1008-L1009 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L1077-L1078 type TermsExclude []string diff --git a/typedapi/types/termsgrouping.go b/typedapi/types/termsgrouping.go index b71afaeffe..21adf2d9c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TermsGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/rollup/_types/Groupings.ts#L75-L82 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/termsinclude.go b/typedapi/types/termsinclude.go index 05ab62107f..3396577ab8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,5 +26,5 @@ package types // []string // TermsPartition // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L1005-L1006 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L1074-L1075 type TermsInclude any diff --git a/typedapi/types/termslookup.go b/typedapi/types/termslookup.go index a30bd4a3b0..b57e2345fa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TermsLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L247-L252 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L270-L275 type TermsLookup struct { Id string `json:"id"` Index string `json:"index"` diff --git a/typedapi/types/termspartition.go b/typedapi/types/termspartition.go index db4e4d4039..a4a5b5f64e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermsPartition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L1011-L1020 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L1080-L1089 type TermsPartition struct { // NumPartitions The number of partitions. NumPartitions int64 `json:"num_partitions"` diff --git a/typedapi/types/termsquery.go b/typedapi/types/termsquery.go index d5785a3d28..d5a63d1db3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L235-L240 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L257-L263 type TermsQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/termsqueryfield.go b/typedapi/types/termsqueryfield.go index b738a60bcf..ebdf8319b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // []FieldValue // TermsLookup // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L242-L245 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L265-L268 type TermsQueryField any diff --git a/typedapi/types/termssetquery.go b/typedapi/types/termssetquery.go index 80d593c7fd..40a75ab79d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermsSetQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L254-L267 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L277-L299 type TermsSetQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -39,6 +39,9 @@ type TermsSetQuery 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"` + // MinimumShouldMatch Specification describing number of matching terms required to return a + // document. + MinimumShouldMatch MinimumShouldMatch `json:"minimum_should_match,omitempty"` // MinimumShouldMatchField Numeric field containing the number of matching terms required to return a // document. MinimumShouldMatchField *string `json:"minimum_should_match_field,omitempty"` @@ -81,6 +84,11 @@ func (s *TermsSetQuery) UnmarshalJSON(data []byte) error { s.Boost = &f } + case "minimum_should_match": + if err := dec.Decode(&s.MinimumShouldMatch); err != nil { + return fmt.Errorf("%s | %w", "MinimumShouldMatch", err) + } + case "minimum_should_match_field": if err := dec.Decode(&s.MinimumShouldMatchField); err != nil { return fmt.Errorf("%s | %w", "MinimumShouldMatchField", err) diff --git a/typedapi/types/termsuggest.go b/typedapi/types/termsuggest.go index 1c13b4c178..a01f8313ae 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L64-L69 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L64-L69 type TermSuggest struct { Length int `json:"length"` Offset int `json:"offset"` diff --git a/typedapi/types/termsuggester.go b/typedapi/types/termsuggester.go index 7d066fb43a..b41b95023d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // TermSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L506-L568 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L506-L568 type TermSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. diff --git a/typedapi/types/termsuggestoption.go b/typedapi/types/termsuggestoption.go index 754b21c0ec..b8e1176b3a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/suggester.ts#L93-L99 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/suggester.ts#L93-L99 type TermSuggestOption struct { CollateMatch *bool `json:"collate_match,omitempty"` Freq int64 `json:"freq"` diff --git a/typedapi/types/termvector.go b/typedapi/types/termvector.go index f0517e0453..d63b9d3704 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TermVector type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/termvectors/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/termvectors/types.ts#L23-L26 type TermVector struct { FieldStatistics *FieldStatistics `json:"field_statistics,omitempty"` Terms map[string]Term `json:"terms"` diff --git a/typedapi/types/termvectorsfilter.go b/typedapi/types/termvectorsfilter.go index 659f2bc02d..236190bc68 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermVectorsFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/termvectors/types.ts#L49-L86 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/termvectors/types.ts#L49-L86 type TermVectorsFilter struct { // MaxDocFreq Ignore words which occur in more than this many docs. // Defaults to unbounded. diff --git a/typedapi/types/termvectorsresult.go b/typedapi/types/termvectorsresult.go index 9a39f3b2ec..94d4a5cb63 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermVectorsResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/mtermvectors/types.ts#L96-L104 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/mtermvectors/types.ts#L96-L104 type TermVectorsResult struct { Error *ErrorCause `json:"error,omitempty"` Found *bool `json:"found,omitempty"` diff --git a/typedapi/types/termvectorstoken.go b/typedapi/types/termvectorstoken.go index 823b5ff82e..4e496adddb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TermVectorsToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/termvectors/types.ts#L42-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/termvectors/types.ts#L42-L47 type TermVectorsToken struct { EndOffset *int `json:"end_offset,omitempty"` Payload *string `json:"payload,omitempty"` diff --git a/typedapi/types/testpopulation.go b/typedapi/types/testpopulation.go index cca23074da..50c112424a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TestPopulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L310-L320 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L319-L329 type TestPopulation struct { // Field The field to aggregate. Field string `json:"field"` diff --git a/typedapi/types/textclassificationinferenceoptions.go b/typedapi/types/textclassificationinferenceoptions.go index 4b152a5c73..e2d8d97f56 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TextClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L189-L199 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L173-L183 type TextClassificationInferenceOptions struct { // ClassificationLabels Classification labels to apply other than the stored labels. Must have the // same deminsions as the default configured labels diff --git a/typedapi/types/textclassificationinferenceupdateoptions.go b/typedapi/types/textclassificationinferenceupdateoptions.go index bb44dfd372..cdda71cc84 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TextClassificationInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L363-L372 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L351-L360 type TextClassificationInferenceUpdateOptions struct { // ClassificationLabels Classification labels to apply other than the stored labels. Must have the // same deminsions as the default configured labels diff --git a/typedapi/types/textembedding.go b/typedapi/types/textembedding.go index ce77fca506..e6e6cb98c3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TextEmbedding type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Knn.ts#L74-L77 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Knn.ts#L79-L82 type TextEmbedding struct { ModelId string `json:"model_id"` ModelText string `json:"model_text"` diff --git a/typedapi/types/textembeddingbyteresult.go b/typedapi/types/textembeddingbyteresult.go index e1fcc887e2..aa339923ee 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TextEmbeddingByteResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/_types/Results.ts#L46-L51 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/_types/Results.ts#L46-L51 type TextEmbeddingByteResult struct { Embedding []byte `json:"embedding"` } diff --git a/typedapi/types/textembeddinginferenceoptions.go b/typedapi/types/textembeddinginferenceoptions.go index da4718df3f..45641f1b9b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TextEmbeddingInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L237-L245 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L221-L231 type TextEmbeddingInferenceOptions struct { // EmbeddingSize The number of dimensions in the embedding output EmbeddingSize *int `json:"embedding_size,omitempty"` @@ -40,6 +40,7 @@ type TextEmbeddingInferenceOptions struct { ResultsField *string `json:"results_field,omitempty"` // Tokenization The tokenization options Tokenization *TokenizationConfigContainer `json:"tokenization,omitempty"` + Vocabulary Vocabulary `json:"vocabulary"` } func (s *TextEmbeddingInferenceOptions) UnmarshalJSON(data []byte) error { @@ -90,6 +91,11 @@ func (s *TextEmbeddingInferenceOptions) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Tokenization", err) } + case "vocabulary": + if err := dec.Decode(&s.Vocabulary); err != nil { + return fmt.Errorf("%s | %w", "Vocabulary", err) + } + } } return nil diff --git a/typedapi/types/textembeddinginferenceupdateoptions.go b/typedapi/types/textembeddinginferenceupdateoptions.go index 28b8e67c36..270a210b0e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TextEmbeddingInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L392-L396 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L380-L384 type TextEmbeddingInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. diff --git a/typedapi/types/textembeddingresult.go b/typedapi/types/textembeddingresult.go index 707fc92a8e..7249f0a921 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TextEmbeddingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/inference/_types/Results.ts#L53-L58 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/inference/_types/Results.ts#L53-L58 type TextEmbeddingResult struct { Embedding []float32 `json:"embedding"` } diff --git a/typedapi/types/textexpansioninferenceoptions.go b/typedapi/types/textexpansioninferenceoptions.go index 248e6c9345..446696c542 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,13 +31,14 @@ import ( // TextExpansionInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L247-L253 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L233-L240 type TextExpansionInferenceOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. ResultsField *string `json:"results_field,omitempty"` // Tokenization The tokenization options Tokenization *TokenizationConfigContainer `json:"tokenization,omitempty"` + Vocabulary Vocabulary `json:"vocabulary"` } func (s *TextExpansionInferenceOptions) UnmarshalJSON(data []byte) error { @@ -72,6 +73,11 @@ func (s *TextExpansionInferenceOptions) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Tokenization", err) } + case "vocabulary": + if err := dec.Decode(&s.Vocabulary); err != nil { + return fmt.Errorf("%s | %w", "Vocabulary", err) + } + } } return nil diff --git a/typedapi/types/textexpansioninferenceupdateoptions.go b/typedapi/types/textexpansioninferenceupdateoptions.go index 32fb30a005..a7446c71f6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TextExpansionInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L398-L402 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L386-L390 type TextExpansionInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. diff --git a/typedapi/types/textexpansionquery.go b/typedapi/types/textexpansionquery.go index 75ae56b234..8de47d5c10 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TextExpansionQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/TextExpansionQuery.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/textindexprefixes.go b/typedapi/types/textindexprefixes.go index ea1ac377fc..7a02235ac3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TextIndexPrefixes type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L264-L267 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L265-L268 type TextIndexPrefixes struct { MaxChars int `json:"max_chars"` MinChars int `json:"min_chars"` diff --git a/typedapi/types/textproperty.go b/typedapi/types/textproperty.go index 75bdea0617..ddec6dbb8c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // TextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L269-L285 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L270-L287 type TextProperty struct { Analyzer *string `json:"analyzer,omitempty"` Boost *Float64 `json:"boost,omitempty"` diff --git a/typedapi/types/textsimilarityreranker.go b/typedapi/types/textsimilarityreranker.go new file mode 100644 index 0000000000..02ce497d79 --- /dev/null +++ b/typedapi/types/textsimilarityreranker.go @@ -0,0 +1,170 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// TextSimilarityReranker type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Retriever.ts#L88-L99 +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"` + // 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"` + // MinScore Minimum _score for matching documents. Documents with a lower _score are not + // included in the top documents. + MinScore *float32 `json:"min_score,omitempty"` + // RankWindowSize This value determines how many documents we will consider from the nested + // retriever. + RankWindowSize *int `json:"rank_window_size,omitempty"` + // Retriever The nested retriever which will produce the first-level results, that will + // later be used for reranking. + Retriever *RetrieverContainer `json:"retriever,omitempty"` +} + +func (s *TextSimilarityReranker) 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 "field": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Field", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Field = &o + + 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 "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 "inference_text": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "InferenceText", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.InferenceText = &o + + 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 "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 +} + +// NewTextSimilarityReranker returns a TextSimilarityReranker. +func NewTextSimilarityReranker() *TextSimilarityReranker { + r := &TextSimilarityReranker{} + + return r +} diff --git a/typedapi/types/texttoanalyze.go b/typedapi/types/texttoanalyze.go index 1eb6253c95..b2370ccc25 100644 --- a/typedapi/types/texttoanalyze.go +++ b/typedapi/types/texttoanalyze.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TextToAnalyze type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/analyze/types.ts#L69-L69 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/analyze/types.ts#L69-L69 type TextToAnalyze []string diff --git a/typedapi/types/thaianalyzer.go b/typedapi/types/thaianalyzer.go new file mode 100644 index 0000000000..3771da4ab5 --- /dev/null +++ b/typedapi/types/thaianalyzer.go @@ -0,0 +1,113 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ThaiAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L306-L310 +type ThaiAnalyzer struct { + Stopwords []string `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` +} + +func (s *ThaiAnalyzer) 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": + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 ThaiAnalyzer) MarshalJSON() ([]byte, error) { + type innerThaiAnalyzer ThaiAnalyzer + tmp := innerThaiAnalyzer{ + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "thai" + + return json.Marshal(tmp) +} + +// NewThaiAnalyzer returns a ThaiAnalyzer. +func NewThaiAnalyzer() *ThaiAnalyzer { + r := &ThaiAnalyzer{} + + return r +} diff --git a/typedapi/types/thaitokenizer.go b/typedapi/types/thaitokenizer.go new file mode 100644 index 0000000000..b9cb6b4263 --- /dev/null +++ b/typedapi/types/thaitokenizer.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ThaiTokenizer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L126-L128 +type ThaiTokenizer struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *ThaiTokenizer) 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 ThaiTokenizer) MarshalJSON() ([]byte, error) { + type innerThaiTokenizer ThaiTokenizer + tmp := innerThaiTokenizer{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "thai" + + return json.Marshal(tmp) +} + +// NewThaiTokenizer returns a ThaiTokenizer. +func NewThaiTokenizer() *ThaiTokenizer { + r := &ThaiTokenizer{} + + return r +} diff --git a/typedapi/types/threadcount.go b/typedapi/types/threadcount.go index 4cdcd1fc62..5603ef5b3d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ThreadCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L1004-L1029 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L1075-L1100 type ThreadCount struct { // Active Number of active threads in the thread pool. Active *int64 `json:"active,omitempty"` diff --git a/typedapi/types/threadpoolrecord.go b/typedapi/types/threadpoolrecord.go index 7b5b6398b6..957701d930 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ThreadPoolRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/thread_pool/types.ts#L22-L124 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/throttlestate.go b/typedapi/types/throttlestate.go index a0c779aa32..af97f1855e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ThrottleState type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Action.ts#L126-L129 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Action.ts#L120-L123 type ThrottleState struct { Reason string `json:"reason"` Timestamp DateTime `json:"timestamp"` diff --git a/typedapi/types/timehttphistogram.go b/typedapi/types/timehttphistogram.go new file mode 100644 index 0000000000..4327f09da5 --- /dev/null +++ b/typedapi/types/timehttphistogram.go @@ -0,0 +1,111 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// TimeHttpHistogram type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L708-L712 +type TimeHttpHistogram struct { + Count int64 `json:"count"` + GeMillis *int64 `json:"ge_millis,omitempty"` + LtMillis *int64 `json:"lt_millis,omitempty"` +} + +func (s *TimeHttpHistogram) 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 "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", "Count", err) + } + s.Count = value + case float64: + f := int64(v) + s.Count = f + } + + case "ge_millis": + 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", "GeMillis", err) + } + s.GeMillis = &value + case float64: + f := int64(v) + s.GeMillis = &f + } + + case "lt_millis": + 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", "LtMillis", err) + } + s.LtMillis = &value + case float64: + f := int64(v) + s.LtMillis = &f + } + + } + } + return nil +} + +// NewTimeHttpHistogram returns a TimeHttpHistogram. +func NewTimeHttpHistogram() *TimeHttpHistogram { + r := &TimeHttpHistogram{} + + return r +} diff --git a/typedapi/types/timeofmonth.go b/typedapi/types/timeofmonth.go index 07d81cab12..506a4ab6ca 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TimeOfMonth type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Schedule.ts#L110-L113 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Schedule.ts#L110-L113 type TimeOfMonth struct { At []string `json:"at"` On []int `json:"on"` diff --git a/typedapi/types/timeofweek.go b/typedapi/types/timeofweek.go index b951ce0691..7f14b2a58e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // TimeOfWeek type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Schedule.ts#L115-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Schedule.ts#L115-L118 type TimeOfWeek struct { At []string `json:"at"` On []day.Day `json:"on"` diff --git a/typedapi/types/timeofyear.go b/typedapi/types/timeofyear.go index ea6b823010..7ab043bba6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // TimeOfYear type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Schedule.ts#L120-L124 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Schedule.ts#L120-L124 type TimeOfYear struct { At []string `json:"at"` Int []month.Month `json:"int"` diff --git a/typedapi/types/timeseriesaggregate.go b/typedapi/types/timeseriesaggregate.go new file mode 100644 index 0000000000..7fd0f21648 --- /dev/null +++ b/typedapi/types/timeseriesaggregate.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// TimeSeriesAggregate type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L730-L731 +type TimeSeriesAggregate struct { + Buckets BucketsTimeSeriesBucket `json:"buckets"` + Meta Metadata `json:"meta,omitempty"` +} + +func (s *TimeSeriesAggregate) 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 "buckets": + + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + source := bytes.NewReader(rawMsg) + localDec := json.NewDecoder(source) + switch rawMsg[0] { + case '{': + o := make(map[string]TimeSeriesBucket, 0) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Buckets", err) + } + s.Buckets = o + case '[': + o := []TimeSeriesBucket{} + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Buckets", err) + } + s.Buckets = o + } + + case "meta": + if err := dec.Decode(&s.Meta); err != nil { + return fmt.Errorf("%s | %w", "Meta", err) + } + + } + } + return nil +} + +// NewTimeSeriesAggregate returns a TimeSeriesAggregate. +func NewTimeSeriesAggregate() *TimeSeriesAggregate { + r := &TimeSeriesAggregate{} + + return r +} diff --git a/typedapi/types/timeseriesaggregation.go b/typedapi/types/timeseriesaggregation.go new file mode 100644 index 0000000000..642c391715 --- /dev/null +++ b/typedapi/types/timeseriesaggregation.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// TimeSeriesAggregation type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. + Keyed *bool `json:"keyed,omitempty"` + // Size The maximum number of results to return. + Size *int `json:"size,omitempty"` +} + +func (s *TimeSeriesAggregation) 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 "keyed": + 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", "Keyed", err) + } + s.Keyed = &value + case bool: + s.Keyed = &v + } + + case "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", "Size", err) + } + s.Size = &value + case float64: + f := int(v) + s.Size = &f + } + + } + } + return nil +} + +// NewTimeSeriesAggregation returns a TimeSeriesAggregation. +func NewTimeSeriesAggregation() *TimeSeriesAggregation { + r := &TimeSeriesAggregation{} + + return r +} diff --git a/typedapi/types/timeseriesbucket.go b/typedapi/types/timeseriesbucket.go new file mode 100644 index 0000000000..128ba34160 --- /dev/null +++ b/typedapi/types/timeseriesbucket.go @@ -0,0 +1,642 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + "strings" +) + +// TimeSeriesBucket type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L733-L735 +type TimeSeriesBucket struct { + Aggregations map[string]Aggregate `json:"-"` + DocCount int64 `json:"doc_count"` + Key map[string]FieldValue `json:"key"` +} + +func (s *TimeSeriesBucket) 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 "doc_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", "DocCount", err) + } + s.DocCount = value + case float64: + f := int64(v) + s.DocCount = f + } + + case "key": + if s.Key == nil { + s.Key = make(map[string]FieldValue, 0) + } + if err := dec.Decode(&s.Key); err != nil { + return fmt.Errorf("%s | %w", "Key", err) + } + + default: + + if value, ok := t.(string); ok { + if strings.Contains(value, "#") { + elems := strings.Split(value, "#") + if len(elems) == 2 { + if s.Aggregations == nil { + s.Aggregations = make(map[string]Aggregate, 0) + } + switch elems[0] { + + case "cardinality": + o := NewCardinalityAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "hdr_percentiles": + o := NewHdrPercentilesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "hdr_percentile_ranks": + o := NewHdrPercentileRanksAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "tdigest_percentiles": + o := NewTDigestPercentilesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "tdigest_percentile_ranks": + o := NewTDigestPercentileRanksAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "percentiles_bucket": + o := NewPercentilesBucketAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "median_absolute_deviation": + o := NewMedianAbsoluteDeviationAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "min": + o := NewMinAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "max": + o := NewMaxAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "sum": + o := NewSumAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "avg": + o := NewAvgAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "weighted_avg": + o := NewWeightedAvgAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "value_count": + o := NewValueCountAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "simple_value": + o := NewSimpleValueAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "derivative": + o := NewDerivativeAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "bucket_metric_value": + o := NewBucketMetricValueAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "stats": + o := NewStatsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "stats_bucket": + o := NewStatsBucketAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "extended_stats": + o := NewExtendedStatsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "extended_stats_bucket": + o := NewExtendedStatsBucketAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geo_bounds": + o := NewGeoBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geo_centroid": + o := NewGeoCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "histogram": + o := NewHistogramAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "date_histogram": + o := NewDateHistogramAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "auto_date_histogram": + o := NewAutoDateHistogramAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "variable_width_histogram": + o := NewVariableWidthHistogramAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "sterms": + o := NewStringTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "lterms": + o := NewLongTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "dterms": + o := NewDoubleTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "umterms": + o := NewUnmappedTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "lrareterms": + o := NewLongRareTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "srareterms": + o := NewStringRareTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "umrareterms": + o := NewUnmappedRareTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "multi_terms": + o := NewMultiTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "missing": + o := NewMissingAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "nested": + o := NewNestedAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "reverse_nested": + o := NewReverseNestedAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "global": + o := NewGlobalAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "filter": + o := NewFilterAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "children": + o := NewChildrenAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "parent": + o := NewParentAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "sampler": + o := NewSamplerAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "unmapped_sampler": + o := NewUnmappedSamplerAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geohash_grid": + o := NewGeoHashGridAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geotile_grid": + o := NewGeoTileGridAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geohex_grid": + o := NewGeoHexGridAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "range": + o := NewRangeAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "date_range": + o := NewDateRangeAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geo_distance": + o := NewGeoDistanceAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "ip_range": + o := NewIpRangeAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "ip_prefix": + o := NewIpPrefixAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "filters": + o := NewFiltersAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "adjacency_matrix": + o := NewAdjacencyMatrixAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "siglterms": + o := NewSignificantLongTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "sigsterms": + o := NewSignificantStringTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "umsigterms": + o := NewUnmappedSignificantTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "composite": + o := NewCompositeAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "frequent_item_sets": + o := NewFrequentItemSetsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "scripted_metric": + o := NewScriptedMetricAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "top_hits": + o := NewTopHitsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "inference": + o := NewInferenceAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "string_stats": + o := NewStringStatsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "boxplot": + o := NewBoxPlotAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "top_metrics": + o := NewTopMetricsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "t_test": + o := NewTTestAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "rate": + o := NewRateAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "simple_long_value": + o := NewCumulativeCardinalityAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "matrix_stats": + o := NewMatrixStatsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geo_line": + o := NewGeoLineAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + default: + o := make(map[string]any, 0) + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + } + } else { + return errors.New("cannot decode JSON for field Aggregations") + } + } else { + o := make(map[string]any, 0) + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[value] = o + } + } + + } + } + return nil +} + +// MarhsalJSON overrides marshalling for types with additional properties +func (s TimeSeriesBucket) MarshalJSON() ([]byte, error) { + type opt TimeSeriesBucket + // 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.Aggregations { + tmp[fmt.Sprintf("%s", key)] = value + } + delete(tmp, "Aggregations") + + data, err = json.Marshal(tmp) + if err != nil { + return nil, err + } + + return data, nil +} + +// NewTimeSeriesBucket returns a TimeSeriesBucket. +func NewTimeSeriesBucket() *TimeSeriesBucket { + r := &TimeSeriesBucket{ + Aggregations: make(map[string]Aggregate, 0), + Key: make(map[string]FieldValue, 0), + } + + return r +} diff --git a/typedapi/types/timesync.go b/typedapi/types/timesync.go index 7ea8a2cda9..7d30be7229 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TimeSync type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/_types/Transform.ts#L177-L189 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/timingstats.go b/typedapi/types/timingstats.go index de069cd182..5b6ff3b91b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L563-L568 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeAnalytics.ts#L564-L569 type TimingStats struct { // ElapsedTime Runtime of the analysis in milliseconds. ElapsedTime int64 `json:"elapsed_time"` diff --git a/typedapi/types/tokencountproperty.go b/typedapi/types/tokencountproperty.go index 77c96c19b2..64c4c1cfab 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // TokenCountProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/specialized.ts#L85-L92 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/specialized.ts#L85-L92 type TokenCountProperty struct { Analyzer *string `json:"analyzer,omitempty"` Boost *Float64 `json:"boost,omitempty"` @@ -48,7 +48,6 @@ type TokenCountProperty struct { Meta map[string]string `json:"meta,omitempty"` NullValue *Float64 `json:"null_value,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -837,18 +836,6 @@ func (s *TokenCountProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -889,7 +876,6 @@ func (s TokenCountProperty) MarshalJSON() ([]byte, error) { Meta: s.Meta, NullValue: s.NullValue, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/tokendetail.go b/typedapi/types/tokendetail.go index 5f02c49d37..ab37dd5884 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TokenDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/analyze/types.ts#L71-L74 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/analyze/types.ts#L71-L74 type TokenDetail struct { Name string `json:"name"` Tokens []ExplainAnalyzeToken `json:"tokens"` diff --git a/typedapi/types/tokenfilter.go b/typedapi/types/tokenfilter.go index 9d665ae8f5..8b799ccbca 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // TokenFilterDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L346-L348 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L345-L350 type TokenFilter any diff --git a/typedapi/types/tokenfilterdefinition.go b/typedapi/types/tokenfilterdefinition.go index 1b60eecf2f..c4aab83e27 100644 --- a/typedapi/types/tokenfilterdefinition.go +++ b/typedapi/types/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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -70,5 +70,5 @@ package types // PhoneticTokenFilter // DictionaryDecompounderTokenFilter // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L350-L402 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L352-L404 type TokenFilterDefinition any diff --git a/typedapi/types/tokenizationconfigcontainer.go b/typedapi/types/tokenizationconfigcontainer.go index fa39ebd78e..94aaeb43b6 100644 --- a/typedapi/types/tokenizationconfigcontainer.go +++ b/typedapi/types/tokenizationconfigcontainer.go @@ -16,16 +16,18 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TokenizationConfigContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L110-L129 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L110-L131 type TokenizationConfigContainer struct { // Bert Indicates BERT tokenization and its options Bert *NlpBertTokenizationConfig `json:"bert,omitempty"` + // BertJa Indicates BERT Japanese tokenization and its options + BertJa *NlpBertTokenizationConfig `json:"bert_ja,omitempty"` // Mpnet Indicates MPNET tokenization and its options Mpnet *NlpBertTokenizationConfig `json:"mpnet,omitempty"` // Roberta Indicates RoBERTa tokenization and its options diff --git a/typedapi/types/tokenizer.go b/typedapi/types/tokenizer.go index 87c3896fd6..6bdb8527af 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // string // TokenizerDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L120-L122 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L140-L145 type Tokenizer any diff --git a/typedapi/types/tokenizerdefinition.go b/typedapi/types/tokenizerdefinition.go index 5f17962117..affd67ccb9 100644 --- a/typedapi/types/tokenizerdefinition.go +++ b/typedapi/types/tokenizerdefinition.go @@ -16,26 +16,30 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TokenizerDefinition holds the union for the following types: // // CharGroupTokenizer +// ClassicTokenizer // EdgeNGramTokenizer // KeywordTokenizer // LetterTokenizer // LowercaseTokenizer // NGramTokenizer -// NoriTokenizer // PathHierarchyTokenizer +// PatternTokenizer +// SimplePatternTokenizer +// SimplePatternSplitTokenizer // StandardTokenizer +// ThaiTokenizer // UaxEmailUrlTokenizer // WhitespaceTokenizer -// KuromojiTokenizer -// PatternTokenizer // IcuTokenizer +// KuromojiTokenizer +// NoriTokenizer // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L124-L142 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L147-L170 type TokenizerDefinition any diff --git a/typedapi/types/tokenpruningconfig.go b/typedapi/types/tokenpruningconfig.go index 47e54a1a6b..ee800cb5ac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TokenPruningConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/TokenPruningConfig.ts#L22-L35 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/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"` diff --git a/typedapi/types/topclassentry.go b/typedapi/types/topclassentry.go index 9b3ed46361..7ce579ee88 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TopClassEntry type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L440-L444 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L428-L432 type TopClassEntry struct { ClassName string `json:"class_name"` ClassProbability Float64 `json:"class_probability"` diff --git a/typedapi/types/tophit.go b/typedapi/types/tophit.go index d6d17cf169..26627a065c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TopHit type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/text_structure/find_structure/types.ts#L35-L38 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/text_structure/find_structure/types.ts#L35-L38 type TopHit struct { Count int64 `json:"count"` Value json.RawMessage `json:"value,omitempty"` diff --git a/typedapi/types/tophitsaggregate.go b/typedapi/types/tophitsaggregate.go index ee8e5fcfd2..a8cb5f150b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TopHitsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L658-L661 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L747-L753 type TopHitsAggregate struct { Hits HitsMetadata `json:"hits"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/tophitsaggregation.go b/typedapi/types/tophitsaggregation.go index bafc649ae0..bf255b24a4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TopHitsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L337-L397 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L346-L406 type TopHitsAggregation struct { // DocvalueFields Fields for which to return doc values. DocvalueFields []FieldAndFormat `json:"docvalue_fields,omitempty"` diff --git a/typedapi/types/topleftbottomrightgeobounds.go b/typedapi/types/topleftbottomrightgeobounds.go index 95a8347300..3b293a5a15 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TopLeftBottomRightGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L161-L164 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Geo.ts#L161-L164 type TopLeftBottomRightGeoBounds struct { BottomRight GeoLocation `json:"bottom_right"` TopLeft GeoLocation `json:"top_left"` diff --git a/typedapi/types/topmetrics.go b/typedapi/types/topmetrics.go index 12e1b6eb1e..2f36057b31 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TopMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L736-L740 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L832-L836 type TopMetrics struct { Metrics map[string]FieldValue `json:"metrics"` Sort []FieldValue `json:"sort"` diff --git a/typedapi/types/topmetricsaggregate.go b/typedapi/types/topmetricsaggregate.go index ff33953a0c..d91d5a47cc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TopMetricsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L731-L734 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L827-L830 type TopMetricsAggregate struct { Meta Metadata `json:"meta,omitempty"` Top []TopMetrics `json:"top"` diff --git a/typedapi/types/topmetricsaggregation.go b/typedapi/types/topmetricsaggregation.go index e92996698b..93a588245c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TopMetricsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L399-L413 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L408-L425 type TopMetricsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/topmetricsvalue.go b/typedapi/types/topmetricsvalue.go index 3a37949e98..fe84c7c0d3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TopMetricsValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L415-L420 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L427-L432 type TopMetricsValue struct { // Field A field to return as a metric. Field string `json:"field"` diff --git a/typedapi/types/toprightbottomleftgeobounds.go b/typedapi/types/toprightbottomleftgeobounds.go index 75f2043e80..37f4900168 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TopRightBottomLeftGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L166-L169 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Geo.ts#L166-L169 type TopRightBottomLeftGeoBounds struct { BottomLeft GeoLocation `json:"bottom_left"` TopRight GeoLocation `json:"top_right"` diff --git a/typedapi/types/totalfeatureimportance.go b/typedapi/types/totalfeatureimportance.go index deeb94cae5..cd7cdf6771 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TotalFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L233-L240 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L277-L284 type TotalFeatureImportance struct { // Classes If the trained model is a classification model, feature importance statistics // are gathered per target class value. diff --git a/typedapi/types/totalfeatureimportanceclass.go b/typedapi/types/totalfeatureimportanceclass.go index 60051dbeea..f2634b6419 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TotalFeatureImportanceClass type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L242-L247 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L286-L291 type TotalFeatureImportanceClass struct { // ClassName The target class value. Could be a string, boolean, or number. ClassName string `json:"class_name"` diff --git a/typedapi/types/totalfeatureimportancestatistics.go b/typedapi/types/totalfeatureimportancestatistics.go index 870e972cc2..969c522c25 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TotalFeatureImportanceStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L249-L256 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L293-L300 type TotalFeatureImportanceStatistics struct { // Max The maximum importance value across all the training data for this feature. Max int `json:"max"` diff --git a/typedapi/types/totaluserprofiles.go b/typedapi/types/totaluserprofiles.go index 105cb2fb80..b4afa96b12 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TotalUserProfiles type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/suggest_user_profiles/Response.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/suggest_user_profiles/Response.ts#L24-L27 type TotalUserProfiles struct { Relation string `json:"relation"` Value int64 `json:"value"` diff --git a/typedapi/types/trackhits.go b/typedapi/types/trackhits.go index 039e464733..24350172f8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // bool // int // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/search/_types/hits.ts#L143-L151 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/search/_types/hits.ts#L144-L152 type TrackHits any diff --git a/typedapi/types/trainedmodel.go b/typedapi/types/trainedmodel.go index 1822651517..1baf72265b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TrainedModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L60-L72 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L60-L72 type TrainedModel struct { // Ensemble The definition for an ensemble model Ensemble *Ensemble `json:"ensemble,omitempty"` diff --git a/typedapi/types/trainedmodelassignment.go b/typedapi/types/trainedmodelassignment.go index 64fdee1507..40706e3cd0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,11 +33,13 @@ import ( // TrainedModelAssignment type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L403-L418 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L447-L464 type TrainedModelAssignment struct { + AdaptiveAllocations *AdaptiveAllocationsSettings `json:"adaptive_allocations,omitempty"` // AssignmentState The overall assignment state. AssignmentState deploymentassignmentstate.DeploymentAssignmentState `json:"assignment_state"` MaxAssignedAllocations *int `json:"max_assigned_allocations,omitempty"` + Reason *string `json:"reason,omitempty"` // RoutingTable The allocation state for each node. RoutingTable map[string]TrainedModelAssignmentRoutingTable `json:"routing_table"` // StartTime The timestamp when the deployment started. @@ -60,6 +62,11 @@ func (s *TrainedModelAssignment) UnmarshalJSON(data []byte) error { switch t { + case "adaptive_allocations": + if err := dec.Decode(&s.AdaptiveAllocations); err != nil { + return fmt.Errorf("%s | %w", "AdaptiveAllocations", err) + } + case "assignment_state": if err := dec.Decode(&s.AssignmentState); err != nil { return fmt.Errorf("%s | %w", "AssignmentState", err) @@ -81,6 +88,18 @@ func (s *TrainedModelAssignment) UnmarshalJSON(data []byte) error { s.MaxAssignedAllocations = &f } + case "reason": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Reason", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Reason = &o + case "routing_table": if s.RoutingTable == nil { s.RoutingTable = make(map[string]TrainedModelAssignmentRoutingTable, 0) diff --git a/typedapi/types/trainedmodelassignmentroutingtable.go b/typedapi/types/trainedmodelassignmentroutingtable.go index 67d088ce5b..02cc94702f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,13 +33,13 @@ import ( // TrainedModelAssignmentRoutingTable type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L374-L392 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L418-L436 type TrainedModelAssignmentRoutingTable struct { // CurrentAllocations Current number of allocations. CurrentAllocations int `json:"current_allocations"` // Reason The reason for the current state. It is usually populated only when the // `routing_state` is `failed`. - Reason string `json:"reason"` + Reason *string `json:"reason,omitempty"` // RoutingState The current routing state. RoutingState routingstate.RoutingState `json:"routing_state"` // TargetAllocations Target number of allocations. @@ -87,7 +87,7 @@ func (s *TrainedModelAssignmentRoutingTable) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Reason = o + s.Reason = &o case "routing_state": if err := dec.Decode(&s.RoutingState); err != nil { diff --git a/typedapi/types/trainedmodelassignmenttaskparameters.go b/typedapi/types/trainedmodelassignmenttaskparameters.go index 4f0b57e33c..2a5558945f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,19 +33,21 @@ import ( // TrainedModelAssignmentTaskParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L316-L349 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L357-L393 type TrainedModelAssignmentTaskParameters struct { // CacheSize The size of the trained model cache. - CacheSize ByteSize `json:"cache_size"` + CacheSize ByteSize `json:"cache_size,omitempty"` // DeploymentId The unique identifier for the trained model deployment. DeploymentId string `json:"deployment_id"` // ModelBytes The size of the trained model in bytes. - ModelBytes int `json:"model_bytes"` + ModelBytes ByteSize `json:"model_bytes"` // ModelId The unique identifier for the trained model. ModelId string `json:"model_id"` // NumberOfAllocations The total number of allocations this model is assigned across ML nodes. - NumberOfAllocations int `json:"number_of_allocations"` - Priority trainingpriority.TrainingPriority `json:"priority"` + NumberOfAllocations int `json:"number_of_allocations"` + PerAllocationMemoryBytes ByteSize `json:"per_allocation_memory_bytes"` + PerDeploymentMemoryBytes ByteSize `json:"per_deployment_memory_bytes"` + Priority trainingpriority.TrainingPriority `json:"priority"` // QueueCapacity Number of inference requests are allowed in the queue at a time. QueueCapacity int `json:"queue_capacity"` // ThreadsPerAllocation Number of threads per allocation. @@ -78,19 +80,8 @@ func (s *TrainedModelAssignmentTaskParameters) UnmarshalJSON(data []byte) error } case "model_bytes": - - 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", "ModelBytes", err) - } - s.ModelBytes = value - case float64: - f := int(v) - s.ModelBytes = f + if err := dec.Decode(&s.ModelBytes); err != nil { + return fmt.Errorf("%s | %w", "ModelBytes", err) } case "model_id": @@ -114,6 +105,16 @@ func (s *TrainedModelAssignmentTaskParameters) UnmarshalJSON(data []byte) error s.NumberOfAllocations = f } + case "per_allocation_memory_bytes": + if err := dec.Decode(&s.PerAllocationMemoryBytes); err != nil { + return fmt.Errorf("%s | %w", "PerAllocationMemoryBytes", err) + } + + case "per_deployment_memory_bytes": + if err := dec.Decode(&s.PerDeploymentMemoryBytes); err != nil { + return fmt.Errorf("%s | %w", "PerDeploymentMemoryBytes", err) + } + case "priority": if err := dec.Decode(&s.Priority); err != nil { return fmt.Errorf("%s | %w", "Priority", err) diff --git a/typedapi/types/trainedmodelconfig.go b/typedapi/types/trainedmodelconfig.go index 1b77a394c4..6769a19dcc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // TrainedModelConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L165-L200 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L191-L227 type TrainedModelConfig struct { CompressedDefinition *string `json:"compressed_definition,omitempty"` // CreateTime The time when the trained model was created. @@ -64,8 +64,9 @@ type TrainedModelConfig struct { // created by data frame analytics contain analysis_config and input objects. Metadata *TrainedModelConfigMetadata `json:"metadata,omitempty"` // ModelId Identifier for the trained model. - ModelId string `json:"model_id"` - ModelSizeBytes ByteSize `json:"model_size_bytes,omitempty"` + ModelId string `json:"model_id"` + ModelPackage *ModelPackageConfig `json:"model_package,omitempty"` + ModelSizeBytes ByteSize `json:"model_size_bytes,omitempty"` // ModelType The model type ModelType *trainedmodeltype.TrainedModelType `json:"model_type,omitempty"` PrefixStrings *TrainedModelPrefixStrings `json:"prefix_strings,omitempty"` @@ -223,6 +224,11 @@ func (s *TrainedModelConfig) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "ModelId", err) } + case "model_package": + if err := dec.Decode(&s.ModelPackage); err != nil { + return fmt.Errorf("%s | %w", "ModelPackage", err) + } + case "model_size_bytes": if err := dec.Decode(&s.ModelSizeBytes); err != nil { return fmt.Errorf("%s | %w", "ModelSizeBytes", err) diff --git a/typedapi/types/trainedmodelconfiginput.go b/typedapi/types/trainedmodelconfiginput.go index 30f1e67a65..a5ed5cba25 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TrainedModelConfigInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L202-L205 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L229-L232 type TrainedModelConfigInput struct { // FieldNames An array of input field names for the model. FieldNames []string `json:"field_names"` diff --git a/typedapi/types/trainedmodelconfigmetadata.go b/typedapi/types/trainedmodelconfigmetadata.go index 137e5b548b..4771b35a85 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TrainedModelConfigMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L207-L215 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L234-L242 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 diff --git a/typedapi/types/trainedmodeldeploymentallocationstatus.go b/typedapi/types/trainedmodeldeploymentallocationstatus.go index 17e205e55f..6ec00d5ed6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // TrainedModelDeploymentAllocationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L394-L401 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L438-L445 type TrainedModelDeploymentAllocationStatus struct { // AllocationCount The current number of nodes where the model is allocated. AllocationCount int `json:"allocation_count"` diff --git a/typedapi/types/trainedmodeldeploymentnodesstats.go b/typedapi/types/trainedmodeldeploymentnodesstats.go index 27a8876e5e..6871d00dfe 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,34 +31,42 @@ import ( // TrainedModelDeploymentNodesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L133-L163 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L144-L189 type TrainedModelDeploymentNodesStats struct { // AverageInferenceTimeMs The average time for each inference call to complete on this node. - AverageInferenceTimeMs Float64 `json:"average_inference_time_ms"` + AverageInferenceTimeMs Float64 `json:"average_inference_time_ms,omitempty"` + // AverageInferenceTimeMsExcludingCacheHits The average time for each inference call to complete on this node, excluding + // cache + AverageInferenceTimeMsExcludingCacheHits Float64 `json:"average_inference_time_ms_excluding_cache_hits,omitempty"` + AverageInferenceTimeMsLastMinute Float64 `json:"average_inference_time_ms_last_minute,omitempty"` // ErrorCount The number of errors when evaluating the trained model. - ErrorCount int `json:"error_count"` + ErrorCount *int `json:"error_count,omitempty"` + InferenceCacheHitCount *int64 `json:"inference_cache_hit_count,omitempty"` + InferenceCacheHitCountLastMinute *int64 `json:"inference_cache_hit_count_last_minute,omitempty"` // InferenceCount The total number of inference calls made against this node for this model. - InferenceCount int `json:"inference_count"` + InferenceCount *int64 `json:"inference_count,omitempty"` // LastAccess The epoch time stamp of the last inference call for the model on this node. - LastAccess int64 `json:"last_access"` + LastAccess *int64 `json:"last_access,omitempty"` // Node Information pertaining to the node. - Node DiscoveryNode `json:"node"` + Node DiscoveryNode `json:"node,omitempty"` // NumberOfAllocations The number of allocations assigned to this node. - NumberOfAllocations int `json:"number_of_allocations"` + NumberOfAllocations *int `json:"number_of_allocations,omitempty"` // NumberOfPendingRequests The number of inference requests queued to be processed. - NumberOfPendingRequests int `json:"number_of_pending_requests"` + NumberOfPendingRequests *int `json:"number_of_pending_requests,omitempty"` + PeakThroughputPerMinute int64 `json:"peak_throughput_per_minute"` // RejectionExecutionCount The number of inference requests that were not processed because the queue // was full. - RejectionExecutionCount int `json:"rejection_execution_count"` + RejectionExecutionCount *int `json:"rejection_execution_count,omitempty"` // RoutingState The current routing state and reason for the current routing state for this // allocation. RoutingState TrainedModelAssignmentRoutingTable `json:"routing_state"` // StartTime The epoch timestamp when the allocation started. - StartTime int64 `json:"start_time"` + StartTime *int64 `json:"start_time,omitempty"` // ThreadsPerAllocation The number of threads used by each allocation during inference. - ThreadsPerAllocation int `json:"threads_per_allocation"` + ThreadsPerAllocation *int `json:"threads_per_allocation,omitempty"` + ThroughputLastMinute int `json:"throughput_last_minute"` // TimeoutCount The number of inference requests that timed out before being processed. - TimeoutCount int `json:"timeout_count"` + TimeoutCount *int `json:"timeout_count,omitempty"` } func (s *TrainedModelDeploymentNodesStats) UnmarshalJSON(data []byte) error { @@ -81,6 +89,16 @@ func (s *TrainedModelDeploymentNodesStats) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "AverageInferenceTimeMs", err) } + case "average_inference_time_ms_excluding_cache_hits": + if err := dec.Decode(&s.AverageInferenceTimeMsExcludingCacheHits); err != nil { + return fmt.Errorf("%s | %w", "AverageInferenceTimeMsExcludingCacheHits", err) + } + + case "average_inference_time_ms_last_minute": + if err := dec.Decode(&s.AverageInferenceTimeMsLastMinute); err != nil { + return fmt.Errorf("%s | %w", "AverageInferenceTimeMsLastMinute", err) + } + case "error_count": var tmp any @@ -91,41 +109,60 @@ func (s *TrainedModelDeploymentNodesStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "ErrorCount", err) } - s.ErrorCount = value + s.ErrorCount = &value case float64: f := int(v) - s.ErrorCount = f + s.ErrorCount = &f } - case "inference_count": + case "inference_cache_hit_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", "InferenceCacheHitCount", err) + } + s.InferenceCacheHitCount = &value + case float64: + f := int64(v) + s.InferenceCacheHitCount = &f + } + case "inference_cache_hit_count_last_minute": 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", "InferenceCount", err) + return fmt.Errorf("%s | %w", "InferenceCacheHitCountLastMinute", err) } - s.InferenceCount = value + s.InferenceCacheHitCountLastMinute = &value case float64: - f := int(v) - s.InferenceCount = f + f := int64(v) + s.InferenceCacheHitCountLastMinute = &f } - case "last_access": + case "inference_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", "LastAccess", err) + return fmt.Errorf("%s | %w", "InferenceCount", err) } - s.LastAccess = value + s.InferenceCount = &value case float64: f := int64(v) - s.LastAccess = f + s.InferenceCount = &f + } + + case "last_access": + if err := dec.Decode(&s.LastAccess); err != nil { + return fmt.Errorf("%s | %w", "LastAccess", err) } case "node": @@ -143,10 +180,10 @@ func (s *TrainedModelDeploymentNodesStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "NumberOfAllocations", err) } - s.NumberOfAllocations = value + s.NumberOfAllocations = &value case float64: f := int(v) - s.NumberOfAllocations = f + s.NumberOfAllocations = &f } case "number_of_pending_requests": @@ -159,10 +196,25 @@ func (s *TrainedModelDeploymentNodesStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "NumberOfPendingRequests", err) } - s.NumberOfPendingRequests = value + s.NumberOfPendingRequests = &value case float64: f := int(v) - s.NumberOfPendingRequests = f + s.NumberOfPendingRequests = &f + } + + case "peak_throughput_per_minute": + 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", "PeakThroughputPerMinute", err) + } + s.PeakThroughputPerMinute = value + case float64: + f := int64(v) + s.PeakThroughputPerMinute = f } case "rejection_execution_count": @@ -175,10 +227,10 @@ func (s *TrainedModelDeploymentNodesStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "RejectionExecutionCount", err) } - s.RejectionExecutionCount = value + s.RejectionExecutionCount = &value case float64: f := int(v) - s.RejectionExecutionCount = f + s.RejectionExecutionCount = &f } case "routing_state": @@ -201,10 +253,26 @@ func (s *TrainedModelDeploymentNodesStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "ThreadsPerAllocation", err) } - s.ThreadsPerAllocation = value + s.ThreadsPerAllocation = &value + case float64: + f := int(v) + s.ThreadsPerAllocation = &f + } + + case "throughput_last_minute": + + 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", "ThroughputLastMinute", err) + } + s.ThroughputLastMinute = value case float64: f := int(v) - s.ThreadsPerAllocation = f + s.ThroughputLastMinute = f } case "timeout_count": @@ -217,10 +285,10 @@ func (s *TrainedModelDeploymentNodesStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "TimeoutCount", err) } - s.TimeoutCount = value + s.TimeoutCount = &value case float64: f := int(v) - s.TimeoutCount = f + s.TimeoutCount = &f } } diff --git a/typedapi/types/trainedmodeldeploymentstats.go b/typedapi/types/trainedmodeldeploymentstats.go index 0687959ee3..ee89a19aab 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -28,48 +28,52 @@ import ( "io" "strconv" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/deploymentstate" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/deploymentassignmentstate" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/trainingpriority" ) // TrainedModelDeploymentStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L62-L102 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L62-L107 type TrainedModelDeploymentStats struct { + AdaptiveAllocations *AdaptiveAllocationsSettings `json:"adaptive_allocations,omitempty"` // AllocationStatus The detailed allocation status for the deployment. - AllocationStatus TrainedModelDeploymentAllocationStatus `json:"allocation_status"` - CacheSize ByteSize `json:"cache_size,omitempty"` + AllocationStatus *TrainedModelDeploymentAllocationStatus `json:"allocation_status,omitempty"` + CacheSize ByteSize `json:"cache_size,omitempty"` // DeploymentId The unique identifier for the trained model deployment. DeploymentId string `json:"deployment_id"` // ErrorCount The sum of `error_count` for all nodes in the deployment. - ErrorCount int `json:"error_count"` + ErrorCount *int `json:"error_count,omitempty"` // InferenceCount The sum of `inference_count` for all nodes in the deployment. - InferenceCount int `json:"inference_count"` + InferenceCount *int `json:"inference_count,omitempty"` // ModelId The unique identifier for the trained model. ModelId string `json:"model_id"` // Nodes The deployment stats for each node that currently has the model allocated. // In serverless, stats are reported for a single unnamed virtual node. Nodes []TrainedModelDeploymentNodesStats `json:"nodes"` // NumberOfAllocations The number of allocations requested. - NumberOfAllocations int `json:"number_of_allocations"` + NumberOfAllocations *int `json:"number_of_allocations,omitempty"` + PeakThroughputPerMinute int64 `json:"peak_throughput_per_minute"` + Priority trainingpriority.TrainingPriority `json:"priority"` // QueueCapacity The number of inference requests that can be queued before new requests are // rejected. - QueueCapacity int `json:"queue_capacity"` + QueueCapacity *int `json:"queue_capacity,omitempty"` // Reason The reason for the current deployment state. Usually only populated when // the model is not deployed to a node. - Reason string `json:"reason"` + Reason *string `json:"reason,omitempty"` // RejectedExecutionCount The sum of `rejected_execution_count` for all nodes in the deployment. // Individual nodes reject an inference request if the inference queue is full. // The queue size is controlled by the `queue_capacity` setting in the start // trained model deployment API. - RejectedExecutionCount int `json:"rejected_execution_count"` + RejectedExecutionCount *int `json:"rejected_execution_count,omitempty"` // StartTime The epoch timestamp when the deployment started. StartTime int64 `json:"start_time"` // State The overall state of the deployment. - State deploymentstate.DeploymentState `json:"state"` + State *deploymentassignmentstate.DeploymentAssignmentState `json:"state,omitempty"` // ThreadsPerAllocation The number of threads used be each allocation during inference. - ThreadsPerAllocation int `json:"threads_per_allocation"` + ThreadsPerAllocation *int `json:"threads_per_allocation,omitempty"` // TimeoutCount The sum of `timeout_count` for all nodes in the deployment. - TimeoutCount int `json:"timeout_count"` + TimeoutCount *int `json:"timeout_count,omitempty"` } func (s *TrainedModelDeploymentStats) UnmarshalJSON(data []byte) error { @@ -87,6 +91,11 @@ func (s *TrainedModelDeploymentStats) UnmarshalJSON(data []byte) error { switch t { + case "adaptive_allocations": + if err := dec.Decode(&s.AdaptiveAllocations); err != nil { + return fmt.Errorf("%s | %w", "AdaptiveAllocations", err) + } + case "allocation_status": if err := dec.Decode(&s.AllocationStatus); err != nil { return fmt.Errorf("%s | %w", "AllocationStatus", err) @@ -112,10 +121,10 @@ func (s *TrainedModelDeploymentStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "ErrorCount", err) } - s.ErrorCount = value + s.ErrorCount = &value case float64: f := int(v) - s.ErrorCount = f + s.ErrorCount = &f } case "inference_count": @@ -128,10 +137,10 @@ func (s *TrainedModelDeploymentStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "InferenceCount", err) } - s.InferenceCount = value + s.InferenceCount = &value case float64: f := int(v) - s.InferenceCount = f + s.InferenceCount = &f } case "model_id": @@ -154,10 +163,30 @@ func (s *TrainedModelDeploymentStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "NumberOfAllocations", err) } - s.NumberOfAllocations = value + s.NumberOfAllocations = &value case float64: f := int(v) - s.NumberOfAllocations = f + s.NumberOfAllocations = &f + } + + case "peak_throughput_per_minute": + 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", "PeakThroughputPerMinute", err) + } + s.PeakThroughputPerMinute = value + case float64: + f := int64(v) + s.PeakThroughputPerMinute = f + } + + case "priority": + if err := dec.Decode(&s.Priority); err != nil { + return fmt.Errorf("%s | %w", "Priority", err) } case "queue_capacity": @@ -170,10 +199,10 @@ func (s *TrainedModelDeploymentStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "QueueCapacity", err) } - s.QueueCapacity = value + s.QueueCapacity = &value case float64: f := int(v) - s.QueueCapacity = f + s.QueueCapacity = &f } case "reason": @@ -186,7 +215,7 @@ func (s *TrainedModelDeploymentStats) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Reason = o + s.Reason = &o case "rejected_execution_count": @@ -198,10 +227,10 @@ func (s *TrainedModelDeploymentStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "RejectedExecutionCount", err) } - s.RejectedExecutionCount = value + s.RejectedExecutionCount = &value case float64: f := int(v) - s.RejectedExecutionCount = f + s.RejectedExecutionCount = &f } case "start_time": @@ -224,10 +253,10 @@ func (s *TrainedModelDeploymentStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "ThreadsPerAllocation", err) } - s.ThreadsPerAllocation = value + s.ThreadsPerAllocation = &value case float64: f := int(v) - s.ThreadsPerAllocation = f + s.ThreadsPerAllocation = &f } case "timeout_count": @@ -240,10 +269,10 @@ func (s *TrainedModelDeploymentStats) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "TimeoutCount", err) } - s.TimeoutCount = value + s.TimeoutCount = &value case float64: f := int(v) - s.TimeoutCount = f + s.TimeoutCount = &f } } diff --git a/typedapi/types/trainedmodelentities.go b/typedapi/types/trainedmodelentities.go index f5efcbe46b..87899ca333 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TrainedModelEntities type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L433-L439 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L421-L427 type TrainedModelEntities struct { ClassName string `json:"class_name"` ClassProbability Float64 `json:"class_probability"` diff --git a/typedapi/types/trainedmodelinferenceclassimportance.go b/typedapi/types/trainedmodelinferenceclassimportance.go index 7ee52ec4cc..ba81656cb7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceClassImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L446-L449 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L434-L437 type TrainedModelInferenceClassImportance struct { ClassName string `json:"class_name"` Importance Float64 `json:"importance"` diff --git a/typedapi/types/trainedmodelinferencefeatureimportance.go b/typedapi/types/trainedmodelinferencefeatureimportance.go index 920c65d156..39a089b684 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L451-L455 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L439-L443 type TrainedModelInferenceFeatureImportance struct { Classes []TrainedModelInferenceClassImportance `json:"classes,omitempty"` FeatureName string `json:"feature_name"` diff --git a/typedapi/types/trainedmodelinferencestats.go b/typedapi/types/trainedmodelinferencestats.go index c5729d8eea..a7db863a7d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L104-L124 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L115-L135 type TrainedModelInferenceStats struct { // CacheMissCount The number of times the model was loaded for inference and was not retrieved // from the cache. diff --git a/typedapi/types/trainedmodellocation.go b/typedapi/types/trainedmodellocation.go index e7e03b5119..73519a8cb6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TrainedModelLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L420-L422 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L466-L468 type TrainedModelLocation struct { Index TrainedModelLocationIndex `json:"index"` } diff --git a/typedapi/types/trainedmodellocationindex.go b/typedapi/types/trainedmodellocationindex.go index a7082978cb..2242fb58cc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TrainedModelLocationIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L424-L426 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L470-L472 type TrainedModelLocationIndex struct { Name string `json:"name"` } diff --git a/typedapi/types/trainedmodelprefixstrings.go b/typedapi/types/trainedmodelprefixstrings.go index 85422fc0e1..82bdd44002 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TrainedModelPrefixStrings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L428-L437 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L474-L483 type TrainedModelPrefixStrings struct { // Ingest String prepended to input at ingest Ingest *string `json:"ingest,omitempty"` diff --git a/typedapi/types/trainedmodelsizestats.go b/typedapi/types/trainedmodelsizestats.go index c15d8c8742..70c1356eb5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TrainedModelSizeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L126-L131 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L137-L142 type TrainedModelSizeStats struct { // ModelSizeBytes The size of the model in bytes. ModelSizeBytes ByteSize `json:"model_size_bytes"` diff --git a/typedapi/types/trainedmodelsrecord.go b/typedapi/types/trainedmodelsrecord.go index 0c323bd17c..199a1e64f7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TrainedModelsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/ml_trained_models/types.ts#L23-L115 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/trainedmodelstats.go b/typedapi/types/trainedmodelstats.go index e1707c7d37..54e110b615 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TrainedModelStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/TrainedModel.ts#L42-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/TrainedModel.ts#L42-L60 type TrainedModelStats struct { // DeploymentStats A collection of deployment stats, which is present when the models are // deployed. diff --git a/typedapi/types/trainedmodeltree.go b/typedapi/types/trainedmodeltree.go index 100270afb3..b0f5bacec3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TrainedModelTree type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L74-L79 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L74-L79 type TrainedModelTree struct { ClassificationLabels []string `json:"classification_labels,omitempty"` FeatureNames []string `json:"feature_names"` diff --git a/typedapi/types/trainedmodeltreenode.go b/typedapi/types/trainedmodeltreenode.go index b37ffde5a3..7debea0daf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TrainedModelTreeNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L81-L91 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L81-L91 type TrainedModelTreeNode struct { DecisionType *string `json:"decision_type,omitempty"` DefaultLeft *bool `json:"default_left,omitempty"` diff --git a/typedapi/types/transformauthorization.go b/typedapi/types/transformauthorization.go index d42acfe991..5d88947261 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TransformAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/Authorization.ts#L59-L71 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/transformcontainer.go b/typedapi/types/transformcontainer.go index 6f12e69415..46fe92adaf 100644 --- a/typedapi/types/transformcontainer.go +++ b/typedapi/types/transformcontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TransformContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Transform.ts#L27-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Transform.ts#L27-L34 type TransformContainer struct { Chain []TransformContainer `json:"chain,omitempty"` Script *ScriptTransform `json:"script,omitempty"` diff --git a/typedapi/types/transformdestination.go b/typedapi/types/transformdestination.go index 8589d876be..914d513ac0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TransformDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/_types/Transform.ts#L34-L45 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/transformindexerstats.go b/typedapi/types/transformindexerstats.go index 5151f7523b..14be638952 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TransformIndexerStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/get_transform_stats/types.ts#L56-L74 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/get_transform_stats/types.ts#L56-L74 type TransformIndexerStats struct { DeleteTimeInMs *int64 `json:"delete_time_in_ms,omitempty"` DocumentsDeleted *int64 `json:"documents_deleted,omitempty"` diff --git a/typedapi/types/transformprogress.go b/typedapi/types/transformprogress.go index 3443c5ea70..94713625e0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TransformProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/get_transform_stats/types.ts#L48-L54 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/get_transform_stats/types.ts#L48-L54 type TransformProgress struct { DocsIndexed int64 `json:"docs_indexed"` DocsProcessed int64 `json:"docs_processed"` diff --git a/typedapi/types/transformsource.go b/typedapi/types/transformsource.go index e5f4dc5c4c..e01f551aee 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TransformSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/_types/Transform.ts#L146-L165 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/transformsrecord.go b/typedapi/types/transformsrecord.go index 43a278ee6c..d36f62b45f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TransformsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cat/transforms/types.ts#L22-L197 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/transformstats.go b/typedapi/types/transformstats.go index 8e248c9ead..423a472cc9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TransformStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/get_transform_stats/types.ts#L31-L42 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/get_transform_stats/types.ts#L31-L42 type TransformStats struct { Checkpointing Checkpointing `json:"checkpointing"` Health *TransformStatsHealth `json:"health,omitempty"` diff --git a/typedapi/types/transformstatshealth.go b/typedapi/types/transformstatshealth.go index 138a8cc18a..915fb84792 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // TransformStatsHealth type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/get_transform_stats/types.ts#L44-L46 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/get_transform_stats/types.ts#L44-L46 type TransformStatsHealth struct { Status healthstatus.HealthStatus `json:"status"` } diff --git a/typedapi/types/transformsummary.go b/typedapi/types/transformsummary.go index 389e470756..580ef1b0ba 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TransformSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/transform/get_transform/types.ts#L33-L61 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/transform/get_transform/types.ts#L33-L61 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 diff --git a/typedapi/types/translog.go b/typedapi/types/translog.go index a0d66bd7cb..2ca2494a2b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // Translog type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L341-L363 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L341-L363 type Translog struct { // Durability Whether or not to `fsync` and commit the translog after every index, delete, // update, or bulk request. diff --git a/typedapi/types/translogretention.go b/typedapi/types/translogretention.go index ee7afcff63..3b1180358f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TranslogRetention type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/_types/IndexSettings.ts#L382-L401 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/_types/IndexSettings.ts#L382-L401 type TranslogRetention struct { // Age This controls the maximum duration for which translog files are kept by each // shard. Keeping more diff --git a/typedapi/types/translogstats.go b/typedapi/types/translogstats.go index ba09c16654..6161be2c95 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TranslogStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L397-L405 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L397-L405 type TranslogStats struct { EarliestLastModifiedAge int64 `json:"earliest_last_modified_age"` Operations int64 `json:"operations"` diff --git a/typedapi/types/translogstatus.go b/typedapi/types/translogstatus.go index a721500b9b..554c75ef43 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TranslogStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/recovery/types.ts#L102-L109 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/recovery/types.ts#L102-L109 type TranslogStatus struct { Percent Percentage `json:"percent"` Recovered int64 `json:"recovered"` diff --git a/typedapi/types/transport.go b/typedapi/types/transport.go index 688aaa310b..bbc1133768 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Transport type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L1047-L1090 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L1118-L1161 type Transport struct { // InboundHandlingTimeHistogram The distribution of the time spent handling each inbound message on a // transport thread, represented as a histogram. diff --git a/typedapi/types/transporthistogram.go b/typedapi/types/transporthistogram.go index 6918412e95..30d9a5b040 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TransportHistogram type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/nodes/_types/Stats.ts#L1092-L1106 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/nodes/_types/Stats.ts#L1163-L1177 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. diff --git a/typedapi/types/triggercontainer.go b/typedapi/types/triggercontainer.go index 43f602ec46..cc42976947 100644 --- a/typedapi/types/triggercontainer.go +++ b/typedapi/types/triggercontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TriggerContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Trigger.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Trigger.ts#L23-L28 type TriggerContainer struct { Schedule *ScheduleContainer `json:"schedule,omitempty"` } diff --git a/typedapi/types/triggereventcontainer.go b/typedapi/types/triggereventcontainer.go index 869f5dd51d..5146917268 100644 --- a/typedapi/types/triggereventcontainer.go +++ b/typedapi/types/triggereventcontainer.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TriggerEventContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Trigger.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Trigger.ts#L32-L37 type TriggerEventContainer struct { Schedule *ScheduleTriggerEvent `json:"schedule,omitempty"` } diff --git a/typedapi/types/triggereventresult.go b/typedapi/types/triggereventresult.go index 3873f9250c..d5231ecbdb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TriggerEventResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Trigger.ts#L39-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Trigger.ts#L39-L43 type TriggerEventResult struct { Manual TriggerEventContainer `json:"manual"` TriggeredTime DateTime `json:"triggered_time"` diff --git a/typedapi/types/trimprocessor.go b/typedapi/types/trimprocessor.go index 1dd1a03087..37d6d2805a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TrimProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L1124-L1140 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1525-L1541 type TrimProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/trimtokenfilter.go b/typedapi/types/trimtokenfilter.go index f9f5f3620c..ad6fef32d0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // TrimTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L328-L330 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L327-L329 type TrimTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/truncatetokenfilter.go b/typedapi/types/truncatetokenfilter.go index 01aac8ea68..5b70b8d8c2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TruncateTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L332-L335 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L331-L334 type TruncateTokenFilter struct { Length *int `json:"length,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/ttestaggregate.go b/typedapi/types/ttestaggregate.go index b88d814dda..4a6bd8b076 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TTestAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L742-L746 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L838-L845 type TTestAggregate struct { Meta Metadata `json:"meta,omitempty"` Value *Float64 `json:"value,omitempty"` diff --git a/typedapi/types/ttestaggregation.go b/typedapi/types/ttestaggregation.go index ae2ec7e096..96ed900ef2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // TTestAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L294-L308 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L303-L317 type TTestAggregation struct { // A Test population A. A *TestPopulation `json:"a,omitempty"` diff --git a/typedapi/types/turkishanalyzer.go b/typedapi/types/turkishanalyzer.go new file mode 100644 index 0000000000..2dd065a922 --- /dev/null +++ b/typedapi/types/turkishanalyzer.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/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// TurkishAnalyzer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L299-L304 +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"` +} + +func (s *TurkishAnalyzer) 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 "stem_exclusion": + if err := dec.Decode(&s.StemExclusion); err != nil { + return fmt.Errorf("%s | %w", "StemExclusion", err) + } + + 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) + } + } + + case "stopwords_path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StopwordsPath", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StopwordsPath = &o + + 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 TurkishAnalyzer) MarshalJSON() ([]byte, error) { + type innerTurkishAnalyzer TurkishAnalyzer + tmp := innerTurkishAnalyzer{ + StemExclusion: s.StemExclusion, + Stopwords: s.Stopwords, + StopwordsPath: s.StopwordsPath, + Type: s.Type, + } + + tmp.Type = "turkish" + + return json.Marshal(tmp) +} + +// NewTurkishAnalyzer returns a TurkishAnalyzer. +func NewTurkishAnalyzer() *TurkishAnalyzer { + r := &TurkishAnalyzer{} + + return r +} diff --git a/typedapi/types/typefieldmappings.go b/typedapi/types/typefieldmappings.go index b875c000c9..3bf6a7221a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // TypeFieldMappings type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/get_field_mapping/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/get_field_mapping/types.ts#L24-L26 type TypeFieldMappings struct { Mappings map[string]FieldMapping `json:"mappings"` } diff --git a/typedapi/types/typemapping.go b/typedapi/types/typemapping.go index 6f13c8a870..1f4d2bc1d4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // TypeMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/TypeMapping.ts#L34-L57 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/TypeMapping.ts#L34-L57 type TypeMapping struct { AllField *AllField `json:"all_field,omitempty"` DataStreamTimestamp_ *DataStreamTimestamp `json:"_data_stream_timestamp,omitempty"` diff --git a/typedapi/types/typequery.go b/typedapi/types/typequery.go index a1f7cfbb7f..16cc2129d9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // TypeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L269-L271 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L301-L303 type TypeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/uaxemailurltokenizer.go b/typedapi/types/uaxemailurltokenizer.go index 2125c5635c..03f0af85b1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UaxEmailUrlTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L110-L113 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L130-L133 type UaxEmailUrlTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/unassignedinformation.go b/typedapi/types/unassignedinformation.go index a0bedd976e..0b8155ac2d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // UnassignedInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/cluster/allocation_explain/types.ts#L117-L125 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/cluster/allocation_explain/types.ts#L128-L136 type UnassignedInformation struct { AllocationStatus *string `json:"allocation_status,omitempty"` At DateTime `json:"at"` diff --git a/typedapi/types/uniquetokenfilter.go b/typedapi/types/uniquetokenfilter.go index b0c279624e..0ac444270e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UniqueTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L337-L340 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L336-L339 type UniqueTokenFilter struct { OnlyOnSamePosition *bool `json:"only_on_same_position,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/unmappedraretermsaggregate.go b/typedapi/types/unmappedraretermsaggregate.go index 74fcb80946..0c5f5f8a03 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // UnmappedRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L455-L461 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L493-L499 type UnmappedRareTermsAggregate struct { Buckets BucketsVoid `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/unmappedsampleraggregate.go b/typedapi/types/unmappedsampleraggregate.go index a7be9ae8ba..535977255d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // UnmappedSamplerAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L505-L506 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L561-L562 type UnmappedSamplerAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -491,6 +491,13 @@ func (s *UnmappedSamplerAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/unmappedsignificanttermsaggregate.go b/typedapi/types/unmappedsignificanttermsaggregate.go index b024609d31..9ba7fc6d9b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UnmappedSignificantTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L614-L620 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L690-L696 type UnmappedSignificantTermsAggregate struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsVoid `json:"buckets"` diff --git a/typedapi/types/unmappedtermsaggregate.go b/typedapi/types/unmappedtermsaggregate.go index a1b9a5d46f..b2b094bc55 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UnmappedTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L425-L431 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L463-L469 type UnmappedTermsAggregate struct { Buckets BucketsVoid `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/unrateddocument.go b/typedapi/types/unrateddocument.go index 7fcd028240..64795dac98 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // UnratedDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/rank_eval/types.ts#L150-L153 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/rank_eval/types.ts#L150-L153 type UnratedDocument struct { Id_ string `json:"_id"` Index_ string `json:"_index"` diff --git a/typedapi/types/unsignedlongnumberproperty.go b/typedapi/types/unsignedlongnumberproperty.go index 5f34ecb0da..03f0680f73 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -35,7 +35,7 @@ import ( // UnsignedLongNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L177-L180 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L177-L180 type UnsignedLongNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -52,7 +52,6 @@ type UnsignedLongNumberProperty struct { OnScriptError *onscripterror.OnScriptError `json:"on_script_error,omitempty"` Properties map[string]Property `json:"properties,omitempty"` Script *Script `json:"script,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` // TimeSeriesDimension For internal use by Elastic only. Marks the field as a time series dimension. // Defaults to false. @@ -848,18 +847,6 @@ func (s *UnsignedLongNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Script", err) } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -921,7 +908,6 @@ func (s UnsignedLongNumberProperty) MarshalJSON() ([]byte, error) { OnScriptError: s.OnScriptError, Properties: s.Properties, Script: s.Script, - Similarity: s.Similarity, Store: s.Store, TimeSeriesDimension: s.TimeSeriesDimension, TimeSeriesMetric: s.TimeSeriesMetric, diff --git a/typedapi/types/untypeddecayfunction.go b/typedapi/types/untypeddecayfunction.go index 243a6b52cb..0cfba90b42 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -29,7 +29,7 @@ import ( // UntypedDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/compound.ts#L191-L194 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/untypeddistancefeaturequery.go b/typedapi/types/untypeddistancefeaturequery.go index eac3468550..adb3a880bf 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UntypedDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/specialized.ts#L62-L65 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/untypedrangequery.go b/typedapi/types/untypedrangequery.go index 123575c57f..22c3f1d535 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // UntypedRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L135-L144 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L150-L159 type UntypedRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/updateaction.go b/typedapi/types/updateaction.go index 83ffea2499..ce92b2f1dc 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UpdateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/bulk/types.ts#L169-L205 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/bulk/types.ts#L169-L205 type UpdateAction struct { // DetectNoop Set to false to disable setting 'result' in the response // to 'noop' if no change to the document occurred. diff --git a/typedapi/types/updatebyqueryrethrottlenode.go b/typedapi/types/updatebyqueryrethrottlenode.go index af0b90b0a6..bbe8c6ccf9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // UpdateByQueryRethrottleNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleNode.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleNode.ts#L25-L27 type UpdateByQueryRethrottleNode struct { Attributes map[string]string `json:"attributes"` Host string `json:"host"` diff --git a/typedapi/types/updateoperation.go b/typedapi/types/updateoperation.go index 621c5c5a91..0d97871784 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // UpdateOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/bulk/types.ts#L136-L143 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/bulk/types.ts#L136-L143 type UpdateOperation struct { // Id_ The document ID. Id_ *string `json:"_id,omitempty"` diff --git a/typedapi/types/uppercaseprocessor.go b/typedapi/types/uppercaseprocessor.go index 2ee44c14a7..e289265e2a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UppercaseProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L1142-L1158 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1543-L1559 type UppercaseProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/uppercasetokenfilter.go b/typedapi/types/uppercasetokenfilter.go index c9d024a893..a9c741e8ef 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // UppercaseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L342-L344 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L341-L343 type UppercaseTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/uripartsprocessor.go b/typedapi/types/uripartsprocessor.go new file mode 100644 index 0000000000..fff7871463 --- /dev/null +++ b/typedapi/types/uripartsprocessor.go @@ -0,0 +1,195 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// UriPartsProcessor type. +// +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1579-L1605 +type UriPartsProcessor struct { + // Description Description of the processor. + // Useful for describing the purpose of the processor or its configuration. + Description *string `json:"description,omitempty"` + // Field Field containing the URI string. + Field string `json:"field"` + // If Conditionally execute the processor. + If *string `json:"if,omitempty"` + // IgnoreFailure Ignore failures for the processor. + IgnoreFailure *bool `json:"ignore_failure,omitempty"` + // IgnoreMissing If `true` and `field` does not exist, the processor quietly exits without + // modifying the document. + IgnoreMissing *bool `json:"ignore_missing,omitempty"` + // KeepOriginal If `true`, the processor copies the unparsed URI to + // `.original`. + KeepOriginal *bool `json:"keep_original,omitempty"` + // OnFailure Handle failures for the processor. + OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // RemoveIfSuccessful If `true`, the processor removes the `field` after parsing the URI string. + // If parsing fails, the processor does not remove the `field`. + RemoveIfSuccessful *bool `json:"remove_if_successful,omitempty"` + // Tag Identifier for the processor. + // Useful for debugging and metrics. + Tag *string `json:"tag,omitempty"` + // TargetField Output field for the URI object. + TargetField *string `json:"target_field,omitempty"` +} + +func (s *UriPartsProcessor) 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 "description": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Description", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Description = &o + + case "field": + if err := dec.Decode(&s.Field); err != nil { + return fmt.Errorf("%s | %w", "Field", err) + } + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "ignore_failure": + 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", "IgnoreFailure", err) + } + s.IgnoreFailure = &value + case bool: + s.IgnoreFailure = &v + } + + case "ignore_missing": + 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", "IgnoreMissing", err) + } + s.IgnoreMissing = &value + case bool: + s.IgnoreMissing = &v + } + + case "keep_original": + 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", "KeepOriginal", err) + } + s.KeepOriginal = &value + case bool: + s.KeepOriginal = &v + } + + case "on_failure": + if err := dec.Decode(&s.OnFailure); err != nil { + return fmt.Errorf("%s | %w", "OnFailure", err) + } + + case "remove_if_successful": + 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", "RemoveIfSuccessful", err) + } + s.RemoveIfSuccessful = &value + case bool: + s.RemoveIfSuccessful = &v + } + + case "tag": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Tag", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Tag = &o + + case "target_field": + if err := dec.Decode(&s.TargetField); err != nil { + return fmt.Errorf("%s | %w", "TargetField", err) + } + + } + } + return nil +} + +// NewUriPartsProcessor returns a UriPartsProcessor. +func NewUriPartsProcessor() *UriPartsProcessor { + r := &UriPartsProcessor{} + + return r +} diff --git a/typedapi/types/urldecodeprocessor.go b/typedapi/types/urldecodeprocessor.go index d2f2bb65a4..9d84e41161 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UrlDecodeProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L1160-L1176 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L1561-L1577 type UrlDecodeProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/usagestatsindex.go b/typedapi/types/usagestatsindex.go index cfd6d4fa08..900501055d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // UsageStatsIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L41-L43 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L41-L43 type UsageStatsIndex struct { Shards []UsageStatsShards `json:"shards"` } diff --git a/typedapi/types/usagestatsshards.go b/typedapi/types/usagestatsshards.go index 0f5d62c220..ee36ff822d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UsageStatsShards type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L45-L50 type UsageStatsShards struct { Routing ShardRouting `json:"routing"` Stats IndicesShardsStats `json:"stats"` diff --git a/typedapi/types/user.go b/typedapi/types/user.go index 64d7e40836..a46dd09502 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // User type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/User.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/User.ts#L23-L31 type User struct { Email *string `json:"email,omitempty"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/useragentprocessor.go b/typedapi/types/useragentprocessor.go index bf9508b87c..40baa7a90c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,11 +33,13 @@ import ( // UserAgentProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ingest/_types/Processors.ts#L370-L390 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ingest/_types/Processors.ts#L514-L545 type UserAgentProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. Description *string `json:"description,omitempty"` + // ExtractDeviceType Extracts device type from the user agent string on a best-effort basis. + ExtractDeviceType *bool `json:"extract_device_type,omitempty"` // Field The field containing the user agent string. Field string `json:"field"` // If Conditionally execute the processor. @@ -48,8 +50,9 @@ type UserAgentProcessor struct { // modifying the document. IgnoreMissing *bool `json:"ignore_missing,omitempty"` // OnFailure Handle failures for the processor. - OnFailure []ProcessorContainer `json:"on_failure,omitempty"` - Options []useragentproperty.UserAgentProperty `json:"options,omitempty"` + OnFailure []ProcessorContainer `json:"on_failure,omitempty"` + // Properties Controls what properties are added to `target_field`. + Properties []useragentproperty.UserAgentProperty `json:"properties,omitempty"` // RegexFile The name of the file in the `config/ingest-user-agent` directory containing // the regular expressions for parsing the user agent string. Both the directory // and the file have to be created before starting Elasticsearch. If not @@ -90,6 +93,20 @@ func (s *UserAgentProcessor) UnmarshalJSON(data []byte) error { } s.Description = &o + case "extract_device_type": + 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", "ExtractDeviceType", err) + } + s.ExtractDeviceType = &value + case bool: + s.ExtractDeviceType = &v + } + case "field": if err := dec.Decode(&s.Field); err != nil { return fmt.Errorf("%s | %w", "Field", err) @@ -140,9 +157,9 @@ func (s *UserAgentProcessor) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "OnFailure", err) } - case "options": - if err := dec.Decode(&s.Options); err != nil { - return fmt.Errorf("%s | %w", "Options", err) + case "properties": + if err := dec.Decode(&s.Properties); err != nil { + return fmt.Errorf("%s | %w", "Properties", err) } case "regex_file": diff --git a/typedapi/types/userindicesprivileges.go b/typedapi/types/userindicesprivileges.go index a75c6d2b87..913f2413f7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // UserIndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/Privileges.ts#L223-L245 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/Privileges.ts#L293-L315 type UserIndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited diff --git a/typedapi/types/userprofile.go b/typedapi/types/userprofile.go index dc332c6084..8d42a67d7a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UserProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/UserProfile.ts#L42-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/UserProfile.ts#L41-L47 type UserProfile struct { Data map[string]json.RawMessage `json:"data"` Enabled *bool `json:"enabled,omitempty"` diff --git a/typedapi/types/userprofilehitmetadata.go b/typedapi/types/userprofilehitmetadata.go index 62f2455947..d1c8e5de83 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UserProfileHitMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/UserProfile.ts#L28-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/UserProfile.ts#L27-L30 type UserProfileHitMetadata struct { PrimaryTerm_ int64 `json:"_primary_term"` SeqNo_ int64 `json:"_seq_no"` diff --git a/typedapi/types/userprofileuser.go b/typedapi/types/userprofileuser.go index 45041ec4a4..6c6937cc2c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UserProfileUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/UserProfile.ts#L33-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/UserProfile.ts#L32-L39 type UserProfileUser struct { Email *string `json:"email,omitempty"` FullName *string `json:"full_name,omitempty"` diff --git a/typedapi/types/userprofilewithmetadata.go b/typedapi/types/userprofilewithmetadata.go index 793322d62e..c3ed548445 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UserProfileWithMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/_types/UserProfile.ts#L50-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/_types/UserProfile.ts#L49-L52 type UserProfileWithMetadata struct { Data map[string]json.RawMessage `json:"data"` Doc_ UserProfileHitMetadata `json:"_doc"` diff --git a/typedapi/types/userquerycontainer.go b/typedapi/types/userquerycontainer.go index 8e76b85f71..426c3491c3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // UserQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/query_user/types.ts#L37-L101 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/query_user/types.ts#L37-L101 type UserQueryContainer struct { // Bool matches users matching boolean combinations of other queries. Bool *BoolQuery `json:"bool,omitempty"` diff --git a/typedapi/types/userrealm.go b/typedapi/types/userrealm.go index d00c0a27a5..a68ef78404 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // UserRealm type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/security/get_token/types.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/get_token/types.ts#L30-L33 type UserRealm struct { Name string `json:"name"` Type string `json:"type"` diff --git a/typedapi/types/validation.go b/typedapi/types/validation.go index d425e60bde..475f45be72 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -28,5 +28,5 @@ package types // IncludedInValidation // RegexValidation // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/connector/_types/Connector.ts#L50-L56 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/connector/_types/Connector.ts#L50-L56 type Validation any diff --git a/typedapi/types/validationloss.go b/typedapi/types/validationloss.go index d496231df5..b1a42e548f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ValidationLoss type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/DataframeAnalytics.ts#L570-L575 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/DataframeAnalytics.ts#L571-L576 type ValidationLoss struct { // FoldValues Validation loss values for every added decision tree during the forest // growing procedure. diff --git a/typedapi/types/valuecountaggregate.go b/typedapi/types/valuecountaggregate.go index 0198f08fb5..aef588bd8c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ValueCountAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L218-L222 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/valuecountaggregation.go b/typedapi/types/valuecountaggregation.go index df5564d762..fb18ce9e65 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ValueCountAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L422-L422 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L434-L434 type ValueCountAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/variablewidthhistogramaggregate.go b/typedapi/types/variablewidthhistogramaggregate.go index d6bd2cad6d..03032c5a52 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // VariableWidthHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L364-L366 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L402-L404 type VariableWidthHistogramAggregate struct { Buckets BucketsVariableWidthHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/variablewidthhistogramaggregation.go b/typedapi/types/variablewidthhistogramaggregation.go index 5d4672503e..ef992de057 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // VariableWidthHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/bucket.ts#L1022-L1043 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/bucket.ts#L1091-L1115 type VariableWidthHistogramAggregation struct { // Buckets The target number of buckets. Buckets *int `json:"buckets,omitempty"` diff --git a/typedapi/types/variablewidthhistogrambucket.go b/typedapi/types/variablewidthhistogrambucket.go index 2fd41d3abb..dd9717dca2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // VariableWidthHistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L368-L375 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/Aggregate.ts#L406-L413 type VariableWidthHistogramBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -575,6 +575,13 @@ func (s *VariableWidthHistogramBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "scripted_metric": o := NewScriptedMetricAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/vector.go b/typedapi/types/vector.go index 69127de1ab..631e146ff2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Vector type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L454-L458 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L452-L456 type Vector struct { Available bool `json:"available"` DenseVectorDimsAvgCount int `json:"dense_vector_dims_avg_count"` diff --git a/typedapi/types/verifyindex.go b/typedapi/types/verifyindex.go index 0fe83868ee..f043f060c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // VerifyIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/indices/recovery/types.ts#L111-L116 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/versionproperty.go b/typedapi/types/versionproperty.go index 2df9b7e730..0e8716db72 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // VersionProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L287-L289 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L289-L291 type VersionProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -43,7 +43,6 @@ type VersionProperty struct { // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -760,18 +759,6 @@ func (s *VersionProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -807,7 +794,6 @@ func (s VersionProperty) MarshalJSON() ([]byte, error) { IgnoreAbove: s.IgnoreAbove, Meta: s.Meta, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/vertex.go b/typedapi/types/vertex.go index 7d56addecf..81cc7499a1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Vertex type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/graph/_types/Vertex.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/graph/_types/Vertex.ts#L23-L28 type Vertex struct { Depth int64 `json:"depth"` Field string `json:"field"` diff --git a/typedapi/types/vertexdefinition.go b/typedapi/types/vertexdefinition.go index 05473b2cef..0853f1ae36 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // VertexDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/graph/_types/Vertex.ts#L30-L59 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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"` diff --git a/typedapi/types/vertexinclude.go b/typedapi/types/vertexinclude.go index 404be10657..cd302c92fa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // VertexInclude type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/graph/_types/Vertex.ts#L61-L64 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/graph/_types/Vertex.ts#L61-L64 type VertexInclude struct { Boost Float64 `json:"boost"` Term string `json:"term"` diff --git a/typedapi/types/vocabulary.go b/typedapi/types/vocabulary.go index 8c09f9f529..ef0e5c1178 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Vocabulary type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L233-L235 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L217-L219 type Vocabulary struct { Index string `json:"index"` } diff --git a/typedapi/types/waitforactiveshards.go b/typedapi/types/waitforactiveshards.go index 5de6bda747..a2365ef519 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -25,5 +25,5 @@ package types // int // waitforactiveshardoptions.WaitForActiveShardOptions // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/common.ts#L142-L143 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/common.ts#L143-L144 type WaitForActiveShards any diff --git a/typedapi/types/waitforsnapshotaction.go b/typedapi/types/waitforsnapshotaction.go index 692c4dbe86..422b97d670 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WaitForSnapshotAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ilm/_types/Phase.ts#L148-L150 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ilm/_types/Phase.ts#L148-L150 type WaitForSnapshotAction struct { Policy string `json:"policy"` } diff --git a/typedapi/types/warmerstats.go b/typedapi/types/warmerstats.go index e131cd8b5f..b74a539d30 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WarmerStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Stats.ts#L407-L412 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Stats.ts#L407-L412 type WarmerStats struct { Current int64 `json:"current"` Total int64 `json:"total"` diff --git a/typedapi/types/watch.go b/typedapi/types/watch.go index 61a8460b39..9ef773a949 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // Watch type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Watch.ts#L37-L47 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Watch.ts#L37-L47 type Watch struct { Actions map[string]WatcherAction `json:"actions"` Condition WatcherCondition `json:"condition"` diff --git a/typedapi/types/watcher.go b/typedapi/types/watcher.go index 573fbac10f..847df1e50a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Watcher type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L460-L464 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L458-L462 type Watcher struct { Available bool `json:"available"` Count Counter `json:"count"` diff --git a/typedapi/types/watcheraction.go b/typedapi/types/watcheraction.go index 68b17154a6..b3df6c7363 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // WatcherAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Action.ts#L41-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Action.ts#L35-L54 type WatcherAction struct { ActionType *actiontype.ActionType `json:"action_type,omitempty"` Condition *WatcherCondition `json:"condition,omitempty"` diff --git a/typedapi/types/watcheractions.go b/typedapi/types/watcheractions.go index 44de64cb73..78b9730182 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // WatcherActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L396-L398 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L394-L396 type WatcherActions struct { Actions map[string]WatcherActionTotals `json:"actions"` } diff --git a/typedapi/types/watcheractiontotals.go b/typedapi/types/watcheractiontotals.go index 5b38d59779..2af0e50025 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // WatcherActionTotals type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L412-L415 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L410-L413 type WatcherActionTotals struct { Total Duration `json:"total"` TotalTimeInMs int64 `json:"total_time_in_ms"` diff --git a/typedapi/types/watchercondition.go b/typedapi/types/watchercondition.go index 89af3a0634..185a759def 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // WatcherCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Conditions.ts#L50-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Conditions.ts#L50-L62 type WatcherCondition struct { Always *AlwaysCondition `json:"always,omitempty"` ArrayCompare map[string]ArrayCompareCondition `json:"array_compare,omitempty"` diff --git a/typedapi/types/watcherinput.go b/typedapi/types/watcherinput.go index eeeb62d01f..36ac03dc1a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -26,7 +26,7 @@ import ( // WatcherInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Input.ts#L90-L98 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Input.ts#L90-L98 type WatcherInput struct { Chain *ChainInput `json:"chain,omitempty"` Http *HttpInput `json:"http,omitempty"` diff --git a/typedapi/types/watchernodestats.go b/typedapi/types/watchernodestats.go index a3b57a75f0..04e2fe460d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // WatcherNodeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/stats/types.ts#L33-L40 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/stats/types.ts#L33-L40 type WatcherNodeStats struct { CurrentWatches []WatchRecordStats `json:"current_watches,omitempty"` ExecutionThreadPool ExecutionThreadPool `json:"execution_thread_pool"` diff --git a/typedapi/types/watcherstatusactions.go b/typedapi/types/watcherstatusactions.go index 74e0ee54b1..71e9551e14 100644 --- a/typedapi/types/watcherstatusactions.go +++ b/typedapi/types/watcherstatusactions.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // WatcherStatusActions type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Action.ts#L62-L62 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Action.ts#L56-L56 type WatcherStatusActions map[string]ActionStatus diff --git a/typedapi/types/watcherwatch.go b/typedapi/types/watcherwatch.go index f03d52abfa..38c24e5606 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // WatcherWatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L400-L405 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L398-L403 type WatcherWatch struct { Action map[string]Counter `json:"action,omitempty"` Condition map[string]Counter `json:"condition,omitempty"` diff --git a/typedapi/types/watcherwatchtrigger.go b/typedapi/types/watcherwatchtrigger.go index 2245b191a8..373516f295 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // WatcherWatchTrigger type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L407-L410 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L405-L408 type WatcherWatchTrigger struct { All_ Counter `json:"_all"` Schedule *WatcherWatchTriggerSchedule `json:"schedule,omitempty"` diff --git a/typedapi/types/watcherwatchtriggerschedule.go b/typedapi/types/watcherwatchtriggerschedule.go index 4bd2e61262..e3ee3844c6 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WatcherWatchTriggerSchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L466-L469 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L464-L467 type WatcherWatchTriggerSchedule struct { Active int64 `json:"active"` All_ Counter `json:"_all"` diff --git a/typedapi/types/watchrecord.go b/typedapi/types/watchrecord.go index d8bd03b976..b7fb9feab4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // WatchRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/execute_watch/types.ts#L27-L39 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/execute_watch/types.ts#L27-L39 type WatchRecord struct { Condition WatcherCondition `json:"condition"` Input WatcherInput `json:"input"` diff --git a/typedapi/types/watchrecordqueuedstats.go b/typedapi/types/watchrecordqueuedstats.go index 57e240ba34..3ae49db5b1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // WatchRecordQueuedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/stats/types.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/stats/types.ts#L50-L52 type WatchRecordQueuedStats struct { ExecutionTime DateTime `json:"execution_time"` } diff --git a/typedapi/types/watchrecordstats.go b/typedapi/types/watchrecordstats.go index 6d65db5efd..3b0faf2306 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -32,7 +32,7 @@ import ( // WatchRecordStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/stats/types.ts#L54-L60 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/stats/types.ts#L54-L60 type WatchRecordStats struct { ExecutedActions []string `json:"executed_actions,omitempty"` ExecutionPhase executionphase.ExecutionPhase `json:"execution_phase"` diff --git a/typedapi/types/watchstatus.go b/typedapi/types/watchstatus.go index 0aa95eb664..88205834ac 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WatchStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Watch.ts#L49-L56 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Watch.ts#L49-L56 type WatchStatus struct { Actions WatcherStatusActions `json:"actions"` ExecutionState *string `json:"execution_state,omitempty"` diff --git a/typedapi/types/webhookaction.go b/typedapi/types/webhookaction.go index 6b9104fa0f..496084e700 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -34,7 +34,7 @@ import ( // WebhookAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L293-L293 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L293-L293 type WebhookAction struct { Auth *HttpInputAuthentication `json:"auth,omitempty"` Body *string `json:"body,omitempty"` diff --git a/typedapi/types/webhookresult.go b/typedapi/types/webhookresult.go index 5dc621d699..a105bebf7b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // WebhookResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/_types/Actions.ts#L295-L298 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/_types/Actions.ts#L295-L298 type WebhookResult struct { Request HttpInputRequestResult `json:"request"` Response *HttpInputResponseResult `json:"response,omitempty"` diff --git a/typedapi/types/weightedaverageaggregation.go b/typedapi/types/weightedaverageaggregation.go index 36dc2aef83..05e91b6c73 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // WeightedAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L437-L451 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L449-L463 type WeightedAverageAggregation struct { // Format A numeric response formatter. Format *string `json:"format,omitempty"` diff --git a/typedapi/types/weightedaveragevalue.go b/typedapi/types/weightedaveragevalue.go index d13a177b8b..f2deb0efa9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WeightedAverageValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/metric.ts#L453-L463 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/aggregations/metric.ts#L465-L475 type WeightedAverageValue struct { // Field The field from which to extract the values or weights. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/weightedavgaggregate.go b/typedapi/types/weightedavgaggregate.go index f22e6df9b7..04a83b8364 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WeightedAvgAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/aggregations/Aggregate.ts#L212-L216 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 diff --git a/typedapi/types/weightedtokensquery.go b/typedapi/types/weightedtokensquery.go index bc109c7ce7..950eccfa39 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WeightedTokensQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/WeightedTokensQuery.ts#L27-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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. diff --git a/typedapi/types/weights.go b/typedapi/types/weights.go index 8b0a704153..161282af86 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // Weights type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/put_trained_model/types.ts#L108-L110 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/put_trained_model/types.ts#L108-L110 type Weights struct { Weights Float64 `json:"weights"` } diff --git a/typedapi/types/whitespaceanalyzer.go b/typedapi/types/whitespaceanalyzer.go index a738173d49..475fe2ba3c 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -30,7 +30,7 @@ import ( // WhitespaceAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/analyzers.ts#L108-L111 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/analyzers.ts#L354-L357 type WhitespaceAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/whitespacetokenizer.go b/typedapi/types/whitespacetokenizer.go index 4adbc15296..e890b61e76 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WhitespaceTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/tokenizers.ts#L115-L118 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/tokenizers.ts#L135-L138 type WhitespaceTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/wildcardproperty.go b/typedapi/types/wildcardproperty.go index 0411d3d605..8fbb1421c2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // WildcardProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/mapping/core.ts#L291-L298 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/mapping/core.ts#L293-L300 type WildcardProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -44,7 +44,6 @@ type WildcardProperty struct { Meta map[string]string `json:"meta,omitempty"` NullValue *string `json:"null_value,omitempty"` Properties map[string]Property `json:"properties,omitempty"` - Similarity *string `json:"similarity,omitempty"` Store *bool `json:"store,omitempty"` Type string `json:"type,omitempty"` } @@ -773,18 +772,6 @@ func (s *WildcardProperty) UnmarshalJSON(data []byte) error { } } - case "similarity": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Similarity", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Similarity = &o - case "store": var tmp any dec.Decode(&tmp) @@ -821,7 +808,6 @@ func (s WildcardProperty) MarshalJSON() ([]byte, error) { Meta: s.Meta, NullValue: s.NullValue, Properties: s.Properties, - Similarity: s.Similarity, Store: s.Store, Type: s.Type, } diff --git a/typedapi/types/wildcardquery.go b/typedapi/types/wildcardquery.go index 731ccd044d..2893a7e4c5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WildcardQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/term.ts#L273-L290 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/term.ts#L305-L325 type WildcardQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/wktgeobounds.go b/typedapi/types/wktgeobounds.go index 76c6219782..522296ce47 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WktGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/Geo.ts#L150-L152 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/Geo.ts#L150-L152 type WktGeoBounds struct { Wkt string `json:"wkt"` } diff --git a/typedapi/types/worddelimitergraphtokenfilter.go b/typedapi/types/worddelimitergraphtokenfilter.go index 3b90236f03..c27ba00ce0 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WordDelimiterGraphTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L151-L168 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L150-L167 type WordDelimiterGraphTokenFilter struct { AdjustOffsets *bool `json:"adjust_offsets,omitempty"` CatenateAll *bool `json:"catenate_all,omitempty"` diff --git a/typedapi/types/worddelimitertokenfilter.go b/typedapi/types/worddelimitertokenfilter.go index 78f2c65111..617277ba93 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WordDelimiterTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/analysis/token_filters.ts#L134-L149 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/analysis/token_filters.ts#L133-L148 type WordDelimiterTokenFilter struct { CatenateAll *bool `json:"catenate_all,omitempty"` CatenateNumbers *bool `json:"catenate_numbers,omitempty"` diff --git a/typedapi/types/wrapperquery.go b/typedapi/types/wrapperquery.go index 7ad8960135..d26af54b25 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // WrapperQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_types/query_dsl/abstractions.ts#L501-L507 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_types/query_dsl/abstractions.ts#L501-L510 type WrapperQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/writeoperation.go b/typedapi/types/writeoperation.go index c1284c7caa..04c4994974 100644 --- a/typedapi/types/writeoperation.go +++ b/typedapi/types/writeoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -33,7 +33,7 @@ import ( // WriteOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/_global/bulk/types.ts#L109-L128 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/_global/bulk/types.ts#L109-L128 type WriteOperation struct { // DynamicTemplates A map from the full name of fields to the name of dynamic templates. // Defaults to an empty map. diff --git a/typedapi/types/xpackdatafeed.go b/typedapi/types/xpackdatafeed.go index e7544058db..ef2efae0b2 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // XpackDatafeed type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L77-L79 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L75-L77 type XpackDatafeed struct { Count int64 `json:"count"` } diff --git a/typedapi/types/xpackfeature.go b/typedapi/types/xpackfeature.go index 4897d37353..04a26de929 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // XpackFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/info/types.ts#L77-L82 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/info/types.ts#L85-L90 type XpackFeature struct { Available bool `json:"available"` Description *string `json:"description,omitempty"` diff --git a/typedapi/types/xpackfeatures.go b/typedapi/types/xpackfeatures.go index fc05b61005..87424e2006 100644 --- a/typedapi/types/xpackfeatures.go +++ b/typedapi/types/xpackfeatures.go @@ -16,28 +16,28 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types // XpackFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/info/types.ts#L42-L75 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/info/types.ts#L42-L83 type XpackFeatures struct { AggregateMetric XpackFeature `json:"aggregate_metric"` Analytics XpackFeature `json:"analytics"` Archive XpackFeature `json:"archive"` Ccr XpackFeature `json:"ccr"` - DataFrame *XpackFeature `json:"data_frame,omitempty"` - DataScience *XpackFeature `json:"data_science,omitempty"` DataStreams XpackFeature `json:"data_streams"` DataTiers XpackFeature `json:"data_tiers"` Enrich XpackFeature `json:"enrich"` + EnterpriseSearch XpackFeature `json:"enterprise_search"` Eql XpackFeature `json:"eql"` - Flattened *XpackFeature `json:"flattened,omitempty"` + Esql XpackFeature `json:"esql"` FrozenIndices XpackFeature `json:"frozen_indices"` Graph XpackFeature `json:"graph"` Ilm XpackFeature `json:"ilm"` + Logsdb XpackFeature `json:"logsdb"` Logstash XpackFeature `json:"logstash"` Ml XpackFeature `json:"ml"` Monitoring XpackFeature `json:"monitoring"` @@ -49,7 +49,7 @@ type XpackFeatures struct { Spatial XpackFeature `json:"spatial"` Sql XpackFeature `json:"sql"` Transform XpackFeature `json:"transform"` - Vectors *XpackFeature `json:"vectors,omitempty"` + UniversalProfiling XpackFeature `json:"universal_profiling"` VotingOnly XpackFeature `json:"voting_only"` Watcher XpackFeature `json:"watcher"` } diff --git a/typedapi/types/xpackquery.go b/typedapi/types/xpackquery.go index 7a51298683..e158e3322a 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // XpackQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L259-L264 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L257-L262 type XpackQuery struct { Count *int `json:"count,omitempty"` Failed *int `json:"failed,omitempty"` diff --git a/typedapi/types/xpackrealm.go b/typedapi/types/xpackrealm.go index eda6b41aa9..5c3cce2768 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // XpackRealm type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L417-L426 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L415-L424 type XpackRealm struct { Available bool `json:"available"` Cache []RealmCache `json:"cache,omitempty"` diff --git a/typedapi/types/xpackrolemapping.go b/typedapi/types/xpackrolemapping.go index e60186f9d4..1d44fa99b5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // XpackRoleMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L270-L273 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L268-L271 type XpackRoleMapping struct { Enabled int `json:"enabled"` Size int `json:"size"` diff --git a/typedapi/types/xpackruntimefieldtypes.go b/typedapi/types/xpackruntimefieldtypes.go index 6048ed28a6..d6c8f6620f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // XpackRuntimeFieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/types.ts#L275-L277 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/types.ts#L273-L275 type XpackRuntimeFieldTypes struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/zeroshotclassificationinferenceoptions.go b/typedapi/types/zeroshotclassificationinferenceoptions.go index d8208152f4..ef43a35fa4 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ZeroShotClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L201-L222 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L185-L206 type ZeroShotClassificationInferenceOptions struct { // ClassificationLabels The zero shot classification labels indicating entailment, neutral, and // contradiction diff --git a/typedapi/types/zeroshotclassificationinferenceupdateoptions.go b/typedapi/types/zeroshotclassificationinferenceupdateoptions.go index e460258850..04f9506161 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package types @@ -31,7 +31,7 @@ import ( // ZeroShotClassificationInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/ml/_types/inference.ts#L374-L383 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/ml/_types/inference.ts#L362-L371 type ZeroShotClassificationInferenceUpdateOptions struct { // Labels The labels to predict. Labels []string `json:"labels"` diff --git a/typedapi/watcher/ackwatch/ack_watch.go b/typedapi/watcher/ackwatch/ack_watch.go index fbf0ccdbe4..62a209274e 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Acknowledges a watch, manually throttling the execution of the watch's // actions. diff --git a/typedapi/watcher/ackwatch/response.go b/typedapi/watcher/ackwatch/response.go index 61cbdd8d6a..d353bf3e31 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package ackwatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package ackwatch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/ack_watch/WatcherAckWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 431755312e..32800b5c36 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Activates a currently inactive watch. package activatewatch diff --git a/typedapi/watcher/activatewatch/response.go b/typedapi/watcher/activatewatch/response.go index 8d7fd2bcb3..7011ad6d5f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package activatewatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package activatewatch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/activate_watch/WatcherActivateWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 7ceb5271a6..59730aa969 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Deactivates a currently active watch. package deactivatewatch diff --git a/typedapi/watcher/deactivatewatch/response.go b/typedapi/watcher/deactivatewatch/response.go index 6933fdae13..35d6c3dbe5 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deactivatewatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deactivatewatch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/deactivate_watch/DeactivateWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 1b013d3332..45b99b6f2b 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Removes a watch from Watcher. package deletewatch diff --git a/typedapi/watcher/deletewatch/response.go b/typedapi/watcher/deletewatch/response.go index 4fc55b5e38..89e70ef912 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package deletewatch // Response holds the response body struct for the package deletewatch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/delete_watch/DeleteWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 da05949df3..bf7ca24b8f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // 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. diff --git a/typedapi/watcher/executewatch/request.go b/typedapi/watcher/executewatch/request.go index 6ebf691457..fa91cefe99 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package executewatch @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package executewatch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/execute_watch/WatcherExecuteWatchRequest.ts#L28-L79 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/execute_watch/WatcherExecuteWatchRequest.ts#L28-L79 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 b45a408113..71017b24b3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package executewatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package executewatch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/execute_watch/WatcherExecuteWatchResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/execute_watch/WatcherExecuteWatchResponse.ts#L23-L25 type Response struct { Id_ string `json:"_id"` WatchRecord types.WatchRecord `json:"watch_record"` diff --git a/typedapi/watcher/getsettings/get_settings.go b/typedapi/watcher/getsettings/get_settings.go index 90f4b6328e..6f50ba0946 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieve settings for the watcher system index package getsettings diff --git a/typedapi/watcher/getwatch/get_watch.go b/typedapi/watcher/getwatch/get_watch.go index e7f3b2d10f..57463b35db 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieves a watch by its ID. package getwatch diff --git a/typedapi/watcher/getwatch/response.go b/typedapi/watcher/getwatch/response.go index 8462a9768c..6236e52b95 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package getwatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getwatch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/get_watch/GetWatchResponse.ts#L24-L34 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 8a358d15fa..8ec2c0ab68 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Creates a new watch, or updates an existing one. package putwatch diff --git a/typedapi/watcher/putwatch/request.go b/typedapi/watcher/putwatch/request.go index c31ad916e4..0051cda3cb 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putwatch @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putwatch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/put_watch/WatcherPutWatchRequest.ts#L30-L53 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/put_watch/WatcherPutWatchRequest.ts#L30-L53 type Request struct { Actions map[string]types.WatcherAction `json:"actions,omitempty"` Condition *types.WatcherCondition `json:"condition,omitempty"` diff --git a/typedapi/watcher/putwatch/response.go b/typedapi/watcher/putwatch/response.go index 31065b6ad0..8548fa084d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package putwatch // Response holds the response body struct for the package putwatch // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/put_watch/WatcherPutWatchResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 feb47a6c2e..b366d9cc7d 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieves stored watches. package querywatches diff --git a/typedapi/watcher/querywatches/request.go b/typedapi/watcher/querywatches/request.go index d431e75de1..251566d75f 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package querywatches @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package querywatches // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/query_watches/WatcherQueryWatchesRequest.ts#L25-L48 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/query_watches/WatcherQueryWatchesRequest.ts#L25-L48 type Request struct { // From The offset from the first result to fetch. Needs to be non-negative. diff --git a/typedapi/watcher/querywatches/response.go b/typedapi/watcher/querywatches/response.go index 4b6272a3f5..2d2933c117 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package querywatches @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package querywatches // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/query_watches/WatcherQueryWatchesResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/query_watches/WatcherQueryWatchesResponse.ts#L23-L28 type Response struct { Count int `json:"count"` Watches []types.QueryWatch `json:"watches"` diff --git a/typedapi/watcher/start/response.go b/typedapi/watcher/start/response.go index 78e12ce26d..5dc3f089b1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/start/WatcherStartResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/start/WatcherStartResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/watcher/start/start.go b/typedapi/watcher/start/start.go index 2f4a78c787..924b1105d8 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Starts Watcher if it is not already running. package start diff --git a/typedapi/watcher/stats/response.go b/typedapi/watcher/stats/response.go index 024197b280..91c086ad97 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/stats/WatcherStatsResponse.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 d488387176..a9455b07b7 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Retrieves the current Watcher metrics. package stats diff --git a/typedapi/watcher/stop/response.go b/typedapi/watcher/stop/response.go index d06738b4f4..3798c59df1 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/watcher/stop/WatcherStopResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/watcher/stop/WatcherStopResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/watcher/stop/stop.go b/typedapi/watcher/stop/stop.go index 9115d04e2e..0f7f494dad 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Stops Watcher if it is running. package stop diff --git a/typedapi/watcher/updatesettings/update_settings.go b/typedapi/watcher/updatesettings/update_settings.go index 0de08d30ef..6e4eaec5de 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Update settings for the watcher system index package updatesettings diff --git a/typedapi/xpack/info/info.go b/typedapi/xpack/info/info.go index bffbe6f7f5..2aa6cb96e9 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // Provides general information about the installed X-Pack features. package info @@ -34,6 +34,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/xpackcategory" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -277,7 +278,7 @@ func (r *Info) Header(key, value string) *Info { // Categories A comma-separated list of the information categories to include in the // response. For example, `build,license,features`. // API name: categories -func (r *Info) Categories(categories ...string) *Info { +func (r *Info) Categories(categories ...xpackcategory.XPackCategory) *Info { tmp := []string{} for _, item := range categories { tmp = append(tmp, fmt.Sprintf("%v", item)) diff --git a/typedapi/xpack/info/response.go b/typedapi/xpack/info/response.go index e7ea3240e0..9ed3981830 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/info/XPackInfoResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/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 93c7247e26..4ceaa4afa3 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 package usage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package usage // -// https://github.com/elastic/elasticsearch-specification/blob/8e91c0692c0235474a0c21bb7e9716a8430e8533/specification/xpack/usage/XPackUsageResponse.ts#L43-L79 +// https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/xpack/usage/XPackUsageResponse.ts#L43-L79 type Response struct { AggregateMetric types.Base `json:"aggregate_metric"` Analytics types.Analytics `json:"analytics"` diff --git a/typedapi/xpack/usage/usage.go b/typedapi/xpack/usage/usage.go index 953e2a1bf6..1ef93e59fa 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/8e91c0692c0235474a0c21bb7e9716a8430e8533 +// https://github.com/elastic/elasticsearch-specification/tree/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64 // This API provides information about which features are currently enabled and // available under the current license and some usage statistics.