diff --git a/go.mod b/go.mod index f2071c47..c3698d6a 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go/storage v1.15.0 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/aws/aws-sdk-go v1.38.28 // indirect - github.com/elastic/go-elasticsearch/v7 v7.12.0 + github.com/elastic/go-elasticsearch/v7 v7.16.0 github.com/fatih/color v1.10.0 // indirect github.com/go-resty/resty/v2 v2.6.0 github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect diff --git a/go.sum b/go.sum index 8d4ea51b..4017accd 100644 --- a/go.sum +++ b/go.sum @@ -92,8 +92,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/elastic/go-elasticsearch/v7 v7.12.0 h1:j4tvcMrZJLp39L2NYvBb7f+lHKPqPHSL3nvB8+/DV+s= -github.com/elastic/go-elasticsearch/v7 v7.12.0/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4= +github.com/elastic/go-elasticsearch/v7 v7.16.0 h1:GHsxDFXIAlhSleXun4kwA89P7kQFADRChqvgOPeYP5A= +github.com/elastic/go-elasticsearch/v7 v7.16.0/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/Makefile b/vendor/github.com/elastic/go-elasticsearch/v7/Makefile index a7207499..422c494d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/Makefile +++ b/vendor/github.com/elastic/go-elasticsearch/v7/Makefile @@ -1,5 +1,7 @@ SHELL := /bin/bash +ELASTICSEARCH_DEFAULT_BUILD_VERSION = "7.16.0-SNAPSHOT" + ##@ Test test-unit: ## Run unit tests @printf "\033[2m→ Running unit tests...\033[0m\n" @@ -99,7 +101,7 @@ test-examples: ## Execute the _examples printf "\033[2m────────────────────────────────────────────────────────────────────────────────\n"; \ printf "\033[1mUpdating dependencies for $$d\033[0m\n"; \ printf "\033[2m────────────────────────────────────────────────────────────────────────────────\033[0m\n"; \ - (cd $$d && go mod download) || \ + (cd $$d && go mod download && make setup) || \ ( \ printf "\033[31m────────────────────────────────────────────────────────────────────────────────\033[0m\n"; \ printf "\033[31;1m⨯ ERROR\033[0m\n"; \ @@ -149,8 +151,8 @@ lint: ## Run lint on the package @{ \ set -e ; \ trap "test -d ../../../.git && git checkout --quiet go.mod" INT TERM EXIT; \ - echo "cd internal/cmd/generate/ && go vet ./..."; \ - cd "internal/cmd/generate/" && go mod download && go vet ./...; \ + echo "cd internal/build/ && go vet ./..."; \ + cd "internal/build/" && go mod tidy && go mod download && go vet ./...; \ } @@ -185,7 +187,7 @@ ifeq ($(origin commits), undefined) @exit 2 endif ifndef branches - $(eval branches_list = '7.x' '6.x' '5.x') + $(eval branches_list = '7.16' '6.x' '5.x') else $(eval branches_list = $(shell echo $(branches) | tr ',' ' ') ) endif @@ -265,10 +267,16 @@ godoc: ## Display documentation for the package godoc --http=localhost:6060 --play cluster: ## Launch an Elasticsearch cluster with Docker - $(eval version ?= "elasticsearch:7.12.0-SNAPSHOT") + $(eval version ?= "elasticsearch:7.x-SNAPSHOT") $(eval flavor ?= "core") $(eval elasticsearch_url = "http://es1:9200") +ifdef ELASTICSEARCH_BUILD_VERSION + $(eval version ?= "elasticsearch:"${ELASTICSEARCH_BUILD_VERSION}) +else + $(eval version ?= "elasticsearch:"${ELASTICSEARCH_DEFAULT_BUILD_VERSION}) +endif + ifeq ($(origin nodes), undefined) $(eval nodes = 1) endif @@ -285,16 +293,14 @@ ifeq ($(flavor), platinum) $(eval xpack_env += --env "xpack.license.self_generated.type=trial") $(eval xpack_env += --env "xpack.security.enabled=true") $(eval xpack_env += --env "xpack.security.http.ssl.enabled=true") - $(eval xpack_env += --env "xpack.security.http.ssl.verification_mode=certificate") $(eval xpack_env += --env "xpack.security.http.ssl.key=certs/testnode.key") $(eval xpack_env += --env "xpack.security.http.ssl.certificate=certs/testnode.crt") $(eval xpack_env += --env "xpack.security.http.ssl.certificate_authorities=certs/ca.crt") - $(eval xpack_env += --env "xpack.security.http.ssl.verification_mode=none") $(eval xpack_env += --env "xpack.security.transport.ssl.enabled=true") + $(eval xpack_env += --env "xpack.security.transport.ssl.verification_mode=certificate") $(eval xpack_env += --env "xpack.security.transport.ssl.key=certs/testnode.key") $(eval xpack_env += --env "xpack.security.transport.ssl.certificate=certs/testnode.crt") $(eval xpack_env += --env "xpack.security.transport.ssl.certificate_authorities=certs/ca.crt") - $(eval xpack_env += --env "xpack.security.transport.ssl.verification_mode=none") $(eval xpack_volumes += --volume "$(PWD)/.ci/certs/testnode.crt:/usr/share/elasticsearch/config/certs/testnode.crt") $(eval xpack_volumes += --volume "$(PWD)/.ci/certs/testnode.key:/usr/share/elasticsearch/config/certs/testnode.key") $(eval xpack_volumes += --volume "$(PWD)/.ci/certs/ca.crt:/usr/share/elasticsearch/config/certs/ca.crt") @@ -345,7 +351,11 @@ ifdef detach endif cluster-update: ## Update the Docker image - $(eval version ?= "elasticsearch:7.12.0-SNAPSHOT") +ifdef ELASTICSEARCH_BUILD_VERSION + $(eval version ?= "elasticsearch:"${ELASTICSEARCH_BUILD_VERSION}) +else + $(eval version ?= "elasticsearch:"${ELASTICSEARCH_DEFAULT_BUILD_VERSION}) +endif @printf "\033[2m→ Updating the Docker image...\033[0m\n" @docker pull docker.elastic.co/elasticsearch/$(version); @@ -360,7 +370,7 @@ docker: ## Build the Docker image and run it ##@ Generator gen-api: ## Generate the API package from the JSON specification - $(eval input ?= tmp/elasticsearch) + $(eval input ?= tmp/rest-api-spec) $(eval output ?= esapi) ifdef debug $(eval args += --debug) @@ -368,27 +378,26 @@ endif ifdef ELASTICSEARCH_BUILD_VERSION $(eval version = $(ELASTICSEARCH_BUILD_VERSION)) else - $(eval version = $(shell cat "$(input)/buildSrc/version.properties" | grep 'elasticsearch' | cut -d '=' -f 2 | tr -d ' ')) + $(eval version = $(ELASTICSEARCH_DEFAULT_BUILD_VERSION)) endif ifdef ELASTICSEARCH_BUILD_HASH $(eval build_hash = $(ELASTICSEARCH_BUILD_HASH)) else - $(eval build_hash = $(shell git --git-dir='$(input)/.git' rev-parse --short HEAD)) + $(eval build_hash = $(shell cat tmp/elasticsearch.json | jq ".projects.elasticsearch.commit_hash")) endif @printf "\033[2m→ Generating API package from specification ($(version):$(build_hash))...\033[0m\n" @{ \ set -e; \ - trap "test -d .git && git checkout --quiet $(PWD)/internal/cmd/generate/go.mod" INT TERM EXIT; \ + trap "test -d .git && git checkout --quiet $(PWD)/internal/build/go.mod" INT TERM EXIT; \ export ELASTICSEARCH_BUILD_VERSION=$(version) && \ export ELASTICSEARCH_BUILD_HASH=$(build_hash) && \ - cd internal/cmd/generate && \ - go run main.go apisource --input '$(PWD)/$(input)/rest-api-spec/src/main/resources/rest-api-spec/api/*.json' --output '$(PWD)/$(output)' $(args) && \ - go run main.go apisource --input '$(PWD)/$(input)/x-pack/plugin/src/test/resources/rest-api-spec/api/*.json' --output '$(PWD)/$(output)' $(args) && \ + cd internal/build && \ + go run main.go apisource --input '$(PWD)/$(input)/api/*.json' --output '$(PWD)/$(output)' $(args) && \ go run main.go apistruct --output '$(PWD)/$(output)'; \ } gen-tests: ## Generate the API tests from the YAML specification - $(eval input ?= tmp/elasticsearch) + $(eval input ?= tmp/rest-api-spec) $(eval output ?= esapi/test) ifdef debug $(eval args += --debug) @@ -396,12 +405,12 @@ endif ifdef ELASTICSEARCH_BUILD_VERSION $(eval version = $(ELASTICSEARCH_BUILD_VERSION)) else - $(eval version = $(shell cat "$(input)/buildSrc/version.properties" | grep 'elasticsearch' | cut -d '=' -f 2 | tr -d ' ')) + $(eval version = $(ELASTICSEARCH_DEFAULT_BUILD_VERSION)) endif ifdef ELASTICSEARCH_BUILD_HASH $(eval build_hash = $(ELASTICSEARCH_BUILD_HASH)) else - $(eval build_hash = $(shell git --git-dir='$(input)/.git' rev-parse --short HEAD)) + $(eval build_hash = $(shell cat tmp/elasticsearch.json | jq ".projects.elasticsearch.commit_hash")) endif @printf "\033[2m→ Generating API tests from specification ($(version):$(build_hash))...\033[0m\n" @{ \ @@ -411,12 +420,11 @@ endif export ELASTICSEARCH_BUILD_HASH=$(build_hash) && \ rm -rf $(output)/*_test.go && \ rm -rf $(output)/xpack && \ - cd internal/cmd/generate && \ + cd internal/build && \ go get golang.org/x/tools/cmd/goimports && \ go generate ./... && \ - go run main.go apitests --input '$(PWD)/$(input)/rest-api-spec/src/main/resources/rest-api-spec/test/**/*.y*ml' --output '$(PWD)/$(output)' $(args) && \ - go run main.go apitests --input '$(PWD)/$(input)/x-pack/plugin/src/test/resources/rest-api-spec/test/**/*.yml' --output '$(PWD)/$(output)/xpack' $(args) && \ - go run main.go apitests --input '$(PWD)/$(input)/x-pack/plugin/src/test/resources/rest-api-spec/test/**/**/*.yml' --output '$(PWD)/$(output)/xpack' $(args) && \ + go run main.go apitests --input '$(PWD)/$(input)/test/free/**/*.y*ml' --output '$(PWD)/$(output)' $(args) && \ + go run main.go apitests --input '$(PWD)/$(input)/test/platinum/**/*.yml' --output '$(PWD)/$(output)/xpack' $(args) && \ mkdir -p '$(PWD)/esapi/test/xpack/ml' && \ mkdir -p '$(PWD)/esapi/test/xpack/ml-crud' && \ mv $(PWD)/esapi/test/xpack/xpack_ml* $(PWD)/esapi/test/xpack/ml/ && \ @@ -445,11 +453,23 @@ gen-docs: ## Generate the skeleton of documentation examples fi; \ ) && \ printf "\n\033[2m→ Generating ASCIIDoc files from Go source\033[0m\n" && \ - ( cd '$(PWD)/internal/cmd/generate' && \ + ( cd '$(PWD)/internal/build' && \ go run main.go examples doc --debug --input='$(PWD)/.doc/examples/src/' --output='$(PWD)/.doc/examples/' \ ) \ } +download-specs: ## Download the latest specs for the specified Elasticsearch version + $(eval output ?= tmp) + @mkdir -p tmp + @{ \ + set -e; \ + printf "\n\033[2m→ Downloading latest Elasticsearch specs for version [$(ELASTICSEARCH_DEFAULT_BUILD_VERSION)]\033[0m\n" && \ + rm -rf $(output)/rest-api-spec && \ + rm -rf $(output)/elasticsearch.json && \ + cd internal/build && \ + go run main.go download-spec --output '$(PWD)/$(output)'; \ + } + ##@ Other #------------------------------------------------------------------------------ help: ## Display help diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/README.md b/vendor/github.com/elastic/go-elasticsearch/v7/README.md index 7087eec0..02b8fee6 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/README.md +++ b/vendor/github.com/elastic/go-elasticsearch/v7/README.md @@ -4,26 +4,27 @@ The official Go client for [Elasticsearch](https://www.elastic.co/products/elast [![GoDoc](https://godoc.org/github.com/elastic/go-elasticsearch?status.svg)](https://pkg.go.dev/github.com/elastic/go-elasticsearch/v7) [![Go Report Card](https://goreportcard.com/badge/github.com/elastic/go-elasticsearch)](https://goreportcard.com/report/github.com/elastic/go-elasticsearch) -[![codecov.io](https://codecov.io/github/elastic/go-elasticsearch/coverage.svg?branch=master)](https://codecov.io/gh/elastic/go-elasticsearch?branch=master) -[![Build](https://github.com/elastic/go-elasticsearch/workflows/Build/badge.svg)](https://github.com/elastic/go-elasticsearch/actions?query=branch%3A7.x) -[![Unit](https://github.com/elastic/go-elasticsearch/workflows/Unit/badge.svg)](https://github.com/elastic/go-elasticsearch/actions?query=branch%3A7.x) -[![Integration](https://github.com/elastic/go-elasticsearch/workflows/Integration/badge.svg)](https://github.com/elastic/go-elasticsearch/actions?query=branch%3A7.x) -[![API](https://github.com/elastic/go-elasticsearch/workflows/API/badge.svg)](https://github.com/elastic/go-elasticsearch/actions?query=branch%3A7.x) +[![codecov.io](https://codecov.io/github/elastic/go-elasticsearch/coverage.svg?branch=main)](https://codecov.io/gh/elastic/go-elasticsearch?branch=main) +[![Build](https://github.com/elastic/go-elasticsearch/workflows/Build/badge.svg)](https://github.com/elastic/go-elasticsearch/actions?query=branch%3Amain) +[![Unit](https://github.com/elastic/go-elasticsearch/workflows/Unit/badge.svg)](https://github.com/elastic/go-elasticsearch/actions?query=branch%3Amain) +[![Integration](https://github.com/elastic/go-elasticsearch/workflows/Integration/badge.svg)](https://github.com/elastic/go-elasticsearch/actions?query=branch%3Amain) +[![API](https://github.com/elastic/go-elasticsearch/workflows/API/badge.svg)](https://github.com/elastic/go-elasticsearch/actions?query=branch%3Amain) ## Compatibility -The client major versions correspond to the compatible Elasticsearch major versions: to connect to Elasticsearch `7.x`, use a [`7.x`](https://github.com/elastic/go-elasticsearch/tree/7.x) version of the client, to connect to Elasticsearch `6.x`, use a [`6.x`](https://github.com/elastic/go-elasticsearch/tree/6.x) version of the client. +Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch. +Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made. When using Go modules, include the version in the import path, and specify either an explicit version or a branch: - require github.com/elastic/go-elasticsearch/v7 7.x + require github.com/elastic/go-elasticsearch/v7 7.16 require github.com/elastic/go-elasticsearch/v7 7.0.0 It's possible to use multiple versions of the client in a single project: // go.mod github.com/elastic/go-elasticsearch/v6 6.x - github.com/elastic/go-elasticsearch/v7 7.x + github.com/elastic/go-elasticsearch/v7 7.16 // main.go import ( @@ -34,7 +35,7 @@ It's possible to use multiple versions of the client in a single project: es6, _ := elasticsearch6.NewDefaultClient() es7, _ := elasticsearch7.NewDefaultClient() -The `master` branch of the client is compatible with the current `master` branch of Elasticsearch. +The `main` branch of the client is compatible with the current `master` branch of Elasticsearch. @@ -42,11 +43,11 @@ The `master` branch of the client is compatible with the current `master` branch Add the package to your `go.mod` file: - require github.com/elastic/go-elasticsearch/v7 7.x + require github.com/elastic/go-elasticsearch/v8 main Or, clone the repository: - git clone --branch 7.x https://github.com/elastic/go-elasticsearch.git $GOPATH/src/github.com/elastic/go-elasticsearch + git clone --branch main https://github.com/elastic/go-elasticsearch.git $GOPATH/src/github.com/elastic/go-elasticsearch A complete example: @@ -56,7 +57,7 @@ mkdir my-elasticsearch-app && cd my-elasticsearch-app cat > go.mod <<-END module my-elasticsearch-app - require github.com/elastic/go-elasticsearch/v7 7.x + require github.com/elastic/go-elasticsearch/v8 main END cat > main.go <<-END diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/doc.go b/vendor/github.com/elastic/go-elasticsearch/v7/doc.go index a6022553..2591cbad 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/doc.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/doc.go @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + /* Package elasticsearch provides a Go client for Elasticsearch. diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/elasticsearch.go b/vendor/github.com/elastic/go-elasticsearch/v7/elasticsearch.go index 66551783..db204011 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/elasticsearch.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/elasticsearch.go @@ -1,17 +1,37 @@ -// Licensed to Elasticsearch B.V. under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package elasticsearch import ( + "context" "encoding/base64" + "encoding/json" "errors" "fmt" + "io" + "io/ioutil" "net/http" "net/url" "os" + "regexp" + "strconv" "strings" + "sync" "time" "github.com/elastic/go-elasticsearch/v7/esapi" @@ -19,8 +39,20 @@ import ( "github.com/elastic/go-elasticsearch/v7/internal/version" ) +var ( + reVersion *regexp.Regexp +) + +func init() { + versionPattern := `^([0-9]+)\.([0-9]+)\.([0-9]+)` + reVersion = regexp.MustCompile(versionPattern) +} + const ( - defaultURL = "http://localhost:9200" + defaultURL = "http://localhost:9200" + tagline = "You Know, for Search" + unknownProduct = "the client noticed that the server is not Elasticsearch and we do not support this unknown product" + unsupportedProduct = "the client noticed that the server is not a supported distribution of Elasticsearch" ) // Version returns the package version as a string. @@ -34,8 +66,10 @@ type Config struct { Username string // Username for HTTP Basic Authentication. Password string // Password for HTTP Basic Authentication. - CloudID string // Endpoint for the Elastic Service (https://elastic.co/cloud). - APIKey string // Base64-encoded token for authorization; if set, overrides username and password. + CloudID string // Endpoint for the Elastic Service (https://elastic.co/cloud). + APIKey string // Base64-encoded token for authorization; if set, overrides username/password and service token. + ServiceToken string // Service token for authorization; if set, overrides username/password. + CertificateFingerprint string // SHA256 hex fingerprint given by Elasticsearch on first launch. Header http.Header // Global HTTP request header. @@ -49,13 +83,17 @@ type Config struct { EnableRetryOnTimeout bool // Default: false. MaxRetries int // Default: 3. - DiscoverNodesOnStart bool // Discover nodes when initializing the client. Default: false. + CompressRequestBody bool // Default: false. + DiscoverNodesOnStart bool // Discover nodes when initializing the client. Default: false. + DiscoverNodesInterval time.Duration // Discover nodes periodically. Default: disabled. - EnableMetrics bool // Enable the metrics collection. - EnableDebugLogger bool // Enable the debug logging. + EnableMetrics bool // Enable the metrics collection. + EnableDebugLogger bool // Enable the debug logging. + EnableCompatibilityMode bool // Enable sends compatibility header - DisableMetaHeader bool // Disable the additional "X-Elastic-Client-Meta" HTTP header. + DisableMetaHeader bool // Disable the additional "X-Elastic-Client-Meta" HTTP header. + UseResponseCheckOnly bool RetryBackoff func(attempt int) time.Duration // Optional backoff duration. Default: nil. @@ -70,8 +108,22 @@ type Config struct { // Client represents the Elasticsearch client. // type Client struct { - *esapi.API // Embeds the API methods - Transport estransport.Interface + *esapi.API // Embeds the API methods + Transport estransport.Interface + useResponseCheckOnly bool + + productCheckMu sync.RWMutex + productCheckSuccess bool +} + +type esVersion struct { + Number string `json:"number"` + BuildFlavor string `json:"build_flavor"` +} + +type info struct { + Version esVersion `json:"version"` + Tagline string `json:"tagline"` } // NewDefaultClient creates a new client with default options. @@ -138,10 +190,12 @@ func NewClient(cfg Config) (*Client, error) { } tp, err := estransport.New(estransport.Config{ - URLs: urls, - Username: cfg.Username, - Password: cfg.Password, - APIKey: cfg.APIKey, + URLs: urls, + Username: cfg.Username, + Password: cfg.Password, + APIKey: cfg.APIKey, + ServiceToken: cfg.ServiceToken, + CertificateFingerprint: cfg.CertificateFingerprint, Header: cfg.Header, CACert: cfg.CACert, @@ -152,6 +206,9 @@ func NewClient(cfg Config) (*Client, error) { MaxRetries: cfg.MaxRetries, RetryBackoff: cfg.RetryBackoff, + CompressRequestBody: cfg.CompressRequestBody, + CompatibilityHeader: cfg.EnableCompatibilityMode, + EnableMetrics: cfg.EnableMetrics, EnableDebugLogger: cfg.EnableDebugLogger, @@ -168,19 +225,171 @@ func NewClient(cfg Config) (*Client, error) { return nil, fmt.Errorf("error creating transport: %s", err) } - client := &Client{Transport: tp, API: esapi.New(tp)} + client := &Client{Transport: tp, useResponseCheckOnly: cfg.UseResponseCheckOnly} + client.API = esapi.New(client) if cfg.DiscoverNodesOnStart { go client.DiscoverNodes() } - return client, nil + return client, err +} + +// genuineCheckHeader validates the presence of the X-Elastic-Product header +// +func genuineCheckHeader(header http.Header) error { + if header.Get("X-Elastic-Product") != "Elasticsearch" { + return errors.New(unknownProduct) + } + return nil +} + +// genuineCheckInfo validates the informations given by Elasticsearch +// +func genuineCheckInfo(info info) error { + major, minor, _, err := ParseElasticsearchVersion(info.Version.Number) + if err != nil { + return err + } + + if major < 6 { + return errors.New(unknownProduct) + } + if major < 7 { + if info.Tagline != tagline { + return errors.New(unknownProduct) + } + } + if major >= 7 { + if minor < 14 { + if info.Tagline != tagline { + return errors.New(unknownProduct) + } else if info.Version.BuildFlavor != "default" { + return errors.New(unsupportedProduct) + } + } + } + + return nil +} + +// ParseElasticsearchVersion returns an int64 representation of Elasticsearch version. +// +func ParseElasticsearchVersion(version string) (int64, int64, int64, error) { + matches := reVersion.FindStringSubmatch(version) + + if len(matches) < 4 { + return 0, 0, 0, fmt.Errorf("") + } + major, _ := strconv.ParseInt(matches[1], 10, 0) + minor, _ := strconv.ParseInt(matches[2], 10, 0) + patch, _ := strconv.ParseInt(matches[3], 10, 0) + + return major, minor, patch, nil } // Perform delegates to Transport to execute a request and return a response. // func (c *Client) Perform(req *http.Request) (*http.Response, error) { - return c.Transport.Perform(req) + // ProductCheck validation. We skip this validation of we only want the + // header validation. ResponseCheck path continues after original request. + if !c.useResponseCheckOnly { + // Launch product check for 7.x, request info, check header then payload. + if err := c.doProductCheck(req.Context(), c.productCheck); err != nil { + return nil, err + } + } + + // Retrieve the original request. + res, err := c.Transport.Perform(req) + + // ResponseCheck path continues, we run the header check on the first answer from ES. + if err == nil && (res.StatusCode >= 200 && res.StatusCode < 300){ + checkHeader := func(context.Context) error { + return genuineCheckHeader(res.Header) + } + if err := c.doProductCheck(req.Context(), checkHeader); err != nil { + res.Body.Close() + return nil, err + } + } + return res, err +} + +// doProductCheck calls f if there as not been a prior successful call to doProductCheck, +// returning nil otherwise. +func (c *Client) doProductCheck(ctx context.Context, f func(context.Context) error) error { + c.productCheckMu.RLock() + productCheckSuccess := c.productCheckSuccess + c.productCheckMu.RUnlock() + + if productCheckSuccess { + return nil + } + + c.productCheckMu.Lock() + defer c.productCheckMu.Unlock() + + if c.productCheckSuccess { + return nil + } + + if err := f(ctx); err != nil { + return err + } + + c.productCheckSuccess = true + + return nil +} + +// productCheck runs an esapi.Info query to retrieve informations of the current cluster +// decodes the response and decides if the cluster is a genuine Elasticsearch product. +func (c *Client) productCheck(ctx context.Context) error { + req := esapi.InfoRequest{} + res, err := req.Do(ctx, c.Transport) + if err != nil { + return err + } + defer res.Body.Close() + + if res.IsError() { + _, err = io.Copy(ioutil.Discard, res.Body) + if err != nil { + return err + } + switch res.StatusCode { + case http.StatusUnauthorized: + return nil + case http.StatusForbidden: + return nil + default: + return fmt.Errorf("cannot retrieve informations from Elasticsearch") + } + } + + err = genuineCheckHeader(res.Header) + + if err != nil { + var info info + contentType := res.Header.Get("Content-Type") + if strings.Contains(contentType, "json") { + err = json.NewDecoder(res.Body).Decode(&info) + if err != nil { + return fmt.Errorf("error decoding Elasticsearch informations: %s", err) + } + } + + if info.Version.Number != "" { + err = genuineCheckInfo(info) + } + } + + if err != nil { + return err + } + + return nil } // Metrics returns the client metrics. diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api._.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api._.go index 31083733..576588e5 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api._.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api._.go @@ -1,4 +1,21 @@ -// Code generated from specification version 7.12.0 (79d4dca1632): DO NOT EDIT +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0 (4a1e55d): DO NOT EDIT package esapi @@ -65,7 +82,11 @@ type API struct { ExistsSource ExistsSource Explain Explain FeaturesGetFeatures FeaturesGetFeatures + FeaturesResetFeatures FeaturesResetFeatures FieldCaps FieldCaps + FleetGlobalCheckpoints FleetGlobalCheckpoints + FleetMsearch FleetMsearch + FleetSearch FleetSearch Get Get GetScriptContext GetScriptContext GetScriptLanguages GetScriptLanguages @@ -90,13 +111,18 @@ type API struct { RenderSearchTemplate RenderSearchTemplate ScriptsPainlessExecute ScriptsPainlessExecute Scroll Scroll + SearchMvt SearchMvt Search Search SearchShards SearchShards SearchTemplate SearchTemplate + SearchableSnapshotsCacheStats SearchableSnapshotsCacheStats SearchableSnapshotsClearCache SearchableSnapshotsClearCache SearchableSnapshotsMount SearchableSnapshotsMount SearchableSnapshotsRepositoryStats SearchableSnapshotsRepositoryStats SearchableSnapshotsStats SearchableSnapshotsStats + ShutdownDeleteNode ShutdownDeleteNode + ShutdownGetNode ShutdownGetNode + ShutdownPutNode ShutdownPutNode SlmDeleteLifecycle SlmDeleteLifecycle SlmExecuteLifecycle SlmExecuteLifecycle SlmExecuteRetention SlmExecuteRetention @@ -106,6 +132,7 @@ type API struct { SlmPutLifecycle SlmPutLifecycle SlmStart SlmStart SlmStop SlmStop + TermsEnum TermsEnum Termvectors Termvectors TextStructureFindStructure TextStructureFindStructure TransformDeleteTransform TransformDeleteTransform @@ -116,6 +143,7 @@ type API struct { TransformStartTransform TransformStartTransform TransformStopTransform TransformStopTransform TransformUpdateTransform TransformUpdateTransform + TransformUpgradeTransforms TransformUpgradeTransforms UpdateByQuery UpdateByQuery UpdateByQueryRethrottle UpdateByQueryRethrottle Update Update @@ -184,11 +212,13 @@ type Indices struct { DeleteIndexTemplate IndicesDeleteIndexTemplate Delete IndicesDelete DeleteTemplate IndicesDeleteTemplate + DiskUsage IndicesDiskUsage ExistsAlias IndicesExistsAlias ExistsDocumentType IndicesExistsDocumentType ExistsIndexTemplate IndicesExistsIndexTemplate Exists IndicesExists ExistsTemplate IndicesExistsTemplate + FieldUsageStats IndicesFieldUsageStats Flush IndicesFlush FlushSynced IndicesFlushSynced Forcemerge IndicesForcemerge @@ -203,6 +233,7 @@ type Indices struct { GetTemplate IndicesGetTemplate GetUpgrade IndicesGetUpgrade MigrateToDataStream IndicesMigrateToDataStream + ModifyDataStream IndicesModifyDataStream Open IndicesOpen PromoteDataStream IndicesPromoteDataStream PutAlias IndicesPutAlias @@ -231,6 +262,7 @@ type Indices struct { // Ingest contains the Ingest APIs type Ingest struct { DeletePipeline IngestDeletePipeline + GeoIPStats IngestGeoIPStats GetPipeline IngestGetPipeline ProcessorGrok IngestProcessorGrok PutPipeline IngestPutPipeline @@ -239,11 +271,15 @@ type Ingest struct { // Nodes contains the Nodes APIs type Nodes struct { - HotThreads NodesHotThreads - Info NodesInfo - ReloadSecureSettings NodesReloadSecureSettings - Stats NodesStats - Usage NodesUsage + ClearMeteringArchive NodesClearMeteringArchive + ClearRepositoriesMeteringArchive NodesClearRepositoriesMeteringArchive + GetMeteringInfo NodesGetMeteringInfo + GetRepositoriesMeteringInfo NodesGetRepositoriesMeteringInfo + HotThreads NodesHotThreads + Info NodesInfo + ReloadSecureSettings NodesReloadSecureSettings + Stats NodesStats + Usage NodesUsage } // Remote contains the Remote APIs @@ -258,9 +294,9 @@ type Snapshot struct { Create SnapshotCreate DeleteRepository SnapshotDeleteRepository Delete SnapshotDelete - GetFeatures SnapshotGetFeatures GetRepository SnapshotGetRepository Get SnapshotGet + RepositoryAnalyze SnapshotRepositoryAnalyze Restore SnapshotRestore Status SnapshotStatus VerifyRepository SnapshotVerifyRepository @@ -300,16 +336,17 @@ type CCR struct { // ILM contains the ILM APIs type ILM struct { - DeleteLifecycle ILMDeleteLifecycle - ExplainLifecycle ILMExplainLifecycle - GetLifecycle ILMGetLifecycle - GetStatus ILMGetStatus - MoveToStep ILMMoveToStep - PutLifecycle ILMPutLifecycle - RemovePolicy ILMRemovePolicy - Retry ILMRetry - Start ILMStart - Stop ILMStop + DeleteLifecycle ILMDeleteLifecycle + ExplainLifecycle ILMExplainLifecycle + GetLifecycle ILMGetLifecycle + GetStatus ILMGetStatus + MigrateToDataTiers ILMMigrateToDataTiers + MoveToStep ILMMoveToStep + PutLifecycle ILMPutLifecycle + RemovePolicy ILMRemovePolicy + Retry ILMRetry + Start ILMStart + Stop ILMStop } // License contains the License APIs @@ -325,7 +362,9 @@ type License struct { // Migration contains the Migration APIs type Migration struct { - Deprecations MigrationDeprecations + Deprecations MigrationDeprecations + GetFeatureUpgradeStatus MigrationGetFeatureUpgradeStatus + PostFeatureUpgrade MigrationPostFeatureUpgrade } // ML contains the ML APIs @@ -341,6 +380,7 @@ type ML struct { DeleteForecast MLDeleteForecast DeleteJob MLDeleteJob DeleteModelSnapshot MLDeleteModelSnapshot + DeleteTrainedModelAlias MLDeleteTrainedModelAlias DeleteTrainedModel MLDeleteTrainedModel EstimateModelMemory MLEstimateModelMemory EvaluateDataFrame MLEvaluateDataFrame @@ -369,6 +409,7 @@ type ML struct { OpenJob MLOpenJob PostCalendarEvents MLPostCalendarEvents PostData MLPostData + PreviewDataFrameAnalytics MLPreviewDataFrameAnalytics PreviewDatafeed MLPreviewDatafeed PutCalendarJob MLPutCalendarJob PutCalendar MLPutCalendar @@ -376,7 +417,9 @@ type ML struct { PutDatafeed MLPutDatafeed PutFilter MLPutFilter PutJob MLPutJob + PutTrainedModelAlias MLPutTrainedModelAlias PutTrainedModel MLPutTrainedModel + ResetJob MLResetJob RevertModelSnapshot MLRevertModelSnapshot SetUpgradeMode MLSetUpgradeMode StartDataFrameAnalytics MLStartDataFrameAnalytics @@ -413,42 +456,57 @@ type Rollup struct { // Security contains the Security APIs type Security struct { - Authenticate SecurityAuthenticate - ChangePassword SecurityChangePassword - ClearAPIKeyCache SecurityClearAPIKeyCache - ClearCachedPrivileges SecurityClearCachedPrivileges - ClearCachedRealms SecurityClearCachedRealms - ClearCachedRoles SecurityClearCachedRoles - CreateAPIKey SecurityCreateAPIKey - DeletePrivileges SecurityDeletePrivileges - DeleteRoleMapping SecurityDeleteRoleMapping - DeleteRole SecurityDeleteRole - DeleteUser SecurityDeleteUser - DisableUser SecurityDisableUser - EnableUser SecurityEnableUser - GetAPIKey SecurityGetAPIKey - GetBuiltinPrivileges SecurityGetBuiltinPrivileges - GetPrivileges SecurityGetPrivileges - GetRoleMapping SecurityGetRoleMapping - GetRole SecurityGetRole - GetToken SecurityGetToken - GetUserPrivileges SecurityGetUserPrivileges - GetUser SecurityGetUser - GrantAPIKey SecurityGrantAPIKey - HasPrivileges SecurityHasPrivileges - InvalidateAPIKey SecurityInvalidateAPIKey - InvalidateToken SecurityInvalidateToken - PutPrivileges SecurityPutPrivileges - PutRoleMapping SecurityPutRoleMapping - PutRole SecurityPutRole - PutUser SecurityPutUser + Authenticate SecurityAuthenticate + ChangePassword SecurityChangePassword + ClearAPIKeyCache SecurityClearAPIKeyCache + ClearCachedPrivileges SecurityClearCachedPrivileges + ClearCachedRealms SecurityClearCachedRealms + ClearCachedRoles SecurityClearCachedRoles + ClearCachedServiceTokens SecurityClearCachedServiceTokens + CreateAPIKey SecurityCreateAPIKey + CreateServiceToken SecurityCreateServiceToken + DeletePrivileges SecurityDeletePrivileges + DeleteRoleMapping SecurityDeleteRoleMapping + DeleteRole SecurityDeleteRole + DeleteServiceToken SecurityDeleteServiceToken + DeleteUser SecurityDeleteUser + DisableUser SecurityDisableUser + EnableUser SecurityEnableUser + GetAPIKey SecurityGetAPIKey + GetBuiltinPrivileges SecurityGetBuiltinPrivileges + GetPrivileges SecurityGetPrivileges + GetRoleMapping SecurityGetRoleMapping + GetRole SecurityGetRole + GetServiceAccounts SecurityGetServiceAccounts + GetServiceCredentials SecurityGetServiceCredentials + GetToken SecurityGetToken + GetUserPrivileges SecurityGetUserPrivileges + GetUser SecurityGetUser + GrantAPIKey SecurityGrantAPIKey + HasPrivileges SecurityHasPrivileges + InvalidateAPIKey SecurityInvalidateAPIKey + InvalidateToken SecurityInvalidateToken + PutPrivileges SecurityPutPrivileges + PutRoleMapping SecurityPutRoleMapping + PutRole SecurityPutRole + PutUser SecurityPutUser + QueryAPIKeys SecurityQueryAPIKeys + SamlAuthenticate SecuritySamlAuthenticate + SamlCompleteLogout SecuritySamlCompleteLogout + SamlInvalidate SecuritySamlInvalidate + SamlLogout SecuritySamlLogout + SamlPrepareAuthentication SecuritySamlPrepareAuthentication + SamlServiceProviderMetadata SecuritySamlServiceProviderMetadata } // SQL contains the SQL APIs type SQL struct { - ClearCursor SQLClearCursor - Query SQLQuery - Translate SQLTranslate + ClearCursor SQLClearCursor + DeleteAsync SQLDeleteAsync + GetAsync SQLGetAsync + GetAsyncStatus SQLGetAsyncStatus + Query SQLQuery + Translate SQLTranslate } // SSL contains the SSL APIs @@ -519,7 +577,11 @@ func New(t Transport) *API { ExistsSource: newExistsSourceFunc(t), Explain: newExplainFunc(t), FeaturesGetFeatures: newFeaturesGetFeaturesFunc(t), + FeaturesResetFeatures: newFeaturesResetFeaturesFunc(t), FieldCaps: newFieldCapsFunc(t), + FleetGlobalCheckpoints: newFleetGlobalCheckpointsFunc(t), + FleetMsearch: newFleetMsearchFunc(t), + FleetSearch: newFleetSearchFunc(t), Get: newGetFunc(t), GetScriptContext: newGetScriptContextFunc(t), GetScriptLanguages: newGetScriptLanguagesFunc(t), @@ -544,13 +606,18 @@ func New(t Transport) *API { RenderSearchTemplate: newRenderSearchTemplateFunc(t), ScriptsPainlessExecute: newScriptsPainlessExecuteFunc(t), Scroll: newScrollFunc(t), + SearchMvt: newSearchMvtFunc(t), Search: newSearchFunc(t), SearchShards: newSearchShardsFunc(t), SearchTemplate: newSearchTemplateFunc(t), + SearchableSnapshotsCacheStats: newSearchableSnapshotsCacheStatsFunc(t), SearchableSnapshotsClearCache: newSearchableSnapshotsClearCacheFunc(t), SearchableSnapshotsMount: newSearchableSnapshotsMountFunc(t), SearchableSnapshotsRepositoryStats: newSearchableSnapshotsRepositoryStatsFunc(t), SearchableSnapshotsStats: newSearchableSnapshotsStatsFunc(t), + ShutdownDeleteNode: newShutdownDeleteNodeFunc(t), + ShutdownGetNode: newShutdownGetNodeFunc(t), + ShutdownPutNode: newShutdownPutNodeFunc(t), SlmDeleteLifecycle: newSlmDeleteLifecycleFunc(t), SlmExecuteLifecycle: newSlmExecuteLifecycleFunc(t), SlmExecuteRetention: newSlmExecuteRetentionFunc(t), @@ -560,6 +627,7 @@ func New(t Transport) *API { SlmPutLifecycle: newSlmPutLifecycleFunc(t), SlmStart: newSlmStartFunc(t), SlmStop: newSlmStopFunc(t), + TermsEnum: newTermsEnumFunc(t), Termvectors: newTermvectorsFunc(t), TextStructureFindStructure: newTextStructureFindStructureFunc(t), TransformDeleteTransform: newTransformDeleteTransformFunc(t), @@ -570,6 +638,7 @@ func New(t Transport) *API { TransformStartTransform: newTransformStartTransformFunc(t), TransformStopTransform: newTransformStopTransformFunc(t), TransformUpdateTransform: newTransformUpdateTransformFunc(t), + TransformUpgradeTransforms: newTransformUpgradeTransformsFunc(t), UpdateByQuery: newUpdateByQueryFunc(t), UpdateByQueryRethrottle: newUpdateByQueryRethrottleFunc(t), Update: newUpdateFunc(t), @@ -631,11 +700,13 @@ func New(t Transport) *API { DeleteIndexTemplate: newIndicesDeleteIndexTemplateFunc(t), Delete: newIndicesDeleteFunc(t), DeleteTemplate: newIndicesDeleteTemplateFunc(t), + DiskUsage: newIndicesDiskUsageFunc(t), ExistsAlias: newIndicesExistsAliasFunc(t), ExistsDocumentType: newIndicesExistsDocumentTypeFunc(t), ExistsIndexTemplate: newIndicesExistsIndexTemplateFunc(t), Exists: newIndicesExistsFunc(t), ExistsTemplate: newIndicesExistsTemplateFunc(t), + FieldUsageStats: newIndicesFieldUsageStatsFunc(t), Flush: newIndicesFlushFunc(t), FlushSynced: newIndicesFlushSyncedFunc(t), Forcemerge: newIndicesForcemergeFunc(t), @@ -650,6 +721,7 @@ func New(t Transport) *API { GetTemplate: newIndicesGetTemplateFunc(t), GetUpgrade: newIndicesGetUpgradeFunc(t), MigrateToDataStream: newIndicesMigrateToDataStreamFunc(t), + ModifyDataStream: newIndicesModifyDataStreamFunc(t), Open: newIndicesOpenFunc(t), PromoteDataStream: newIndicesPromoteDataStreamFunc(t), PutAlias: newIndicesPutAliasFunc(t), @@ -676,17 +748,22 @@ func New(t Transport) *API { }, Ingest: &Ingest{ DeletePipeline: newIngestDeletePipelineFunc(t), + GeoIPStats: newIngestGeoIPStatsFunc(t), GetPipeline: newIngestGetPipelineFunc(t), ProcessorGrok: newIngestProcessorGrokFunc(t), PutPipeline: newIngestPutPipelineFunc(t), Simulate: newIngestSimulateFunc(t), }, Nodes: &Nodes{ - HotThreads: newNodesHotThreadsFunc(t), - Info: newNodesInfoFunc(t), - ReloadSecureSettings: newNodesReloadSecureSettingsFunc(t), - Stats: newNodesStatsFunc(t), - Usage: newNodesUsageFunc(t), + ClearMeteringArchive: newNodesClearMeteringArchiveFunc(t), + ClearRepositoriesMeteringArchive: newNodesClearRepositoriesMeteringArchiveFunc(t), + GetMeteringInfo: newNodesGetMeteringInfoFunc(t), + GetRepositoriesMeteringInfo: newNodesGetRepositoriesMeteringInfoFunc(t), + HotThreads: newNodesHotThreadsFunc(t), + Info: newNodesInfoFunc(t), + ReloadSecureSettings: newNodesReloadSecureSettingsFunc(t), + Stats: newNodesStatsFunc(t), + Usage: newNodesUsageFunc(t), }, Remote: &Remote{}, Snapshot: &Snapshot{ @@ -696,9 +773,9 @@ func New(t Transport) *API { Create: newSnapshotCreateFunc(t), DeleteRepository: newSnapshotDeleteRepositoryFunc(t), Delete: newSnapshotDeleteFunc(t), - GetFeatures: newSnapshotGetFeaturesFunc(t), GetRepository: newSnapshotGetRepositoryFunc(t), Get: newSnapshotGetFunc(t), + RepositoryAnalyze: newSnapshotRepositoryAnalyzeFunc(t), Restore: newSnapshotRestoreFunc(t), Status: newSnapshotStatusFunc(t), VerifyRepository: newSnapshotVerifyRepositoryFunc(t), @@ -730,16 +807,17 @@ func New(t Transport) *API { Unfollow: newCCRUnfollowFunc(t), }, ILM: &ILM{ - DeleteLifecycle: newILMDeleteLifecycleFunc(t), - ExplainLifecycle: newILMExplainLifecycleFunc(t), - GetLifecycle: newILMGetLifecycleFunc(t), - GetStatus: newILMGetStatusFunc(t), - MoveToStep: newILMMoveToStepFunc(t), - PutLifecycle: newILMPutLifecycleFunc(t), - RemovePolicy: newILMRemovePolicyFunc(t), - Retry: newILMRetryFunc(t), - Start: newILMStartFunc(t), - Stop: newILMStopFunc(t), + DeleteLifecycle: newILMDeleteLifecycleFunc(t), + ExplainLifecycle: newILMExplainLifecycleFunc(t), + GetLifecycle: newILMGetLifecycleFunc(t), + GetStatus: newILMGetStatusFunc(t), + MigrateToDataTiers: newILMMigrateToDataTiersFunc(t), + MoveToStep: newILMMoveToStepFunc(t), + PutLifecycle: newILMPutLifecycleFunc(t), + RemovePolicy: newILMRemovePolicyFunc(t), + Retry: newILMRetryFunc(t), + Start: newILMStartFunc(t), + Stop: newILMStopFunc(t), }, License: &License{ Delete: newLicenseDeleteFunc(t), @@ -751,7 +829,9 @@ func New(t Transport) *API { PostStartTrial: newLicensePostStartTrialFunc(t), }, Migration: &Migration{ - Deprecations: newMigrationDeprecationsFunc(t), + Deprecations: newMigrationDeprecationsFunc(t), + GetFeatureUpgradeStatus: newMigrationGetFeatureUpgradeStatusFunc(t), + PostFeatureUpgrade: newMigrationPostFeatureUpgradeFunc(t), }, ML: &ML{ CloseJob: newMLCloseJobFunc(t), @@ -765,6 +845,7 @@ func New(t Transport) *API { DeleteForecast: newMLDeleteForecastFunc(t), DeleteJob: newMLDeleteJobFunc(t), DeleteModelSnapshot: newMLDeleteModelSnapshotFunc(t), + DeleteTrainedModelAlias: newMLDeleteTrainedModelAliasFunc(t), DeleteTrainedModel: newMLDeleteTrainedModelFunc(t), EstimateModelMemory: newMLEstimateModelMemoryFunc(t), EvaluateDataFrame: newMLEvaluateDataFrameFunc(t), @@ -793,6 +874,7 @@ func New(t Transport) *API { OpenJob: newMLOpenJobFunc(t), PostCalendarEvents: newMLPostCalendarEventsFunc(t), PostData: newMLPostDataFunc(t), + PreviewDataFrameAnalytics: newMLPreviewDataFrameAnalyticsFunc(t), PreviewDatafeed: newMLPreviewDatafeedFunc(t), PutCalendarJob: newMLPutCalendarJobFunc(t), PutCalendar: newMLPutCalendarFunc(t), @@ -800,7 +882,9 @@ func New(t Transport) *API { PutDatafeed: newMLPutDatafeedFunc(t), PutFilter: newMLPutFilterFunc(t), PutJob: newMLPutJobFunc(t), + PutTrainedModelAlias: newMLPutTrainedModelAliasFunc(t), PutTrainedModel: newMLPutTrainedModelFunc(t), + ResetJob: newMLResetJobFunc(t), RevertModelSnapshot: newMLRevertModelSnapshotFunc(t), SetUpgradeMode: newMLSetUpgradeModeFunc(t), StartDataFrameAnalytics: newMLStartDataFrameAnalyticsFunc(t), @@ -831,40 +915,55 @@ func New(t Transport) *API { StopJob: newRollupStopJobFunc(t), }, Security: &Security{ - Authenticate: newSecurityAuthenticateFunc(t), - ChangePassword: newSecurityChangePasswordFunc(t), - ClearAPIKeyCache: newSecurityClearAPIKeyCacheFunc(t), - ClearCachedPrivileges: newSecurityClearCachedPrivilegesFunc(t), - ClearCachedRealms: newSecurityClearCachedRealmsFunc(t), - ClearCachedRoles: newSecurityClearCachedRolesFunc(t), - CreateAPIKey: newSecurityCreateAPIKeyFunc(t), - DeletePrivileges: newSecurityDeletePrivilegesFunc(t), - DeleteRoleMapping: newSecurityDeleteRoleMappingFunc(t), - DeleteRole: newSecurityDeleteRoleFunc(t), - DeleteUser: newSecurityDeleteUserFunc(t), - DisableUser: newSecurityDisableUserFunc(t), - EnableUser: newSecurityEnableUserFunc(t), - GetAPIKey: newSecurityGetAPIKeyFunc(t), - GetBuiltinPrivileges: newSecurityGetBuiltinPrivilegesFunc(t), - GetPrivileges: newSecurityGetPrivilegesFunc(t), - GetRoleMapping: newSecurityGetRoleMappingFunc(t), - GetRole: newSecurityGetRoleFunc(t), - GetToken: newSecurityGetTokenFunc(t), - GetUserPrivileges: newSecurityGetUserPrivilegesFunc(t), - GetUser: newSecurityGetUserFunc(t), - GrantAPIKey: newSecurityGrantAPIKeyFunc(t), - HasPrivileges: newSecurityHasPrivilegesFunc(t), - InvalidateAPIKey: newSecurityInvalidateAPIKeyFunc(t), - InvalidateToken: newSecurityInvalidateTokenFunc(t), - PutPrivileges: newSecurityPutPrivilegesFunc(t), - PutRoleMapping: newSecurityPutRoleMappingFunc(t), - PutRole: newSecurityPutRoleFunc(t), - PutUser: newSecurityPutUserFunc(t), + Authenticate: newSecurityAuthenticateFunc(t), + ChangePassword: newSecurityChangePasswordFunc(t), + ClearAPIKeyCache: newSecurityClearAPIKeyCacheFunc(t), + ClearCachedPrivileges: newSecurityClearCachedPrivilegesFunc(t), + ClearCachedRealms: newSecurityClearCachedRealmsFunc(t), + ClearCachedRoles: newSecurityClearCachedRolesFunc(t), + ClearCachedServiceTokens: newSecurityClearCachedServiceTokensFunc(t), + CreateAPIKey: newSecurityCreateAPIKeyFunc(t), + CreateServiceToken: newSecurityCreateServiceTokenFunc(t), + DeletePrivileges: newSecurityDeletePrivilegesFunc(t), + DeleteRoleMapping: newSecurityDeleteRoleMappingFunc(t), + DeleteRole: newSecurityDeleteRoleFunc(t), + DeleteServiceToken: newSecurityDeleteServiceTokenFunc(t), + DeleteUser: newSecurityDeleteUserFunc(t), + DisableUser: newSecurityDisableUserFunc(t), + EnableUser: newSecurityEnableUserFunc(t), + GetAPIKey: newSecurityGetAPIKeyFunc(t), + GetBuiltinPrivileges: newSecurityGetBuiltinPrivilegesFunc(t), + GetPrivileges: newSecurityGetPrivilegesFunc(t), + GetRoleMapping: newSecurityGetRoleMappingFunc(t), + GetRole: newSecurityGetRoleFunc(t), + GetServiceAccounts: newSecurityGetServiceAccountsFunc(t), + GetServiceCredentials: newSecurityGetServiceCredentialsFunc(t), + GetToken: newSecurityGetTokenFunc(t), + GetUserPrivileges: newSecurityGetUserPrivilegesFunc(t), + GetUser: newSecurityGetUserFunc(t), + GrantAPIKey: newSecurityGrantAPIKeyFunc(t), + HasPrivileges: newSecurityHasPrivilegesFunc(t), + InvalidateAPIKey: newSecurityInvalidateAPIKeyFunc(t), + InvalidateToken: newSecurityInvalidateTokenFunc(t), + PutPrivileges: newSecurityPutPrivilegesFunc(t), + PutRoleMapping: newSecurityPutRoleMappingFunc(t), + PutRole: newSecurityPutRoleFunc(t), + PutUser: newSecurityPutUserFunc(t), + QueryAPIKeys: newSecurityQueryAPIKeysFunc(t), + SamlAuthenticate: newSecuritySamlAuthenticateFunc(t), + SamlCompleteLogout: newSecuritySamlCompleteLogoutFunc(t), + SamlInvalidate: newSecuritySamlInvalidateFunc(t), + SamlLogout: newSecuritySamlLogoutFunc(t), + SamlPrepareAuthentication: newSecuritySamlPrepareAuthenticationFunc(t), + SamlServiceProviderMetadata: newSecuritySamlServiceProviderMetadataFunc(t), }, SQL: &SQL{ - ClearCursor: newSQLClearCursorFunc(t), - Query: newSQLQueryFunc(t), - Translate: newSQLTranslateFunc(t), + ClearCursor: newSQLClearCursorFunc(t), + DeleteAsync: newSQLDeleteAsyncFunc(t), + GetAsync: newSQLGetAsyncFunc(t), + GetAsyncStatus: newSQLGetAsyncStatusFunc(t), + Query: newSQLQueryFunc(t), + Translate: newSQLTranslateFunc(t), }, SSL: &SSL{ Certificates: newSSLCertificatesFunc(t), diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.bulk.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.bulk.go index a2e2aa13..14992c15 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.bulk.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.bulk.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.aliases.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.aliases.go index 5fa6c1a8..e27d4073 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.aliases.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.aliases.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.allocation.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.allocation.go index 8c6be85c..3f56a5ca 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.allocation.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.allocation.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.count.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.count.go index adcb6185..dab1a04e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.count.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.count.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.fielddata.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.fielddata.go index c4c3b49e..ee62cdcf 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.fielddata.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.fielddata.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.health.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.health.go index 0e8decfe..e4bc0e8c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.health.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.health.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.help.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.help.go index 08ad0f50..0880018c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.help.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.help.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.indices.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.indices.go index 2e0b130d..d1408d4a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.indices.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.indices.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.master.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.master.go index ca441c38..777277a1 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.master.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.master.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.nodeattrs.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.nodeattrs.go index 4c751b8b..8c09f22b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.nodeattrs.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.nodeattrs.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.nodes.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.nodes.go index f5ad9a14..2a108485 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.nodes.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.nodes.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -35,16 +48,17 @@ type CatNodes func(o ...func(*CatNodesRequest)) (*Response, error) // CatNodesRequest configures the Cat Nodes API request. // type CatNodesRequest struct { - Bytes string - Format string - FullID *bool - H []string - Help *bool - Local *bool - MasterTimeout time.Duration - S []string - Time string - V *bool + Bytes string + Format string + FullID *bool + H []string + Help *bool + IncludeUnloadedSegments *bool + Local *bool + MasterTimeout time.Duration + S []string + Time string + V *bool Pretty bool Human bool @@ -92,6 +106,10 @@ func (r CatNodesRequest) Do(ctx context.Context, transport Transport) (*Response params["help"] = strconv.FormatBool(*r.Help) } + if r.IncludeUnloadedSegments != nil { + params["include_unloaded_segments"] = strconv.FormatBool(*r.IncludeUnloadedSegments) + } + if r.Local != nil { params["local"] = strconv.FormatBool(*r.Local) } @@ -219,6 +237,14 @@ func (f CatNodes) WithHelp(v bool) func(*CatNodesRequest) { } } +// WithIncludeUnloadedSegments - if set to true segment stats will include stats for segments that are not currently loaded into memory. +// +func (f CatNodes) WithIncludeUnloadedSegments(v bool) func(*CatNodesRequest) { + return func(r *CatNodesRequest) { + r.IncludeUnloadedSegments = &v + } +} + // WithLocal - calculate the selected nodes using the local cluster state rather than the state from master node (default: false). // func (f CatNodes) WithLocal(v bool) func(*CatNodesRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.pending_tasks.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.pending_tasks.go index 7a77d2d8..5f5d7a9f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.pending_tasks.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.pending_tasks.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.plugins.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.plugins.go index 7c43acb6..82e26d18 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.plugins.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.plugins.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.recovery.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.recovery.go index 67435292..38c5b785 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.recovery.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.recovery.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.repositories.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.repositories.go index 393aa3fe..5e5c56ae 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.repositories.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.repositories.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.segments.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.segments.go index a2433f5a..2c5f5ef9 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.segments.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.segments.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.shards.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.shards.go index a29040c9..add5d1e2 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.shards.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.shards.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.snapshots.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.snapshots.go index 84051d65..5d75b3d2 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.snapshots.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.snapshots.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.tasks.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.tasks.go index e009ebe6..f384c870 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.tasks.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.tasks.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.templates.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.templates.go index fa76213b..a4ff1a09 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.templates.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.templates.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.thread_pool.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.thread_pool.go index 8df3d828..d27c5c30 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.thread_pool.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cat.thread_pool.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.clear_scroll.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.clear_scroll.go index 015011f0..bcbf9239 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.clear_scroll.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.clear_scroll.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.allocation_explain.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.allocation_explain.go index b2e2a2f4..4d5dfada 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.allocation_explain.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.allocation_explain.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -59,7 +72,7 @@ func (r ClusterAllocationExplainRequest) Do(ctx context.Context, transport Trans params map[string]string ) - method = "GET" + method = "POST" path.Grow(len("/_cluster/allocation/explain")) path.WriteString("/_cluster/allocation/explain") @@ -145,7 +158,7 @@ func (f ClusterAllocationExplain) WithContext(v context.Context) func(*ClusterAl } } -// WithBody - The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'. +// WithBody - The index, shard, and primary flag to explain. Empty means 'explain a randomly-chosen unassigned shard'. // func (f ClusterAllocationExplain) WithBody(v io.Reader) func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.delete_component_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.delete_component_template.go index 5b4ac958..087b6433 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.delete_component_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.delete_component_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.delete_voting_config_exclusions.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.delete_voting_config_exclusions.go index 4a639906..fcdc86b3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.delete_voting_config_exclusions.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.delete_voting_config_exclusions.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.exists_component_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.exists_component_template.go index 981d170c..65ade798 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.exists_component_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.exists_component_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.get_component_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.get_component_template.go index 5a287667..b396d9fd 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.get_component_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.get_component_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.get_settings.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.get_settings.go index 78121718..c469bfb8 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.get_settings.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.get_settings.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -28,7 +41,7 @@ func newClusterGetSettingsFunc(t Transport) ClusterGetSettings { // ClusterGetSettings returns cluster settings. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html. // type ClusterGetSettings func(o ...func(*ClusterGetSettingsRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.health.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.health.go index a05c5b23..18412cac 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.health.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.health.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.pending_tasks.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.pending_tasks.go index 4226de1a..c0248996 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.pending_tasks.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.pending_tasks.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.post_voting_config_exclusions.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.post_voting_config_exclusions.go index 72358ff6..1e2f55d5 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.post_voting_config_exclusions.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.post_voting_config_exclusions.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.put_component_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.put_component_template.go index 71abeb05..80282ddc 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.put_component_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.put_component_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.put_settings.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.put_settings.go index 962020cf..f2143708 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.put_settings.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.put_settings.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.remote_info.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.remote_info.go index af282737..7dd70c72 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.remote_info.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.remote_info.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.reroute.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.reroute.go index be7cbd52..02364af1 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.reroute.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.reroute.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.state.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.state.go index 12815f91..4041f2ef 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.state.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.state.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.stats.go index 4efdd15b..b7389402 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.cluster.stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.count.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.count.go index 27fcad1d..8323f9b1 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.count.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.count.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.create.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.create.go index 44039b02..517e8c8c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.create.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.create.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.delete_dangling_index.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.delete_dangling_index.go index 6395aa63..7c302034 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.delete_dangling_index.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.delete_dangling_index.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.import_dangling_index.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.import_dangling_index.go index e65b054f..e2ba094f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.import_dangling_index.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.import_dangling_index.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.list_dangling_indices.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.list_dangling_indices.go index dd7cdabc..6d0d65e1 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.list_dangling_indices.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.dangling_indices.list_dangling_indices.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete.go index 6377ba86..8f9763b9 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_by_query.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_by_query.go index b0cfd701..5f945ab1 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_by_query.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_by_query.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -66,9 +79,6 @@ type DeleteByQueryRequest struct { Size *int Slices interface{} Sort []string - Source []string - SourceExcludes []string - SourceIncludes []string Stats []string TerminateAfter *int Timeout time.Duration @@ -205,18 +215,6 @@ func (r DeleteByQueryRequest) Do(ctx context.Context, transport Transport) (*Res params["sort"] = strings.Join(r.Sort, ",") } - if len(r.Source) > 0 { - params["_source"] = strings.Join(r.Source, ",") - } - - if len(r.SourceExcludes) > 0 { - params["_source_excludes"] = strings.Join(r.SourceExcludes, ",") - } - - if len(r.SourceIncludes) > 0 { - params["_source_includes"] = strings.Join(r.SourceIncludes, ",") - } - if len(r.Stats) > 0 { params["stats"] = strings.Join(r.Stats, ",") } @@ -512,30 +510,6 @@ func (f DeleteByQuery) WithSort(v ...string) func(*DeleteByQueryRequest) { } } -// WithSource - true or false to return the _source field or not, or a list of fields to return. -// -func (f DeleteByQuery) WithSource(v ...string) func(*DeleteByQueryRequest) { - return func(r *DeleteByQueryRequest) { - r.Source = v - } -} - -// WithSourceExcludes - a list of fields to exclude from the returned _source field. -// -func (f DeleteByQuery) WithSourceExcludes(v ...string) func(*DeleteByQueryRequest) { - return func(r *DeleteByQueryRequest) { - r.SourceExcludes = v - } -} - -// WithSourceIncludes - a list of fields to extract and return from the _source field. -// -func (f DeleteByQuery) WithSourceIncludes(v ...string) func(*DeleteByQueryRequest) { - return func(r *DeleteByQueryRequest) { - r.SourceIncludes = v - } -} - // WithStats - specific 'tag' of the request for logging and statistical purposes. // func (f DeleteByQuery) WithStats(v ...string) func(*DeleteByQueryRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_by_query_rethrottle.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_by_query_rethrottle.go index 7b61df8c..63bba850 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_by_query_rethrottle.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_by_query_rethrottle.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_script.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_script.go index 853e978c..90f8b302 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_script.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.delete_script.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.exists.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.exists.go index 95a0c706..4dd414f2 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.exists.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.exists.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.exists_source.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.exists_source.go index 95026ca4..39a4cef1 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.exists_source.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.exists_source.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.explain.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.explain.go index c38ff30b..d5ba2cdb 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.explain.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.explain.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -73,7 +86,7 @@ func (r ExplainRequest) Do(ctx context.Context, transport Transport) (*Response, params map[string]string ) - method = "GET" + method = "POST" if r.DocumentType == "" { r.DocumentType = "_doc" diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.features.get_features.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.features.get_features.go index d339dd9a..2db399ea 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.features.get_features.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.features.get_features.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -25,9 +38,9 @@ func newFeaturesGetFeaturesFunc(t Transport) FeaturesGetFeatures { // ----- API Definition ------------------------------------------------------- -// FeaturesGetFeatures returns a list of features which can be snapshotted in this cluster. +// FeaturesGetFeatures gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html. // type FeaturesGetFeatures func(o ...func(*FeaturesGetFeaturesRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.features.reset_features.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.features.reset_features.go new file mode 100644 index 00000000..a5cb8037 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.features.reset_features.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 specification version 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newFeaturesResetFeaturesFunc(t Transport) FeaturesResetFeatures { + return func(o ...func(*FeaturesResetFeaturesRequest)) (*Response, error) { + var r = FeaturesResetFeaturesRequest{} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// FeaturesResetFeatures resets the internal state of features, usually by deleting system indices +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// +type FeaturesResetFeatures func(o ...func(*FeaturesResetFeaturesRequest)) (*Response, error) + +// FeaturesResetFeaturesRequest configures the Features Reset Features API request. +// +type FeaturesResetFeaturesRequest struct { + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r FeaturesResetFeaturesRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(len("/_features/_reset")) + path.WriteString("/_features/_reset") + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f FeaturesResetFeatures) WithContext(v context.Context) func(*FeaturesResetFeaturesRequest) { + return func(r *FeaturesResetFeaturesRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f FeaturesResetFeatures) WithPretty() func(*FeaturesResetFeaturesRequest) { + return func(r *FeaturesResetFeaturesRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f FeaturesResetFeatures) WithHuman() func(*FeaturesResetFeaturesRequest) { + return func(r *FeaturesResetFeaturesRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f FeaturesResetFeatures) WithErrorTrace() func(*FeaturesResetFeaturesRequest) { + return func(r *FeaturesResetFeaturesRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f FeaturesResetFeatures) WithFilterPath(v ...string) func(*FeaturesResetFeaturesRequest) { + return func(r *FeaturesResetFeaturesRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f FeaturesResetFeatures) WithHeader(h map[string]string) func(*FeaturesResetFeaturesRequest) { + return func(r *FeaturesResetFeaturesRequest) { + 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 FeaturesResetFeatures) WithOpaqueID(s string) func(*FeaturesResetFeaturesRequest) { + return func(r *FeaturesResetFeaturesRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.field_caps.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.field_caps.go index 6eb16f4c..6fd1b14b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.field_caps.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.field_caps.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -64,7 +77,7 @@ func (r FieldCapsRequest) Do(ctx context.Context, transport Transport) (*Respons params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len("_field_caps")) if len(r.Index) > 0 { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.fleet.global_checkpoints.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.fleet.global_checkpoints.go new file mode 100644 index 00000000..e360418b --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.fleet.global_checkpoints.go @@ -0,0 +1,258 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" + "time" +) + +func newFleetGlobalCheckpointsFunc(t Transport) FleetGlobalCheckpoints { + return func(index string, o ...func(*FleetGlobalCheckpointsRequest)) (*Response, error) { + var r = FleetGlobalCheckpointsRequest{Index: index} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// FleetGlobalCheckpoints returns the current global checkpoints for an index. This API is design for internal use by the fleet server project. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-global-checkpoints.html. +// +type FleetGlobalCheckpoints func(index string, o ...func(*FleetGlobalCheckpointsRequest)) (*Response, error) + +// FleetGlobalCheckpointsRequest configures the Fleet Global Checkpoints API request. +// +type FleetGlobalCheckpointsRequest struct { + Index string + + Checkpoints []string + Timeout time.Duration + WaitForAdvance *bool + WaitForIndex *bool + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r FleetGlobalCheckpointsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(1 + len(r.Index) + 1 + len("_fleet") + 1 + len("global_checkpoints")) + path.WriteString("/") + path.WriteString(r.Index) + path.WriteString("/") + path.WriteString("_fleet") + path.WriteString("/") + path.WriteString("global_checkpoints") + + params = make(map[string]string) + + if len(r.Checkpoints) > 0 { + params["checkpoints"] = strings.Join(r.Checkpoints, ",") + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.WaitForAdvance != nil { + params["wait_for_advance"] = strconv.FormatBool(*r.WaitForAdvance) + } + + if r.WaitForIndex != nil { + params["wait_for_index"] = strconv.FormatBool(*r.WaitForIndex) + } + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f FleetGlobalCheckpoints) WithContext(v context.Context) func(*FleetGlobalCheckpointsRequest) { + return func(r *FleetGlobalCheckpointsRequest) { + r.ctx = v + } +} + +// WithCheckpoints - comma separated list of checkpoints. +// +func (f FleetGlobalCheckpoints) WithCheckpoints(v ...string) func(*FleetGlobalCheckpointsRequest) { + return func(r *FleetGlobalCheckpointsRequest) { + r.Checkpoints = v + } +} + +// WithTimeout - timeout to wait for global checkpoint to advance. +// +func (f FleetGlobalCheckpoints) WithTimeout(v time.Duration) func(*FleetGlobalCheckpointsRequest) { + return func(r *FleetGlobalCheckpointsRequest) { + r.Timeout = v + } +} + +// WithWaitForAdvance - whether to wait for the global checkpoint to advance past the specified current checkpoints. +// +func (f FleetGlobalCheckpoints) WithWaitForAdvance(v bool) func(*FleetGlobalCheckpointsRequest) { + return func(r *FleetGlobalCheckpointsRequest) { + r.WaitForAdvance = &v + } +} + +// WithWaitForIndex - whether to wait for the target index to exist and all primary shards be active. +// +func (f FleetGlobalCheckpoints) WithWaitForIndex(v bool) func(*FleetGlobalCheckpointsRequest) { + return func(r *FleetGlobalCheckpointsRequest) { + r.WaitForIndex = &v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f FleetGlobalCheckpoints) WithPretty() func(*FleetGlobalCheckpointsRequest) { + return func(r *FleetGlobalCheckpointsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f FleetGlobalCheckpoints) WithHuman() func(*FleetGlobalCheckpointsRequest) { + return func(r *FleetGlobalCheckpointsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f FleetGlobalCheckpoints) WithErrorTrace() func(*FleetGlobalCheckpointsRequest) { + return func(r *FleetGlobalCheckpointsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f FleetGlobalCheckpoints) WithFilterPath(v ...string) func(*FleetGlobalCheckpointsRequest) { + return func(r *FleetGlobalCheckpointsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f FleetGlobalCheckpoints) WithHeader(h map[string]string) func(*FleetGlobalCheckpointsRequest) { + return func(r *FleetGlobalCheckpointsRequest) { + 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 FleetGlobalCheckpoints) WithOpaqueID(s string) func(*FleetGlobalCheckpointsRequest) { + return func(r *FleetGlobalCheckpointsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.fleet.msearch.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.fleet.msearch.go new file mode 100644 index 00000000..1ce283f1 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.fleet.msearch.go @@ -0,0 +1,220 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newFleetMsearchFunc(t Transport) FleetMsearch { + return func(body io.Reader, o ...func(*FleetMsearchRequest)) (*Response, error) { + var r = FleetMsearchRequest{Body: body} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// FleetMsearch multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. +// +// This API is experimental. +// +type FleetMsearch func(body io.Reader, o ...func(*FleetMsearchRequest)) (*Response, error) + +// FleetMsearchRequest configures the Fleet Msearch API request. +// +type FleetMsearchRequest struct { + Index string + + Body io.Reader + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r FleetMsearchRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(1 + len(r.Index) + 1 + len("_fleet") + 1 + len("_fleet_msearch")) + if r.Index != "" { + path.WriteString("/") + path.WriteString(r.Index) + } + path.WriteString("/") + path.WriteString("_fleet") + path.WriteString("/") + path.WriteString("_fleet_msearch") + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f FleetMsearch) WithContext(v context.Context) func(*FleetMsearchRequest) { + return func(r *FleetMsearchRequest) { + r.ctx = v + } +} + +// WithIndex - the index name to use as the default. +// +func (f FleetMsearch) WithIndex(v string) func(*FleetMsearchRequest) { + return func(r *FleetMsearchRequest) { + r.Index = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f FleetMsearch) WithPretty() func(*FleetMsearchRequest) { + return func(r *FleetMsearchRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f FleetMsearch) WithHuman() func(*FleetMsearchRequest) { + return func(r *FleetMsearchRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f FleetMsearch) WithErrorTrace() func(*FleetMsearchRequest) { + return func(r *FleetMsearchRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f FleetMsearch) WithFilterPath(v ...string) func(*FleetMsearchRequest) { + return func(r *FleetMsearchRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f FleetMsearch) WithHeader(h map[string]string) func(*FleetMsearchRequest) { + return func(r *FleetMsearchRequest) { + 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 FleetMsearch) WithOpaqueID(s string) func(*FleetMsearchRequest) { + return func(r *FleetMsearchRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.fleet.search.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.fleet.search.go new file mode 100644 index 00000000..d41c92c3 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.fleet.search.go @@ -0,0 +1,260 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strconv" + "strings" + "time" +) + +func newFleetSearchFunc(t Transport) FleetSearch { + return func(index string, o ...func(*FleetSearchRequest)) (*Response, error) { + var r = FleetSearchRequest{Index: index} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// FleetSearch search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. +// +// This API is experimental. +// +type FleetSearch func(index string, o ...func(*FleetSearchRequest)) (*Response, error) + +// FleetSearchRequest configures the Fleet Search API request. +// +type FleetSearchRequest struct { + Index string + + Body io.Reader + + AllowPartialSearchResults *bool + WaitForCheckpoints []string + WaitForCheckpointsTimeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r FleetSearchRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(1 + len(r.Index) + 1 + len("_fleet") + 1 + len("_fleet_search")) + path.WriteString("/") + path.WriteString(r.Index) + path.WriteString("/") + path.WriteString("_fleet") + path.WriteString("/") + path.WriteString("_fleet_search") + + params = make(map[string]string) + + if r.AllowPartialSearchResults != nil { + params["allow_partial_search_results"] = strconv.FormatBool(*r.AllowPartialSearchResults) + } + + if len(r.WaitForCheckpoints) > 0 { + params["wait_for_checkpoints"] = strings.Join(r.WaitForCheckpoints, ",") + } + + if r.WaitForCheckpointsTimeout != 0 { + params["wait_for_checkpoints_timeout"] = formatDuration(r.WaitForCheckpointsTimeout) + } + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f FleetSearch) WithContext(v context.Context) func(*FleetSearchRequest) { + return func(r *FleetSearchRequest) { + r.ctx = v + } +} + +// WithBody - The search definition using the Query DSL. +// +func (f FleetSearch) WithBody(v io.Reader) func(*FleetSearchRequest) { + return func(r *FleetSearchRequest) { + r.Body = v + } +} + +// WithAllowPartialSearchResults - indicate if an error should be returned if there is a partial search failure or timeout. +// +func (f FleetSearch) WithAllowPartialSearchResults(v bool) func(*FleetSearchRequest) { + return func(r *FleetSearchRequest) { + r.AllowPartialSearchResults = &v + } +} + +// WithWaitForCheckpoints - comma separated list of checkpoints, one per shard. +// +func (f FleetSearch) WithWaitForCheckpoints(v ...string) func(*FleetSearchRequest) { + return func(r *FleetSearchRequest) { + r.WaitForCheckpoints = v + } +} + +// WithWaitForCheckpointsTimeout - explicit wait_for_checkpoints timeout. +// +func (f FleetSearch) WithWaitForCheckpointsTimeout(v time.Duration) func(*FleetSearchRequest) { + return func(r *FleetSearchRequest) { + r.WaitForCheckpointsTimeout = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f FleetSearch) WithPretty() func(*FleetSearchRequest) { + return func(r *FleetSearchRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f FleetSearch) WithHuman() func(*FleetSearchRequest) { + return func(r *FleetSearchRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f FleetSearch) WithErrorTrace() func(*FleetSearchRequest) { + return func(r *FleetSearchRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f FleetSearch) WithFilterPath(v ...string) func(*FleetSearchRequest) { + return func(r *FleetSearchRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f FleetSearch) WithHeader(h map[string]string) func(*FleetSearchRequest) { + return func(r *FleetSearchRequest) { + 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 FleetSearch) WithOpaqueID(s string) func(*FleetSearchRequest) { + return func(r *FleetSearchRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get.go index 3ff938bc..a41917cb 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script.go index f34ff0e9..b52af63b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script_context.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script_context.go index 00f8eb44..378d1d17 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script_context.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script_context.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -26,8 +39,6 @@ func newGetScriptContextFunc(t Transport) GetScriptContext { // GetScriptContext returns all script contexts. // -// This API is experimental. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html. // type GetScriptContext func(o ...func(*GetScriptContextRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script_languages.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script_languages.go index 51f4751f..b78bc1d6 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script_languages.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_script_languages.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -26,8 +39,6 @@ func newGetScriptLanguagesFunc(t Transport) GetScriptLanguages { // GetScriptLanguages returns available script types, languages and contexts // -// This API is experimental. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html. // type GetScriptLanguages func(o ...func(*GetScriptLanguagesRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_source.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_source.go index 86c1f4c6..9a054758 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_source.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.get_source.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.index.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.index.go index 9f749116..9ac85bcb 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.index.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.index.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.add_block.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.add_block.go index 3a7f6e28..1de4e00b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.add_block.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.add_block.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.analyze.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.analyze.go index 206c03a9..837e160f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.analyze.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.analyze.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -57,7 +70,7 @@ func (r IndicesAnalyzeRequest) Do(ctx context.Context, transport Transport) (*Re params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(r.Index) + 1 + len("_analyze")) if r.Index != "" { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.clear_cache.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.clear_cache.go index 9a13e547..9cc91ce6 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.clear_cache.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.clear_cache.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.clone.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.clone.go index 3ece4bc7..946c2bcf 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.clone.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.clone.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.close.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.close.go index 22d7fd35..7d6ebd67 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.close.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.close.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.create.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.create.go index e4f1ee4b..7d55e47b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.create.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.create.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete.go index fd148565..fbd2fe96 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -165,7 +178,7 @@ func (f IndicesDelete) WithAllowNoIndices(v bool) func(*IndicesDeleteRequest) { } } -// WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). +// WithExpandWildcards - whether wildcard expressions should get expanded to open, closed, or hidden indices. // func (f IndicesDelete) WithExpandWildcards(v string) func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_alias.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_alias.go index 54995317..696f9e44 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_alias.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_alias.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_index_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_index_template.go index 7f808db5..ef8b6224 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_index_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_index_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_template.go index 0492fd8a..c40d2d9f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.delete_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.disk_usage.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.disk_usage.go new file mode 100644 index 00000000..cc84d103 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.disk_usage.go @@ -0,0 +1,270 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" +) + +func newIndicesDiskUsageFunc(t Transport) IndicesDiskUsage { + return func(index string, o ...func(*IndicesDiskUsageRequest)) (*Response, error) { + var r = IndicesDiskUsageRequest{Index: index} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesDiskUsage analyzes the disk usage of each field of an index or data stream +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html. +// +type IndicesDiskUsage func(index string, o ...func(*IndicesDiskUsageRequest)) (*Response, error) + +// IndicesDiskUsageRequest configures the Indices Disk Usage API request. +// +type IndicesDiskUsageRequest struct { + Index string + + AllowNoIndices *bool + ExpandWildcards string + Flush *bool + IgnoreUnavailable *bool + RunExpensiveTasks *bool + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r IndicesDiskUsageRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(1 + len(r.Index) + 1 + len("_disk_usage")) + path.WriteString("/") + path.WriteString(r.Index) + path.WriteString("/") + path.WriteString("_disk_usage") + + 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.Flush != nil { + params["flush"] = strconv.FormatBool(*r.Flush) + } + + if r.IgnoreUnavailable != nil { + params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) + } + + if r.RunExpensiveTasks != nil { + params["run_expensive_tasks"] = strconv.FormatBool(*r.RunExpensiveTasks) + } + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f IndicesDiskUsage) WithContext(v context.Context) func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + r.ctx = v + } +} + +// WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). +// +func (f IndicesDiskUsage) WithAllowNoIndices(v bool) func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + r.AllowNoIndices = &v + } +} + +// WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. +// +func (f IndicesDiskUsage) WithExpandWildcards(v string) func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + r.ExpandWildcards = v + } +} + +// WithFlush - whether flush or not before analyzing the index disk usage. defaults to true. +// +func (f IndicesDiskUsage) WithFlush(v bool) func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + r.Flush = &v + } +} + +// WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). +// +func (f IndicesDiskUsage) WithIgnoreUnavailable(v bool) func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + r.IgnoreUnavailable = &v + } +} + +// WithRunExpensiveTasks - must be set to [true] in order for the task to be performed. defaults to false.. +// +func (f IndicesDiskUsage) WithRunExpensiveTasks(v bool) func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + r.RunExpensiveTasks = &v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f IndicesDiskUsage) WithPretty() func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f IndicesDiskUsage) WithHuman() func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f IndicesDiskUsage) WithErrorTrace() func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f IndicesDiskUsage) WithFilterPath(v ...string) func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f IndicesDiskUsage) WithHeader(h map[string]string) func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + 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 IndicesDiskUsage) WithOpaqueID(s string) func(*IndicesDiskUsageRequest) { + return func(r *IndicesDiskUsageRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists.go index a9f9d698..a6335f6d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_alias.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_alias.go index b8b3c618..edc78bdd 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_alias.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_alias.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_index_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_index_template.go index a9f70b80..dd160e3a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_index_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_index_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_template.go index dfe77246..b5f798cd 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_type.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_type.go index 9b96aca8..11e91e54 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_type.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.exists_type.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.field_usage_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.field_usage_stats.go new file mode 100644 index 00000000..b221910c --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.field_usage_stats.go @@ -0,0 +1,257 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" +) + +func newIndicesFieldUsageStatsFunc(t Transport) IndicesFieldUsageStats { + return func(index string, o ...func(*IndicesFieldUsageStatsRequest)) (*Response, error) { + var r = IndicesFieldUsageStatsRequest{Index: index} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesFieldUsageStats returns the field usage stats for each field of an index +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/field-usage-stats.html. +// +type IndicesFieldUsageStats func(index string, o ...func(*IndicesFieldUsageStatsRequest)) (*Response, error) + +// IndicesFieldUsageStatsRequest configures the Indices Field Usage Stats API request. +// +type IndicesFieldUsageStatsRequest struct { + Index string + + AllowNoIndices *bool + ExpandWildcards string + Fields []string + IgnoreUnavailable *bool + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r IndicesFieldUsageStatsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(1 + len(r.Index) + 1 + len("_field_usage_stats")) + path.WriteString("/") + path.WriteString(r.Index) + path.WriteString("/") + path.WriteString("_field_usage_stats") + + 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 len(r.Fields) > 0 { + params["fields"] = strings.Join(r.Fields, ",") + } + + if r.IgnoreUnavailable != nil { + params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) + } + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f IndicesFieldUsageStats) WithContext(v context.Context) func(*IndicesFieldUsageStatsRequest) { + return func(r *IndicesFieldUsageStatsRequest) { + r.ctx = v + } +} + +// WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). +// +func (f IndicesFieldUsageStats) WithAllowNoIndices(v bool) func(*IndicesFieldUsageStatsRequest) { + return func(r *IndicesFieldUsageStatsRequest) { + r.AllowNoIndices = &v + } +} + +// WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. +// +func (f IndicesFieldUsageStats) WithExpandWildcards(v string) func(*IndicesFieldUsageStatsRequest) { + return func(r *IndicesFieldUsageStatsRequest) { + r.ExpandWildcards = v + } +} + +// WithFields - a list of fields to include in the stats if only a subset of fields should be returned (supports wildcards). +// +func (f IndicesFieldUsageStats) WithFields(v ...string) func(*IndicesFieldUsageStatsRequest) { + return func(r *IndicesFieldUsageStatsRequest) { + r.Fields = v + } +} + +// WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). +// +func (f IndicesFieldUsageStats) WithIgnoreUnavailable(v bool) func(*IndicesFieldUsageStatsRequest) { + return func(r *IndicesFieldUsageStatsRequest) { + r.IgnoreUnavailable = &v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f IndicesFieldUsageStats) WithPretty() func(*IndicesFieldUsageStatsRequest) { + return func(r *IndicesFieldUsageStatsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f IndicesFieldUsageStats) WithHuman() func(*IndicesFieldUsageStatsRequest) { + return func(r *IndicesFieldUsageStatsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f IndicesFieldUsageStats) WithErrorTrace() func(*IndicesFieldUsageStatsRequest) { + return func(r *IndicesFieldUsageStatsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f IndicesFieldUsageStats) WithFilterPath(v ...string) func(*IndicesFieldUsageStatsRequest) { + return func(r *IndicesFieldUsageStatsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f IndicesFieldUsageStats) WithHeader(h map[string]string) func(*IndicesFieldUsageStatsRequest) { + return func(r *IndicesFieldUsageStatsRequest) { + 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 IndicesFieldUsageStats) WithOpaqueID(s string) func(*IndicesFieldUsageStatsRequest) { + return func(r *IndicesFieldUsageStatsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.flush.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.flush.go index 7da50200..34620a87 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.flush.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.flush.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.flush_synced.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.flush_synced.go index 2e2b19e0..eb72ac15 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.flush_synced.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.flush_synced.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// Code generated from specification version 7.12.0: DO NOT EDIT +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.forcemerge.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.forcemerge.go index f11d4b35..69062e1c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.forcemerge.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.forcemerge.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get.go index ae1aa9ca..9aec2f5f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_alias.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_alias.go index 872de1b5..10e1bcdb 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_alias.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_alias.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_field_mapping.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_field_mapping.go index 04b1a0f9..278c46b8 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_field_mapping.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_field_mapping.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_index_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_index_template.go index 96a6f13c..a0279fd5 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_index_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_index_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -35,7 +48,7 @@ type IndicesGetIndexTemplate func(o ...func(*IndicesGetIndexTemplateRequest)) (* // IndicesGetIndexTemplateRequest configures the Indices Get Index Template API request. // type IndicesGetIndexTemplateRequest struct { - Name []string + Name string FlatSettings *bool Local *bool @@ -62,12 +75,12 @@ func (r IndicesGetIndexTemplateRequest) Do(ctx context.Context, transport Transp method = "GET" - path.Grow(1 + len("_index_template") + 1 + len(strings.Join(r.Name, ","))) + path.Grow(1 + len("_index_template") + 1 + len(r.Name)) path.WriteString("/") path.WriteString("_index_template") - if len(r.Name) > 0 { + if r.Name != "" { path.WriteString("/") - path.WriteString(strings.Join(r.Name, ",")) + path.WriteString(r.Name) } params = make(map[string]string) @@ -151,9 +164,9 @@ func (f IndicesGetIndexTemplate) WithContext(v context.Context) func(*IndicesGet } } -// WithName - the comma separated names of the index templates. +// WithName - a pattern that returned template names must match. // -func (f IndicesGetIndexTemplate) WithName(v ...string) func(*IndicesGetIndexTemplateRequest) { +func (f IndicesGetIndexTemplate) WithName(v string) func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { r.Name = v } diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_mapping.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_mapping.go index 9ebe7655..dc01738d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_mapping.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_mapping.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_settings.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_settings.go index 3fe0d48c..eb283637 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_settings.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_settings.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_template.go index 5ada4d6b..12e0a3d8 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_upgrade.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_upgrade.go index 22d1ae05..7babe635 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_upgrade.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.get_upgrade.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// Code generated from specification version 7.12.0: DO NOT EDIT +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.modify_data_stream.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.modify_data_stream.go new file mode 100644 index 00000000..9178239f --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.modify_data_stream.go @@ -0,0 +1,203 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newIndicesModifyDataStreamFunc(t Transport) IndicesModifyDataStream { + return func(body io.Reader, o ...func(*IndicesModifyDataStreamRequest)) (*Response, error) { + var r = IndicesModifyDataStreamRequest{Body: body} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesModifyDataStream modifies a data stream +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. +// +type IndicesModifyDataStream func(body io.Reader, o ...func(*IndicesModifyDataStreamRequest)) (*Response, error) + +// IndicesModifyDataStreamRequest configures the Indices Modify Data Stream API request. +// +type IndicesModifyDataStreamRequest struct { + Body io.Reader + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r IndicesModifyDataStreamRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(len("/_data_stream/_modify")) + path.WriteString("/_data_stream/_modify") + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f IndicesModifyDataStream) WithContext(v context.Context) func(*IndicesModifyDataStreamRequest) { + return func(r *IndicesModifyDataStreamRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f IndicesModifyDataStream) WithPretty() func(*IndicesModifyDataStreamRequest) { + return func(r *IndicesModifyDataStreamRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f IndicesModifyDataStream) WithHuman() func(*IndicesModifyDataStreamRequest) { + return func(r *IndicesModifyDataStreamRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f IndicesModifyDataStream) WithErrorTrace() func(*IndicesModifyDataStreamRequest) { + return func(r *IndicesModifyDataStreamRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f IndicesModifyDataStream) WithFilterPath(v ...string) func(*IndicesModifyDataStreamRequest) { + return func(r *IndicesModifyDataStreamRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f IndicesModifyDataStream) WithHeader(h map[string]string) func(*IndicesModifyDataStreamRequest) { + return func(r *IndicesModifyDataStreamRequest) { + 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 IndicesModifyDataStream) WithOpaqueID(s string) func(*IndicesModifyDataStreamRequest) { + return func(r *IndicesModifyDataStreamRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.open.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.open.go index f1d8a53f..9720cf7d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.open.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.open.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_alias.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_alias.go index 5a5e854a..d6e9ef44 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_alias.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_alias.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_index_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_index_template.go index a1ab3831..4f28026e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_index_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_index_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_mapping.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_mapping.go index 365973f9..59f45bac 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_mapping.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_mapping.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_settings.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_settings.go index e4c2fcc2..b4a83d27 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_settings.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_settings.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_template.go index 675fdc7d..59c4f076 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.put_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.recovery.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.recovery.go index 3bdc5a70..b7fade3a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.recovery.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.recovery.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.refresh.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.refresh.go index b65f01a3..b40a9a8e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.refresh.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.refresh.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// Code generated from specification version 7.12.0: DO NOT EDIT +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.resolve_index.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.resolve_index.go index ce1a8bb6..c91f529d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.resolve_index.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.resolve_index.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -26,8 +39,6 @@ func newIndicesResolveIndexFunc(t Transport) IndicesResolveIndex { // IndicesResolveIndex returns information about any matching indices, aliases, and data streams // -// This API is experimental. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html. // type IndicesResolveIndex func(name []string, o ...func(*IndicesResolveIndexRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.rollover.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.rollover.go index 99041955..83f91bb5 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.rollover.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.rollover.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.segments.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.segments.go index 6b8398cf..40c1e5d0 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.segments.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.segments.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.shard_stores.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.shard_stores.go index eaa0321c..ce3ed435 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.shard_stores.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.shard_stores.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.shrink.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.shrink.go index b6d253bf..2bdca8ef 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.shrink.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.shrink.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.simulate_index_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.simulate_index_template.go index d8adbed6..0fa98b4e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.simulate_index_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.simulate_index_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.simulate_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.simulate_template.go index 5daede91..21e6d5ae 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.simulate_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.simulate_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.split.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.split.go index cde02a8f..f194f80b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.split.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.split.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.stats.go index d5c832b5..e67ea98d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.update_aliases.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.update_aliases.go index a54a2538..9604b29a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.update_aliases.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.update_aliases.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.upgrade.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.upgrade.go index bd8f0f27..0ee730b4 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.upgrade.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.upgrade.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.validate_query.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.validate_query.go index 4588716a..a0d14155 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.validate_query.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.indices.validate_query.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -72,7 +85,7 @@ func (r IndicesValidateQueryRequest) Do(ctx context.Context, transport Transport params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len(strings.Join(r.DocumentType, ",")) + 1 + len("_validate") + 1 + len("query")) if len(r.Index) > 0 { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.info.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.info.go index 7edaa835..687d4c8f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.info.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.info.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.delete_pipeline.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.delete_pipeline.go index 676e6118..09d71679 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.delete_pipeline.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.delete_pipeline.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.geo_ip_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.geo_ip_stats.go new file mode 100644 index 00000000..afc3bde4 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.geo_ip_stats.go @@ -0,0 +1,196 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newIngestGeoIPStatsFunc(t Transport) IngestGeoIPStats { + return func(o ...func(*IngestGeoIPStatsRequest)) (*Response, error) { + var r = IngestGeoIPStatsRequest{} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IngestGeoIPStats returns statistical information about geoip databases +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-stats-api.html. +// +type IngestGeoIPStats func(o ...func(*IngestGeoIPStatsRequest)) (*Response, error) + +// IngestGeoIPStatsRequest configures the Ingest GeoIP Stats API request. +// +type IngestGeoIPStatsRequest struct { + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r IngestGeoIPStatsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(len("/_ingest/geoip/stats")) + path.WriteString("/_ingest/geoip/stats") + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f IngestGeoIPStats) WithContext(v context.Context) func(*IngestGeoIPStatsRequest) { + return func(r *IngestGeoIPStatsRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f IngestGeoIPStats) WithPretty() func(*IngestGeoIPStatsRequest) { + return func(r *IngestGeoIPStatsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f IngestGeoIPStats) WithHuman() func(*IngestGeoIPStatsRequest) { + return func(r *IngestGeoIPStatsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f IngestGeoIPStats) WithErrorTrace() func(*IngestGeoIPStatsRequest) { + return func(r *IngestGeoIPStatsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f IngestGeoIPStats) WithFilterPath(v ...string) func(*IngestGeoIPStatsRequest) { + return func(r *IngestGeoIPStatsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f IngestGeoIPStats) WithHeader(h map[string]string) func(*IngestGeoIPStatsRequest) { + return func(r *IngestGeoIPStatsRequest) { + 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 IngestGeoIPStats) WithOpaqueID(s string) func(*IngestGeoIPStatsRequest) { + return func(r *IngestGeoIPStatsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.get_pipeline.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.get_pipeline.go index 3bf15cae..c718b078 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.get_pipeline.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.get_pipeline.go @@ -1,14 +1,28 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi import ( "context" "net/http" + "strconv" "strings" "time" ) @@ -37,6 +51,7 @@ type IngestGetPipelineRequest struct { PipelineID string MasterTimeout time.Duration + Summary *bool Pretty bool Human bool @@ -75,6 +90,10 @@ func (r IngestGetPipelineRequest) Do(ctx context.Context, transport Transport) ( params["master_timeout"] = formatDuration(r.MasterTimeout) } + if r.Summary != nil { + params["summary"] = strconv.FormatBool(*r.Summary) + } + if r.Pretty { params["pretty"] = "true" } @@ -158,6 +177,14 @@ func (f IngestGetPipeline) WithMasterTimeout(v time.Duration) func(*IngestGetPip } } +// WithSummary - return pipelines without their definitions (default: false). +// +func (f IngestGetPipeline) WithSummary(v bool) func(*IngestGetPipelineRequest) { + return func(r *IngestGetPipelineRequest) { + r.Summary = &v + } +} + // WithPretty makes the response body pretty-printed. // func (f IngestGetPipeline) WithPretty() func(*IngestGetPipelineRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.processor_grok.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.processor_grok.go index 293ccde2..5c9561a0 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.processor_grok.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.processor_grok.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.put_pipeline.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.put_pipeline.go index a10aad47..695d816d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.put_pipeline.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.put_pipeline.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -10,6 +23,7 @@ import ( "context" "io" "net/http" + "strconv" "strings" "time" ) @@ -39,6 +53,7 @@ type IngestPutPipelineRequest struct { Body io.Reader + IfVersion *int MasterTimeout time.Duration Timeout time.Duration @@ -73,6 +88,10 @@ func (r IngestPutPipelineRequest) Do(ctx context.Context, transport Transport) ( params = make(map[string]string) + if r.IfVersion != nil { + params["if_version"] = strconv.FormatInt(int64(*r.IfVersion), 10) + } + if r.MasterTimeout != 0 { params["master_timeout"] = formatDuration(r.MasterTimeout) } @@ -152,6 +171,14 @@ func (f IngestPutPipeline) WithContext(v context.Context) func(*IngestPutPipelin } } +// WithIfVersion - required version for optimistic concurrency control for pipeline updates. +// +func (f IngestPutPipeline) WithIfVersion(v int) func(*IngestPutPipelineRequest) { + return func(r *IngestPutPipelineRequest) { + r.IfVersion = &v + } +} + // WithMasterTimeout - explicit operation timeout for connection to master node. // func (f IngestPutPipeline) WithMasterTimeout(v time.Duration) func(*IngestPutPipelineRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.simulate.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.simulate.go index 2ba98e14..36fd759d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.simulate.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ingest.simulate.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -60,7 +73,7 @@ func (r IngestSimulateRequest) Do(ctx context.Context, transport Transport) (*Re params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_ingest") + 1 + len("pipeline") + 1 + len(r.PipelineID) + 1 + len("_simulate")) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.mget.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.mget.go index 5e9443d8..9497ad29 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.mget.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.mget.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -68,7 +81,7 @@ func (r MgetRequest) Do(ctx context.Context, transport Transport) (*Response, er params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(r.Index) + 1 + len(r.DocumentType) + 1 + len("_mget")) if r.Index != "" { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.msearch.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.msearch.go index a090cf9c..58487430 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.msearch.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.msearch.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -67,7 +80,7 @@ func (r MsearchRequest) Do(ctx context.Context, transport Transport) (*Response, params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len(strings.Join(r.DocumentType, ",")) + 1 + len("_msearch")) if len(r.Index) > 0 { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.msearch_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.msearch_template.go index c215d1cd..e0899721 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.msearch_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.msearch_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -65,7 +78,7 @@ func (r MsearchTemplateRequest) Do(ctx context.Context, transport Transport) (*R params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len(strings.Join(r.DocumentType, ",")) + 1 + len("_msearch") + 1 + len("template")) if len(r.Index) > 0 { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.mtermvectors.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.mtermvectors.go index 10337e8e..4a77341b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.mtermvectors.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.mtermvectors.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -72,7 +85,7 @@ func (r MtermvectorsRequest) Do(ctx context.Context, transport Transport) (*Resp params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(r.Index) + 1 + len(r.DocumentType) + 1 + len("_mtermvectors")) if r.Index != "" { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.clear_metering_archive.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.clear_metering_archive.go new file mode 100644 index 00000000..9208e183 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.clear_metering_archive.go @@ -0,0 +1,209 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.x: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" +) + +func newNodesClearMeteringArchiveFunc(t Transport) NodesClearMeteringArchive { + return func(max_archive_version *int, node_id []string, o ...func(*NodesClearMeteringArchiveRequest)) (*Response, error) { + var r = NodesClearMeteringArchiveRequest{NodeID: node_id, MaxArchiveVersion: max_archive_version} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// NodesClearMeteringArchive removes the archived repositories metering information present in the cluster. +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html. +// +type NodesClearMeteringArchive func(max_archive_version *int, node_id []string, o ...func(*NodesClearMeteringArchiveRequest)) (*Response, error) + +// NodesClearMeteringArchiveRequest configures the Nodes Clear Metering Archive API request. +// +type NodesClearMeteringArchiveRequest struct { + MaxArchiveVersion *int + NodeID []string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r NodesClearMeteringArchiveRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "DELETE" + + path.Grow(1 + len("_nodes") + 1 + len(strings.Join(r.NodeID, ",")) + 1 + len("_repositories_metering") + 1 + len(strconv.Itoa(*r.MaxArchiveVersion))) + path.WriteString("/") + path.WriteString("_nodes") + path.WriteString("/") + path.WriteString(strings.Join(r.NodeID, ",")) + path.WriteString("/") + path.WriteString("_repositories_metering") + path.WriteString("/") + path.WriteString(strconv.Itoa(*r.MaxArchiveVersion)) + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f NodesClearMeteringArchive) WithContext(v context.Context) func(*NodesClearMeteringArchiveRequest) { + return func(r *NodesClearMeteringArchiveRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f NodesClearMeteringArchive) WithPretty() func(*NodesClearMeteringArchiveRequest) { + return func(r *NodesClearMeteringArchiveRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f NodesClearMeteringArchive) WithHuman() func(*NodesClearMeteringArchiveRequest) { + return func(r *NodesClearMeteringArchiveRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f NodesClearMeteringArchive) WithErrorTrace() func(*NodesClearMeteringArchiveRequest) { + return func(r *NodesClearMeteringArchiveRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f NodesClearMeteringArchive) WithFilterPath(v ...string) func(*NodesClearMeteringArchiveRequest) { + return func(r *NodesClearMeteringArchiveRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f NodesClearMeteringArchive) WithHeader(h map[string]string) func(*NodesClearMeteringArchiveRequest) { + return func(r *NodesClearMeteringArchiveRequest) { + 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 NodesClearMeteringArchive) WithOpaqueID(s string) func(*NodesClearMeteringArchiveRequest) { + return func(r *NodesClearMeteringArchiveRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.clear_repositories_metering_archive.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.clear_repositories_metering_archive.go new file mode 100644 index 00000000..34fd788d --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.clear_repositories_metering_archive.go @@ -0,0 +1,209 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" +) + +func newNodesClearRepositoriesMeteringArchiveFunc(t Transport) NodesClearRepositoriesMeteringArchive { + return func(node_id []string, max_archive_version *int, o ...func(*NodesClearRepositoriesMeteringArchiveRequest)) (*Response, error) { + var r = NodesClearRepositoriesMeteringArchiveRequest{NodeID: node_id, MaxArchiveVersion: max_archive_version} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// NodesClearRepositoriesMeteringArchive removes the archived repositories metering information present in the cluster. +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html. +// +type NodesClearRepositoriesMeteringArchive func(node_id []string, max_archive_version *int, o ...func(*NodesClearRepositoriesMeteringArchiveRequest)) (*Response, error) + +// NodesClearRepositoriesMeteringArchiveRequest configures the Nodes Clear Repositories Metering Archive API request. +// +type NodesClearRepositoriesMeteringArchiveRequest struct { + MaxArchiveVersion *int + NodeID []string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r NodesClearRepositoriesMeteringArchiveRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "DELETE" + + path.Grow(1 + len("_nodes") + 1 + len(strings.Join(r.NodeID, ",")) + 1 + len("_repositories_metering") + 1 + len(strconv.Itoa(*r.MaxArchiveVersion))) + path.WriteString("/") + path.WriteString("_nodes") + path.WriteString("/") + path.WriteString(strings.Join(r.NodeID, ",")) + path.WriteString("/") + path.WriteString("_repositories_metering") + path.WriteString("/") + path.WriteString(strconv.Itoa(*r.MaxArchiveVersion)) + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f NodesClearRepositoriesMeteringArchive) WithContext(v context.Context) func(*NodesClearRepositoriesMeteringArchiveRequest) { + return func(r *NodesClearRepositoriesMeteringArchiveRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f NodesClearRepositoriesMeteringArchive) WithPretty() func(*NodesClearRepositoriesMeteringArchiveRequest) { + return func(r *NodesClearRepositoriesMeteringArchiveRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f NodesClearRepositoriesMeteringArchive) WithHuman() func(*NodesClearRepositoriesMeteringArchiveRequest) { + return func(r *NodesClearRepositoriesMeteringArchiveRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f NodesClearRepositoriesMeteringArchive) WithErrorTrace() func(*NodesClearRepositoriesMeteringArchiveRequest) { + return func(r *NodesClearRepositoriesMeteringArchiveRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f NodesClearRepositoriesMeteringArchive) WithFilterPath(v ...string) func(*NodesClearRepositoriesMeteringArchiveRequest) { + return func(r *NodesClearRepositoriesMeteringArchiveRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f NodesClearRepositoriesMeteringArchive) WithHeader(h map[string]string) func(*NodesClearRepositoriesMeteringArchiveRequest) { + return func(r *NodesClearRepositoriesMeteringArchiveRequest) { + 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 NodesClearRepositoriesMeteringArchive) WithOpaqueID(s string) func(*NodesClearRepositoriesMeteringArchiveRequest) { + return func(r *NodesClearRepositoriesMeteringArchiveRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.get_metering_info.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.get_metering_info.go new file mode 100644 index 00000000..2366a88a --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.get_metering_info.go @@ -0,0 +1,205 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.x: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newNodesGetMeteringInfoFunc(t Transport) NodesGetMeteringInfo { + return func(node_id []string, o ...func(*NodesGetMeteringInfoRequest)) (*Response, error) { + var r = NodesGetMeteringInfoRequest{NodeID: node_id} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// NodesGetMeteringInfo returns cluster repositories metering information. +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html. +// +type NodesGetMeteringInfo func(node_id []string, o ...func(*NodesGetMeteringInfoRequest)) (*Response, error) + +// NodesGetMeteringInfoRequest configures the Nodes Get Metering Info API request. +// +type NodesGetMeteringInfoRequest struct { + NodeID []string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r NodesGetMeteringInfoRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(1 + len("_nodes") + 1 + len(strings.Join(r.NodeID, ",")) + 1 + len("_repositories_metering")) + path.WriteString("/") + path.WriteString("_nodes") + path.WriteString("/") + path.WriteString(strings.Join(r.NodeID, ",")) + path.WriteString("/") + path.WriteString("_repositories_metering") + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f NodesGetMeteringInfo) WithContext(v context.Context) func(*NodesGetMeteringInfoRequest) { + return func(r *NodesGetMeteringInfoRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f NodesGetMeteringInfo) WithPretty() func(*NodesGetMeteringInfoRequest) { + return func(r *NodesGetMeteringInfoRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f NodesGetMeteringInfo) WithHuman() func(*NodesGetMeteringInfoRequest) { + return func(r *NodesGetMeteringInfoRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f NodesGetMeteringInfo) WithErrorTrace() func(*NodesGetMeteringInfoRequest) { + return func(r *NodesGetMeteringInfoRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f NodesGetMeteringInfo) WithFilterPath(v ...string) func(*NodesGetMeteringInfoRequest) { + return func(r *NodesGetMeteringInfoRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f NodesGetMeteringInfo) WithHeader(h map[string]string) func(*NodesGetMeteringInfoRequest) { + return func(r *NodesGetMeteringInfoRequest) { + 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 NodesGetMeteringInfo) WithOpaqueID(s string) func(*NodesGetMeteringInfoRequest) { + return func(r *NodesGetMeteringInfoRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.get_repositories_metering_info.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.get_repositories_metering_info.go new file mode 100644 index 00000000..621c2b60 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.get_repositories_metering_info.go @@ -0,0 +1,205 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newNodesGetRepositoriesMeteringInfoFunc(t Transport) NodesGetRepositoriesMeteringInfo { + return func(node_id []string, o ...func(*NodesGetRepositoriesMeteringInfoRequest)) (*Response, error) { + var r = NodesGetRepositoriesMeteringInfoRequest{NodeID: node_id} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// NodesGetRepositoriesMeteringInfo returns cluster repositories metering information. +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html. +// +type NodesGetRepositoriesMeteringInfo func(node_id []string, o ...func(*NodesGetRepositoriesMeteringInfoRequest)) (*Response, error) + +// NodesGetRepositoriesMeteringInfoRequest configures the Nodes Get Repositories Metering Info API request. +// +type NodesGetRepositoriesMeteringInfoRequest struct { + NodeID []string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r NodesGetRepositoriesMeteringInfoRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(1 + len("_nodes") + 1 + len(strings.Join(r.NodeID, ",")) + 1 + len("_repositories_metering")) + path.WriteString("/") + path.WriteString("_nodes") + path.WriteString("/") + path.WriteString(strings.Join(r.NodeID, ",")) + path.WriteString("/") + path.WriteString("_repositories_metering") + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f NodesGetRepositoriesMeteringInfo) WithContext(v context.Context) func(*NodesGetRepositoriesMeteringInfoRequest) { + return func(r *NodesGetRepositoriesMeteringInfoRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f NodesGetRepositoriesMeteringInfo) WithPretty() func(*NodesGetRepositoriesMeteringInfoRequest) { + return func(r *NodesGetRepositoriesMeteringInfoRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f NodesGetRepositoriesMeteringInfo) WithHuman() func(*NodesGetRepositoriesMeteringInfoRequest) { + return func(r *NodesGetRepositoriesMeteringInfoRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f NodesGetRepositoriesMeteringInfo) WithErrorTrace() func(*NodesGetRepositoriesMeteringInfoRequest) { + return func(r *NodesGetRepositoriesMeteringInfoRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f NodesGetRepositoriesMeteringInfo) WithFilterPath(v ...string) func(*NodesGetRepositoriesMeteringInfoRequest) { + return func(r *NodesGetRepositoriesMeteringInfoRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f NodesGetRepositoriesMeteringInfo) WithHeader(h map[string]string) func(*NodesGetRepositoriesMeteringInfoRequest) { + return func(r *NodesGetRepositoriesMeteringInfoRequest) { + 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 NodesGetRepositoriesMeteringInfo) WithOpaqueID(s string) func(*NodesGetRepositoriesMeteringInfoRequest) { + return func(r *NodesGetRepositoriesMeteringInfoRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.hot_threads.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.hot_threads.go index ce0c501d..122e2b2c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.hot_threads.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.hot_threads.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -40,6 +53,7 @@ type NodesHotThreadsRequest struct { IgnoreIdleThreads *bool Interval time.Duration Snapshots *int + Sort string Threads *int Timeout time.Duration DocumentType string @@ -91,6 +105,10 @@ func (r NodesHotThreadsRequest) Do(ctx context.Context, transport Transport) (*R params["snapshots"] = strconv.FormatInt(int64(*r.Snapshots), 10) } + if r.Sort != "" { + params["sort"] = r.Sort + } + if r.Threads != nil { params["threads"] = strconv.FormatInt(int64(*r.Threads), 10) } @@ -202,6 +220,14 @@ func (f NodesHotThreads) WithSnapshots(v int) func(*NodesHotThreadsRequest) { } } +// WithSort - the sort order for 'cpu' type (default: total). +// +func (f NodesHotThreads) WithSort(v string) func(*NodesHotThreadsRequest) { + return func(r *NodesHotThreadsRequest) { + r.Sort = v + } +} + // WithThreads - specify the number of threads to provide information for (default: 3). // func (f NodesHotThreads) WithThreads(v int) func(*NodesHotThreadsRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.info.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.info.go index d3fdba96..884c7070 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.info.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.info.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -151,7 +164,7 @@ func (f NodesInfo) WithContext(v context.Context) func(*NodesInfoRequest) { } } -// WithMetric - a list of metrics you wish returned. leave empty to return all.. +// WithMetric - a list of metrics you wish returned. leave empty to return all metrics.. // func (f NodesInfo) WithMetric(v ...string) func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.reload_secure_settings.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.reload_secure_settings.go index c442b3b6..07a07381 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.reload_secure_settings.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.reload_secure_settings.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.stats.go index e5adb1a9..7039eb09 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -44,6 +57,7 @@ type NodesStatsRequest struct { Fields []string Groups *bool IncludeSegmentFileSizes *bool + IncludeUnloadedSegments *bool Level string Timeout time.Duration Types []string @@ -109,6 +123,10 @@ func (r NodesStatsRequest) Do(ctx context.Context, transport Transport) (*Respon params["include_segment_file_sizes"] = strconv.FormatBool(*r.IncludeSegmentFileSizes) } + if r.IncludeUnloadedSegments != nil { + params["include_unloaded_segments"] = strconv.FormatBool(*r.IncludeUnloadedSegments) + } + if r.Level != "" { params["level"] = r.Level } @@ -252,6 +270,14 @@ func (f NodesStats) WithIncludeSegmentFileSizes(v bool) func(*NodesStatsRequest) } } +// WithIncludeUnloadedSegments - if set to true segment stats will include stats for segments that are not currently loaded into memory. +// +func (f NodesStats) WithIncludeUnloadedSegments(v bool) func(*NodesStatsRequest) { + return func(r *NodesStatsRequest) { + r.IncludeUnloadedSegments = &v + } +} + // WithLevel - return indices stats aggregated at index, node or shard level. // func (f NodesStats) WithLevel(v string) func(*NodesStatsRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.usage.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.usage.go index 1175eb2f..d3f87f05 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.usage.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.nodes.usage.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ping.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ping.go index 06cc0bad..79a81e59 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ping.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.ping.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.put_script.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.put_script.go index 939d097f..85cc7ae0 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.put_script.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.put_script.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.rank_eval.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.rank_eval.go index b92a7196..231af553 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.rank_eval.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.rank_eval.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -28,8 +41,6 @@ func newRankEvalFunc(t Transport) RankEval { // RankEval allows to evaluate the quality of ranked search results over a set of typical search queries // -// This API is experimental. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html. // type RankEval func(body io.Reader, o ...func(*RankEvalRequest)) (*Response, error) @@ -65,7 +76,7 @@ func (r RankEvalRequest) Do(ctx context.Context, transport Transport) (*Response params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len("_rank_eval")) if len(r.Index) > 0 { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.reindex.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.reindex.go index 4e204aaa..aaff7d3c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.reindex.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.reindex.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.reindex_rethrottle.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.reindex_rethrottle.go index bd748bb3..61637df5 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.reindex_rethrottle.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.reindex_rethrottle.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.render_search_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.render_search_template.go index d913c141..c4b14197 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.render_search_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.render_search_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,7 +40,7 @@ func newRenderSearchTemplateFunc(t Transport) RenderSearchTemplate { // RenderSearchTemplate allows to use the Mustache language to pre-render a search definition. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html. // type RenderSearchTemplate func(o ...func(*RenderSearchTemplateRequest)) (*Response, error) @@ -57,7 +70,7 @@ func (r RenderSearchTemplateRequest) Do(ctx context.Context, transport Transport params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_render") + 1 + len("template") + 1 + len(r.TemplateID)) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.scripts_painless_execute.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.scripts_painless_execute.go index 708117a7..e9c005c3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.scripts_painless_execute.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.scripts_painless_execute.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -57,7 +70,7 @@ func (r ScriptsPainlessExecuteRequest) Do(ctx context.Context, transport Transpo params map[string]string ) - method = "GET" + method = "POST" path.Grow(len("/_scripts/painless/_execute")) path.WriteString("/_scripts/painless/_execute") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.scroll.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.scroll.go index 54adfaaa..9f546fab 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.scroll.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.scroll.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -62,7 +75,7 @@ func (r ScrollRequest) Do(ctx context.Context, transport Transport) (*Response, params map[string]string ) - method = "GET" + method = "POST" path.Grow(len("/_search/scroll")) path.WriteString("/_search/scroll") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search.go index 7a1cceb6..c02be885 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -105,7 +118,7 @@ func (r SearchRequest) Do(ctx context.Context, transport Transport) (*Response, params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len(strings.Join(r.DocumentType, ",")) + 1 + len("_search")) if len(r.Index) > 0 { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search_mvt.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search_mvt.go new file mode 100644 index 00000000..f6985742 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search_mvt.go @@ -0,0 +1,312 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "fmt" + "io" + "net/http" + "strconv" + "strings" +) + +func newSearchMvtFunc(t Transport) SearchMvt { + return func(index []string, field string, zoom *int, x *int, y *int, o ...func(*SearchMvtRequest)) (*Response, error) { + var r = SearchMvtRequest{Index: index, X: x, Y: y, Field: field, Zoom: zoom} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SearchMvt searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile. +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html. +// +type SearchMvt func(index []string, field string, zoom *int, x *int, y *int, o ...func(*SearchMvtRequest)) (*Response, error) + +// SearchMvtRequest configures the Search Mvt API request. +// +type SearchMvtRequest struct { + Index []string + + Body io.Reader + + Field string + X *int + Y *int + Zoom *int + + ExactBounds *bool + Extent *int + GridPrecision *int + GridType string + Size *int + TrackTotalHits interface{} + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SearchMvtRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len("_mvt") + 1 + len(r.Field) + 1 + len(strconv.Itoa(*r.Zoom)) + 1 + len(strconv.Itoa(*r.X)) + 1 + len(strconv.Itoa(*r.Y))) + path.WriteString("/") + path.WriteString(strings.Join(r.Index, ",")) + path.WriteString("/") + path.WriteString("_mvt") + path.WriteString("/") + path.WriteString(r.Field) + path.WriteString("/") + path.WriteString(strconv.Itoa(*r.Zoom)) + path.WriteString("/") + path.WriteString(strconv.Itoa(*r.X)) + path.WriteString("/") + path.WriteString(strconv.Itoa(*r.Y)) + + params = make(map[string]string) + + if r.ExactBounds != nil { + params["exact_bounds"] = strconv.FormatBool(*r.ExactBounds) + } + + if r.Extent != nil { + params["extent"] = strconv.FormatInt(int64(*r.Extent), 10) + } + + if r.GridPrecision != nil { + params["grid_precision"] = strconv.FormatInt(int64(*r.GridPrecision), 10) + } + + if r.GridType != "" { + params["grid_type"] = r.GridType + } + + if r.Size != nil { + params["size"] = strconv.FormatInt(int64(*r.Size), 10) + } + + if r.TrackTotalHits != nil { + params["track_total_hits"] = fmt.Sprintf("%v", r.TrackTotalHits) + } + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SearchMvt) WithContext(v context.Context) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.ctx = v + } +} + +// WithBody - Search request body.. +// +func (f SearchMvt) WithBody(v io.Reader) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.Body = v + } +} + +// WithExactBounds - if false, the meta layer's feature is the bounding box of the tile. if true, the meta layer's feature is a bounding box resulting from a `geo_bounds` aggregation.. +// +func (f SearchMvt) WithExactBounds(v bool) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.ExactBounds = &v + } +} + +// WithExtent - size, in pixels, of a side of the vector tile.. +// +func (f SearchMvt) WithExtent(v int) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.Extent = &v + } +} + +// WithGridPrecision - additional zoom levels available through the aggs layer. accepts 0-8.. +// +func (f SearchMvt) WithGridPrecision(v int) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.GridPrecision = &v + } +} + +// WithGridType - determines the geometry type for features in the aggs layer.. +// +func (f SearchMvt) WithGridType(v string) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.GridType = v + } +} + +// WithSize - maximum number of features to return in the hits layer. accepts 0-10000.. +// +func (f SearchMvt) WithSize(v int) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.Size = &v + } +} + +// WithTrackTotalHits - indicate if the number of documents that match the query should be tracked. a number can also be specified, to accurately track the total hit count up to the number.. +// +func (f SearchMvt) WithTrackTotalHits(v interface{}) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.TrackTotalHits = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SearchMvt) WithPretty() func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SearchMvt) WithHuman() func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SearchMvt) WithErrorTrace() func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SearchMvt) WithFilterPath(v ...string) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SearchMvt) WithHeader(h map[string]string) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + 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 SearchMvt) WithOpaqueID(s string) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search_shards.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search_shards.go index cafe84df..13555fc3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search_shards.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search_shards.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -62,7 +75,7 @@ func (r SearchShardsRequest) Do(ctx context.Context, transport Transport) (*Resp params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len("_search_shards")) if len(r.Index) > 0 { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search_template.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search_template.go index b778ad31..2d148b90 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search_template.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.search_template.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -74,7 +87,7 @@ func (r SearchTemplateRequest) Do(ctx context.Context, transport Transport) (*Re params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len(strings.Join(r.DocumentType, ",")) + 1 + len("_search") + 1 + len("template")) if len(r.Index) > 0 { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.shutdown.delete_node.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.shutdown.delete_node.go new file mode 100644 index 00000000..840f54f6 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.shutdown.delete_node.go @@ -0,0 +1,203 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newShutdownDeleteNodeFunc(t Transport) ShutdownDeleteNode { + return func(node_id string, o ...func(*ShutdownDeleteNodeRequest)) (*Response, error) { + var r = ShutdownDeleteNodeRequest{NodeID: node_id} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// ShutdownDeleteNode removes a node from the shutdown list. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current. +// +type ShutdownDeleteNode func(node_id string, o ...func(*ShutdownDeleteNodeRequest)) (*Response, error) + +// ShutdownDeleteNodeRequest configures the Shutdown Delete Node API request. +// +type ShutdownDeleteNodeRequest struct { + NodeID string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r ShutdownDeleteNodeRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "DELETE" + + path.Grow(1 + len("_nodes") + 1 + len(r.NodeID) + 1 + len("shutdown")) + path.WriteString("/") + path.WriteString("_nodes") + path.WriteString("/") + path.WriteString(r.NodeID) + path.WriteString("/") + path.WriteString("shutdown") + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f ShutdownDeleteNode) WithContext(v context.Context) func(*ShutdownDeleteNodeRequest) { + return func(r *ShutdownDeleteNodeRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f ShutdownDeleteNode) WithPretty() func(*ShutdownDeleteNodeRequest) { + return func(r *ShutdownDeleteNodeRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f ShutdownDeleteNode) WithHuman() func(*ShutdownDeleteNodeRequest) { + return func(r *ShutdownDeleteNodeRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f ShutdownDeleteNode) WithErrorTrace() func(*ShutdownDeleteNodeRequest) { + return func(r *ShutdownDeleteNodeRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f ShutdownDeleteNode) WithFilterPath(v ...string) func(*ShutdownDeleteNodeRequest) { + return func(r *ShutdownDeleteNodeRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f ShutdownDeleteNode) WithHeader(h map[string]string) func(*ShutdownDeleteNodeRequest) { + return func(r *ShutdownDeleteNodeRequest) { + 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 ShutdownDeleteNode) WithOpaqueID(s string) func(*ShutdownDeleteNodeRequest) { + return func(r *ShutdownDeleteNodeRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.shutdown.get_node.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.shutdown.get_node.go new file mode 100644 index 00000000..a034272d --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.shutdown.get_node.go @@ -0,0 +1,213 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newShutdownGetNodeFunc(t Transport) ShutdownGetNode { + return func(o ...func(*ShutdownGetNodeRequest)) (*Response, error) { + var r = ShutdownGetNodeRequest{} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// ShutdownGetNode 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 supported. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current. +// +type ShutdownGetNode func(o ...func(*ShutdownGetNodeRequest)) (*Response, error) + +// ShutdownGetNodeRequest configures the Shutdown Get Node API request. +// +type ShutdownGetNodeRequest struct { + NodeID string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r ShutdownGetNodeRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(1 + len("_nodes") + 1 + len(r.NodeID) + 1 + len("shutdown")) + path.WriteString("/") + path.WriteString("_nodes") + if r.NodeID != "" { + path.WriteString("/") + path.WriteString(r.NodeID) + } + path.WriteString("/") + path.WriteString("shutdown") + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f ShutdownGetNode) WithContext(v context.Context) func(*ShutdownGetNodeRequest) { + return func(r *ShutdownGetNodeRequest) { + r.ctx = v + } +} + +// WithNodeID - which node for which to retrieve the shutdown status. +// +func (f ShutdownGetNode) WithNodeID(v string) func(*ShutdownGetNodeRequest) { + return func(r *ShutdownGetNodeRequest) { + r.NodeID = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f ShutdownGetNode) WithPretty() func(*ShutdownGetNodeRequest) { + return func(r *ShutdownGetNodeRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f ShutdownGetNode) WithHuman() func(*ShutdownGetNodeRequest) { + return func(r *ShutdownGetNodeRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f ShutdownGetNode) WithErrorTrace() func(*ShutdownGetNodeRequest) { + return func(r *ShutdownGetNodeRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f ShutdownGetNode) WithFilterPath(v ...string) func(*ShutdownGetNodeRequest) { + return func(r *ShutdownGetNodeRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f ShutdownGetNode) WithHeader(h map[string]string) func(*ShutdownGetNodeRequest) { + return func(r *ShutdownGetNodeRequest) { + 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 ShutdownGetNode) WithOpaqueID(s string) func(*ShutdownGetNodeRequest) { + return func(r *ShutdownGetNodeRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.shutdown.put_node.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.shutdown.put_node.go new file mode 100644 index 00000000..c26c093d --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.shutdown.put_node.go @@ -0,0 +1,210 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newShutdownPutNodeFunc(t Transport) ShutdownPutNode { + return func(body io.Reader, node_id string, o ...func(*ShutdownPutNodeRequest)) (*Response, error) { + var r = ShutdownPutNodeRequest{Body: body, NodeID: node_id} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// ShutdownPutNode adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current. +// +type ShutdownPutNode func(body io.Reader, node_id string, o ...func(*ShutdownPutNodeRequest)) (*Response, error) + +// ShutdownPutNodeRequest configures the Shutdown Put Node API request. +// +type ShutdownPutNodeRequest struct { + Body io.Reader + + NodeID string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r ShutdownPutNodeRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "PUT" + + path.Grow(1 + len("_nodes") + 1 + len(r.NodeID) + 1 + len("shutdown")) + path.WriteString("/") + path.WriteString("_nodes") + path.WriteString("/") + path.WriteString(r.NodeID) + path.WriteString("/") + path.WriteString("shutdown") + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f ShutdownPutNode) WithContext(v context.Context) func(*ShutdownPutNodeRequest) { + return func(r *ShutdownPutNodeRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f ShutdownPutNode) WithPretty() func(*ShutdownPutNodeRequest) { + return func(r *ShutdownPutNodeRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f ShutdownPutNode) WithHuman() func(*ShutdownPutNodeRequest) { + return func(r *ShutdownPutNodeRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f ShutdownPutNode) WithErrorTrace() func(*ShutdownPutNodeRequest) { + return func(r *ShutdownPutNodeRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f ShutdownPutNode) WithFilterPath(v ...string) func(*ShutdownPutNodeRequest) { + return func(r *ShutdownPutNodeRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f ShutdownPutNode) WithHeader(h map[string]string) func(*ShutdownPutNodeRequest) { + return func(r *ShutdownPutNodeRequest) { + 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 ShutdownPutNode) WithOpaqueID(s string) func(*ShutdownPutNodeRequest) { + return func(r *ShutdownPutNodeRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.cleanup_repository.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.cleanup_repository.go index 0d61aca7..2f11f194 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.cleanup_repository.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.cleanup_repository.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.clone.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.clone.go index f9fd12b2..eae3e6b1 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.clone.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.clone.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.create.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.create.go index 1757e84f..239efda4 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.create.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.create.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.create_repository.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.create_repository.go index a8c0715c..6e0dbaca 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.create_repository.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.create_repository.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.delete.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.delete.go index b181a868..2f5b5a7d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.delete.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.delete.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.delete_repository.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.delete_repository.go index eb9620ea..d7a41034 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.delete_repository.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.delete_repository.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.get.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.get.go index fa553109..9635f18a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.get.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.get.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -39,6 +52,8 @@ type SnapshotGetRequest struct { Snapshot []string IgnoreUnavailable *bool + IncludeRepository *bool + IndexDetails *bool MasterTimeout time.Duration Verbose *bool @@ -77,6 +92,14 @@ func (r SnapshotGetRequest) Do(ctx context.Context, transport Transport) (*Respo params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) } + if r.IncludeRepository != nil { + params["include_repository"] = strconv.FormatBool(*r.IncludeRepository) + } + + if r.IndexDetails != nil { + params["index_details"] = strconv.FormatBool(*r.IndexDetails) + } + if r.MasterTimeout != 0 { params["master_timeout"] = formatDuration(r.MasterTimeout) } @@ -160,6 +183,22 @@ func (f SnapshotGet) WithIgnoreUnavailable(v bool) func(*SnapshotGetRequest) { } } +// WithIncludeRepository - whether to include the repository name in the snapshot info. defaults to true.. +// +func (f SnapshotGet) WithIncludeRepository(v bool) func(*SnapshotGetRequest) { + return func(r *SnapshotGetRequest) { + r.IncludeRepository = &v + } +} + +// WithIndexDetails - whether to include details of each index in the snapshot, if those details are available. defaults to false.. +// +func (f SnapshotGet) WithIndexDetails(v bool) func(*SnapshotGetRequest) { + return func(r *SnapshotGetRequest) { + r.IndexDetails = &v + } +} + // WithMasterTimeout - explicit operation timeout for connection to master node. // func (f SnapshotGet) WithMasterTimeout(v time.Duration) func(*SnapshotGetRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.get_features.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.get_features.go deleted file mode 100644 index 0a838aa5..00000000 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.get_features.go +++ /dev/null @@ -1,198 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// Code generated from specification version 7.12.0: DO NOT EDIT - -package esapi - -import ( - "context" - "net/http" - "strings" - "time" -) - -func newSnapshotGetFeaturesFunc(t Transport) SnapshotGetFeatures { - return func(o ...func(*SnapshotGetFeaturesRequest)) (*Response, error) { - var r = SnapshotGetFeaturesRequest{} - for _, f := range o { - f(&r) - } - return r.Do(r.ctx, t) - } -} - -// ----- API Definition ------------------------------------------------------- - -// SnapshotGetFeatures returns a list of features which can be snapshotted in this cluster. -// -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. -// -type SnapshotGetFeatures func(o ...func(*SnapshotGetFeaturesRequest)) (*Response, error) - -// SnapshotGetFeaturesRequest configures the Snapshot Get Features API request. -// -type SnapshotGetFeaturesRequest struct { - MasterTimeout time.Duration - - Pretty bool - Human bool - ErrorTrace bool - FilterPath []string - - Header http.Header - - ctx context.Context -} - -// Do executes the request and returns response or error. -// -func (r SnapshotGetFeaturesRequest) Do(ctx context.Context, transport Transport) (*Response, error) { - var ( - method string - path strings.Builder - params map[string]string - ) - - method = "GET" - - path.Grow(len("/_snapshottable_features")) - path.WriteString("/_snapshottable_features") - - params = make(map[string]string) - - if r.MasterTimeout != 0 { - params["master_timeout"] = formatDuration(r.MasterTimeout) - } - - if r.Pretty { - params["pretty"] = "true" - } - - if r.Human { - params["human"] = "true" - } - - if r.ErrorTrace { - params["error_trace"] = "true" - } - - if len(r.FilterPath) > 0 { - params["filter_path"] = strings.Join(r.FilterPath, ",") - } - - req, err := newRequest(method, path.String(), nil) - if err != nil { - 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) - } - - res, err := transport.Perform(req) - if err != nil { - return nil, err - } - - response := Response{ - StatusCode: res.StatusCode, - Body: res.Body, - Header: res.Header, - } - - return &response, nil -} - -// WithContext sets the request context. -// -func (f SnapshotGetFeatures) WithContext(v context.Context) func(*SnapshotGetFeaturesRequest) { - return func(r *SnapshotGetFeaturesRequest) { - r.ctx = v - } -} - -// WithMasterTimeout - explicit operation timeout for connection to master node. -// -func (f SnapshotGetFeatures) WithMasterTimeout(v time.Duration) func(*SnapshotGetFeaturesRequest) { - return func(r *SnapshotGetFeaturesRequest) { - r.MasterTimeout = v - } -} - -// WithPretty makes the response body pretty-printed. -// -func (f SnapshotGetFeatures) WithPretty() func(*SnapshotGetFeaturesRequest) { - return func(r *SnapshotGetFeaturesRequest) { - r.Pretty = true - } -} - -// WithHuman makes statistical values human-readable. -// -func (f SnapshotGetFeatures) WithHuman() func(*SnapshotGetFeaturesRequest) { - return func(r *SnapshotGetFeaturesRequest) { - r.Human = true - } -} - -// WithErrorTrace includes the stack trace for errors in the response body. -// -func (f SnapshotGetFeatures) WithErrorTrace() func(*SnapshotGetFeaturesRequest) { - return func(r *SnapshotGetFeaturesRequest) { - r.ErrorTrace = true - } -} - -// WithFilterPath filters the properties of the response body. -// -func (f SnapshotGetFeatures) WithFilterPath(v ...string) func(*SnapshotGetFeaturesRequest) { - return func(r *SnapshotGetFeaturesRequest) { - r.FilterPath = v - } -} - -// WithHeader adds the headers to the HTTP request. -// -func (f SnapshotGetFeatures) WithHeader(h map[string]string) func(*SnapshotGetFeaturesRequest) { - return func(r *SnapshotGetFeaturesRequest) { - 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 SnapshotGetFeatures) WithOpaqueID(s string) func(*SnapshotGetFeaturesRequest) { - return func(r *SnapshotGetFeaturesRequest) { - if r.Header == nil { - r.Header = make(http.Header) - } - r.Header.Set("X-Opaque-Id", s) - } -} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.get_repository.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.get_repository.go index 5acf2b35..f4d079bd 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.get_repository.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.get_repository.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.repository_analyze.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.repository_analyze.go new file mode 100644 index 00000000..6ce0cba8 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.repository_analyze.go @@ -0,0 +1,349 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" + "time" +) + +func newSnapshotRepositoryAnalyzeFunc(t Transport) SnapshotRepositoryAnalyze { + return func(repository string, o ...func(*SnapshotRepositoryAnalyzeRequest)) (*Response, error) { + var r = SnapshotRepositoryAnalyzeRequest{Repository: repository} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SnapshotRepositoryAnalyze analyzes a repository for correctness and performance +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// +type SnapshotRepositoryAnalyze func(repository string, o ...func(*SnapshotRepositoryAnalyzeRequest)) (*Response, error) + +// SnapshotRepositoryAnalyzeRequest configures the Snapshot Repository Analyze API request. +// +type SnapshotRepositoryAnalyzeRequest struct { + Repository string + + BlobCount *int + Concurrency *int + Detailed *bool + EarlyReadNodeCount *int + MaxBlobSize string + MaxTotalDataSize string + RareActionProbability *int + RarelyAbortWrites *bool + ReadNodeCount *int + Seed *int + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SnapshotRepositoryAnalyzeRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(1 + len("_snapshot") + 1 + len(r.Repository) + 1 + len("_analyze")) + path.WriteString("/") + path.WriteString("_snapshot") + path.WriteString("/") + path.WriteString(r.Repository) + path.WriteString("/") + path.WriteString("_analyze") + + params = make(map[string]string) + + if r.BlobCount != nil { + params["blob_count"] = strconv.FormatInt(int64(*r.BlobCount), 10) + } + + if r.Concurrency != nil { + params["concurrency"] = strconv.FormatInt(int64(*r.Concurrency), 10) + } + + if r.Detailed != nil { + params["detailed"] = strconv.FormatBool(*r.Detailed) + } + + if r.EarlyReadNodeCount != nil { + params["early_read_node_count"] = strconv.FormatInt(int64(*r.EarlyReadNodeCount), 10) + } + + if r.MaxBlobSize != "" { + params["max_blob_size"] = r.MaxBlobSize + } + + if r.MaxTotalDataSize != "" { + params["max_total_data_size"] = r.MaxTotalDataSize + } + + if r.RareActionProbability != nil { + params["rare_action_probability"] = strconv.FormatInt(int64(*r.RareActionProbability), 10) + } + + if r.RarelyAbortWrites != nil { + params["rarely_abort_writes"] = strconv.FormatBool(*r.RarelyAbortWrites) + } + + if r.ReadNodeCount != nil { + params["read_node_count"] = strconv.FormatInt(int64(*r.ReadNodeCount), 10) + } + + if r.Seed != nil { + params["seed"] = strconv.FormatInt(int64(*r.Seed), 10) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SnapshotRepositoryAnalyze) WithContext(v context.Context) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.ctx = v + } +} + +// WithBlobCount - number of blobs to create during the test. defaults to 100.. +// +func (f SnapshotRepositoryAnalyze) WithBlobCount(v int) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.BlobCount = &v + } +} + +// WithConcurrency - number of operations to run concurrently during the test. defaults to 10.. +// +func (f SnapshotRepositoryAnalyze) WithConcurrency(v int) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.Concurrency = &v + } +} + +// WithDetailed - whether to return detailed results or a summary. defaults to 'false' so that only the summary is returned.. +// +func (f SnapshotRepositoryAnalyze) WithDetailed(v bool) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.Detailed = &v + } +} + +// WithEarlyReadNodeCount - number of nodes on which to perform an early read on a blob, i.e. before writing has completed. early reads are rare actions so the 'rare_action_probability' parameter is also relevant. defaults to 2.. +// +func (f SnapshotRepositoryAnalyze) WithEarlyReadNodeCount(v int) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.EarlyReadNodeCount = &v + } +} + +// WithMaxBlobSize - maximum size of a blob to create during the test, e.g '1gb' or '100mb'. defaults to '10mb'.. +// +func (f SnapshotRepositoryAnalyze) WithMaxBlobSize(v string) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.MaxBlobSize = v + } +} + +// WithMaxTotalDataSize - maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. defaults to '1gb'.. +// +func (f SnapshotRepositoryAnalyze) WithMaxTotalDataSize(v string) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.MaxTotalDataSize = v + } +} + +// WithRareActionProbability - probability of taking a rare action such as an early read or an overwrite. defaults to 0.02.. +// +func (f SnapshotRepositoryAnalyze) WithRareActionProbability(v int) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.RareActionProbability = &v + } +} + +// WithRarelyAbortWrites - whether to rarely abort writes before they complete. defaults to 'true'.. +// +func (f SnapshotRepositoryAnalyze) WithRarelyAbortWrites(v bool) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.RarelyAbortWrites = &v + } +} + +// WithReadNodeCount - number of nodes on which to read a blob after writing. defaults to 10.. +// +func (f SnapshotRepositoryAnalyze) WithReadNodeCount(v int) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.ReadNodeCount = &v + } +} + +// WithSeed - seed for the random number generator used to create the test workload. defaults to a random value.. +// +func (f SnapshotRepositoryAnalyze) WithSeed(v int) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.Seed = &v + } +} + +// WithTimeout - explicit operation timeout. defaults to '30s'.. +// +func (f SnapshotRepositoryAnalyze) WithTimeout(v time.Duration) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SnapshotRepositoryAnalyze) WithPretty() func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SnapshotRepositoryAnalyze) WithHuman() func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SnapshotRepositoryAnalyze) WithErrorTrace() func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SnapshotRepositoryAnalyze) WithFilterPath(v ...string) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SnapshotRepositoryAnalyze) WithHeader(h map[string]string) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + 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 SnapshotRepositoryAnalyze) WithOpaqueID(s string) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.restore.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.restore.go index f8631c22..ca038e29 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.restore.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.restore.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.status.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.status.go index 4e2491d3..5c6a5c4d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.status.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.status.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// Code generated from specification version 7.12.0: DO NOT EDIT +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.verify_repository.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.verify_repository.go index 556a53b4..435a9f97 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.verify_repository.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.snapshot.verify_repository.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.cancel.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.cancel.go index 479d2c33..8c2e7b24 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.cancel.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.cancel.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.get.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.get.go index 124cdc21..d8d4308e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.get.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.get.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.list.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.list.go index e5792253..3a498b4f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.list.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.tasks.list.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.terms_enum.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.terms_enum.go new file mode 100644 index 00000000..2e909a1d --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.terms_enum.go @@ -0,0 +1,216 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newTermsEnumFunc(t Transport) TermsEnum { + return func(index []string, o ...func(*TermsEnumRequest)) (*Response, error) { + var r = TermsEnumRequest{Index: index} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// TermsEnum 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 auto-complete scenarios. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html. +// +type TermsEnum func(index []string, o ...func(*TermsEnumRequest)) (*Response, error) + +// TermsEnumRequest configures the Terms Enum API request. +// +type TermsEnumRequest struct { + Index []string + + Body io.Reader + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r TermsEnumRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len("_terms_enum")) + path.WriteString("/") + path.WriteString(strings.Join(r.Index, ",")) + path.WriteString("/") + path.WriteString("_terms_enum") + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f TermsEnum) WithContext(v context.Context) func(*TermsEnumRequest) { + return func(r *TermsEnumRequest) { + r.ctx = v + } +} + +// WithBody - field name, string which is the prefix expected in matching terms, timeout and size for max number of results. +// +func (f TermsEnum) WithBody(v io.Reader) func(*TermsEnumRequest) { + return func(r *TermsEnumRequest) { + r.Body = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f TermsEnum) WithPretty() func(*TermsEnumRequest) { + return func(r *TermsEnumRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f TermsEnum) WithHuman() func(*TermsEnumRequest) { + return func(r *TermsEnumRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f TermsEnum) WithErrorTrace() func(*TermsEnumRequest) { + return func(r *TermsEnumRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f TermsEnum) WithFilterPath(v ...string) func(*TermsEnumRequest) { + return func(r *TermsEnumRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f TermsEnum) WithHeader(h map[string]string) func(*TermsEnumRequest) { + return func(r *TermsEnumRequest) { + 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 TermsEnum) WithOpaqueID(s string) func(*TermsEnumRequest) { + return func(r *TermsEnumRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.termvectors.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.termvectors.go index 0b4f5e62..b3b4c276 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.termvectors.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.termvectors.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -72,7 +85,7 @@ func (r TermvectorsRequest) Do(ctx context.Context, transport Transport) (*Respo params map[string]string ) - method = "GET" + method = "POST" if r.DocumentType == "" { r.DocumentType = "_doc" diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update.go index e9af3525..4e365087 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update_by_query.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update_by_query.go index 1d8c0da4..2bda821c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update_by_query.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update_by_query.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -68,9 +81,6 @@ type UpdateByQueryRequest struct { Size *int Slices interface{} Sort []string - Source []string - SourceExcludes []string - SourceIncludes []string Stats []string TerminateAfter *int Timeout time.Duration @@ -212,18 +222,6 @@ func (r UpdateByQueryRequest) Do(ctx context.Context, transport Transport) (*Res params["sort"] = strings.Join(r.Sort, ",") } - if len(r.Source) > 0 { - params["_source"] = strings.Join(r.Source, ",") - } - - if len(r.SourceExcludes) > 0 { - params["_source_excludes"] = strings.Join(r.SourceExcludes, ",") - } - - if len(r.SourceIncludes) > 0 { - params["_source_includes"] = strings.Join(r.SourceIncludes, ",") - } - if len(r.Stats) > 0 { params["stats"] = strings.Join(r.Stats, ",") } @@ -539,30 +537,6 @@ func (f UpdateByQuery) WithSort(v ...string) func(*UpdateByQueryRequest) { } } -// WithSource - true or false to return the _source field or not, or a list of fields to return. -// -func (f UpdateByQuery) WithSource(v ...string) func(*UpdateByQueryRequest) { - return func(r *UpdateByQueryRequest) { - r.Source = v - } -} - -// WithSourceExcludes - a list of fields to exclude from the returned _source field. -// -func (f UpdateByQuery) WithSourceExcludes(v ...string) func(*UpdateByQueryRequest) { - return func(r *UpdateByQueryRequest) { - r.SourceExcludes = v - } -} - -// WithSourceIncludes - a list of fields to extract and return from the _source field. -// -func (f UpdateByQuery) WithSourceIncludes(v ...string) func(*UpdateByQueryRequest) { - return func(r *UpdateByQueryRequest) { - r.SourceIncludes = v - } -} - // WithStats - specific 'tag' of the request for logging and statistical purposes. // func (f UpdateByQuery) WithStats(v ...string) func(*UpdateByQueryRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update_by_query_rethrottle.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update_by_query_rethrottle.go index babc317f..0a4e5da0 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update_by_query_rethrottle.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.update_by_query_rethrottle.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.delete.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.delete.go index 576ba53a..72c2f625 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.delete.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.delete.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.get.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.get.go index 6dc401a4..6301ef80 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.get.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.get.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.status.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.status.go index e1c2084b..8aceea68 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.status.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.status.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.submit.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.submit.go index 1a43b479..e0ca0d34 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.submit.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.async_search.submit.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// Code generated from specification version 7.12.0: DO NOT EDIT +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go index 8860c0dd..4d458d4a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go index 36baf013..f9aacc1f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_decision.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_decision.go index 1b4a88d9..b5e957ea 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_decision.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_decision.go @@ -1,6 +1,19 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.10.0: DO NOT EDIT diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_policy.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_policy.go index 6b58010e..702372e3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_policy.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.get_autoscaling_policy.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.put_autoscaling_policy.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.put_autoscaling_policy.go index a695560f..dc630a73 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.put_autoscaling_policy.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.autoscaling.put_autoscaling_policy.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_data_frame_analytics.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_data_frame_analytics.go index 30fe5ee1..2e859f0c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_data_frame_analytics.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_data_frame_analytics.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_datafeeds.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_datafeeds.go index 9952ce39..b78c0ba0 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_datafeeds.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_datafeeds.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_jobs.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_jobs.go index f1b16f60..1bf3069f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_jobs.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_jobs.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_trained_models.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_trained_models.go index 0e0f2e9d..07edab3a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_trained_models.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.ml_trained_models.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.transforms.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.transforms.go index 1ea97f91..e466046d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.transforms.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.cat.transforms.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.delete_auto_follow_pattern.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.delete_auto_follow_pattern.go index 2866ce35..e5b9aac3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.delete_auto_follow_pattern.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.delete_auto_follow_pattern.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow.go index bd5afa6b..91150f39 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow_info.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow_info.go index da59b4e4..c500f347 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow_info.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow_info.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow_stats.go index 5026d74d..e4200c5a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow_stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.follow_stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.forget_follower.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.forget_follower.go index f936d45f..a7744146 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.forget_follower.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.forget_follower.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.get_auto_follow_pattern.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.get_auto_follow_pattern.go index 588a3aa6..a99412d3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.get_auto_follow_pattern.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.get_auto_follow_pattern.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.pause_auto_follow_pattern.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.pause_auto_follow_pattern.go index 85f66478..e62873a6 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.pause_auto_follow_pattern.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.pause_auto_follow_pattern.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.pause_follow.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.pause_follow.go index 74a00323..6cc1e0da 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.pause_follow.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.pause_follow.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.put_auto_follow_pattern.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.put_auto_follow_pattern.go index 621ccda5..72442b83 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.put_auto_follow_pattern.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.put_auto_follow_pattern.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.resume_auto_follow_pattern.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.resume_auto_follow_pattern.go index c5c0475f..800fb50e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.resume_auto_follow_pattern.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.resume_auto_follow_pattern.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.resume_follow.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.resume_follow.go index 8c0fab67..02c8b3b5 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.resume_follow.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.resume_follow.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.stats.go index 5b008934..5235fcd5 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.unfollow.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.unfollow.go index d61b3f98..9b36658e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.unfollow.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ccr.unfollow.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.close_point_in_time.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.close_point_in_time.go index 9e3245a4..65531c5f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.close_point_in_time.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.close_point_in_time.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.delete_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.delete_transform.go index 1c427d9c..69a50a6b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.delete_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.delete_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.get_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.get_transform.go index 48ac2b52..99c37a23 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.get_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.get_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.get_transform_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.get_transform_stats.go index 51e0811f..4ad66cef 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.get_transform_stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.get_transform_stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// Code generated from specification version 7.12.0: DO NOT EDIT +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.preview_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.preview_transform.go index bbc0430a..d48281a8 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.preview_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.preview_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.put_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.put_transform.go index 06fb0e1b..6f1acd7a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.put_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.put_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.start_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.start_transform.go index ae90422f..2c0c5b44 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.start_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.start_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.stop_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.stop_transform.go index bc748736..5fa4f47b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.stop_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.stop_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// Code generated from specification version 7.12.0: DO NOT EDIT +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.update_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.update_transform.go index fbb2d750..53c619e0 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.update_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.data_frame_transform_deprecated.update_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.delete_policy.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.delete_policy.go index 9fc06ec8..5ff07d69 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.delete_policy.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.delete_policy.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.execute_policy.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.execute_policy.go index 4b572bb4..206d7c7a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.execute_policy.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.execute_policy.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.get_policy.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.get_policy.go index 11c0dbbe..5918403f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.get_policy.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.get_policy.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.put_policy.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.put_policy.go index 96a2f60f..2765c178 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.put_policy.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.put_policy.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.stats.go index cf5a3dc3..f3b0e4d3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.enrich.stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.delete.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.delete.go index d8acc3fd..9ea1f7e3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.delete.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.delete.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.get.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.get.go index 3045f4c7..2c515624 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.get.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.get.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.get_status.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.get_status.go index 6f8c9004..e7dd5770 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.get_status.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.get_status.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.search.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.search.go index dc68120d..02b5bf95 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.search.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.eql.search.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -63,7 +76,7 @@ func (r EqlSearchRequest) Do(ctx context.Context, transport Transport) (*Respons params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(r.Index) + 1 + len("_eql") + 1 + len("search")) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.graph.explore.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.graph.explore.go index 5ed142c2..8228f384 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.graph.explore.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.graph.explore.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -62,7 +75,7 @@ func (r GraphExploreRequest) Do(ctx context.Context, transport Transport) (*Resp params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len(strings.Join(r.DocumentType, ",")) + 1 + len("_graph") + 1 + len("explore")) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.delete_lifecycle.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.delete_lifecycle.go index 27705800..01277dcf 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.delete_lifecycle.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.delete_lifecycle.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.explain_lifecycle.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.explain_lifecycle.go index f86bfba6..2baa03ae 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.explain_lifecycle.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.explain_lifecycle.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.get_lifecycle.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.get_lifecycle.go index 6d1a6e8f..5f8e0c43 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.get_lifecycle.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.get_lifecycle.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.get_status.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.get_status.go index 4ab5f878..70930d49 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.get_status.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.get_status.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.migrate_to_data_tiers.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.migrate_to_data_tiers.go new file mode 100644 index 00000000..f9b39f9d --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.migrate_to_data_tiers.go @@ -0,0 +1,226 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strconv" + "strings" +) + +func newILMMigrateToDataTiersFunc(t Transport) ILMMigrateToDataTiers { + return func(o ...func(*ILMMigrateToDataTiersRequest)) (*Response, error) { + var r = ILMMigrateToDataTiersRequest{} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// ILMMigrateToDataTiers - Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html. +// +type ILMMigrateToDataTiers func(o ...func(*ILMMigrateToDataTiersRequest)) (*Response, error) + +// ILMMigrateToDataTiersRequest configures the ILM Migrate To Data Tiers API request. +// +type ILMMigrateToDataTiersRequest struct { + Body io.Reader + + DryRun *bool + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r ILMMigrateToDataTiersRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(len("/_ilm/migrate_to_data_tiers")) + path.WriteString("/_ilm/migrate_to_data_tiers") + + params = make(map[string]string) + + if r.DryRun != nil { + params["dry_run"] = strconv.FormatBool(*r.DryRun) + } + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f ILMMigrateToDataTiers) WithContext(v context.Context) func(*ILMMigrateToDataTiersRequest) { + return func(r *ILMMigrateToDataTiersRequest) { + r.ctx = v + } +} + +// WithBody - Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data"). +// +func (f ILMMigrateToDataTiers) WithBody(v io.Reader) func(*ILMMigrateToDataTiersRequest) { + return func(r *ILMMigrateToDataTiersRequest) { + r.Body = v + } +} + +// WithDryRun - if set to true it will simulate the migration, providing a way to retrieve the ilm policies and indices that need to be migrated. the default is false. +// +func (f ILMMigrateToDataTiers) WithDryRun(v bool) func(*ILMMigrateToDataTiersRequest) { + return func(r *ILMMigrateToDataTiersRequest) { + r.DryRun = &v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f ILMMigrateToDataTiers) WithPretty() func(*ILMMigrateToDataTiersRequest) { + return func(r *ILMMigrateToDataTiersRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f ILMMigrateToDataTiers) WithHuman() func(*ILMMigrateToDataTiersRequest) { + return func(r *ILMMigrateToDataTiersRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f ILMMigrateToDataTiers) WithErrorTrace() func(*ILMMigrateToDataTiersRequest) { + return func(r *ILMMigrateToDataTiersRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f ILMMigrateToDataTiers) WithFilterPath(v ...string) func(*ILMMigrateToDataTiersRequest) { + return func(r *ILMMigrateToDataTiersRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f ILMMigrateToDataTiers) WithHeader(h map[string]string) func(*ILMMigrateToDataTiersRequest) { + return func(r *ILMMigrateToDataTiersRequest) { + 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 ILMMigrateToDataTiers) WithOpaqueID(s string) func(*ILMMigrateToDataTiersRequest) { + return func(r *ILMMigrateToDataTiersRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.move_to_step.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.move_to_step.go index b5e76a10..52c00f53 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.move_to_step.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.move_to_step.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.put_lifecycle.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.put_lifecycle.go index 923a5a87..c1136832 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.put_lifecycle.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.put_lifecycle.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.remove_policy.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.remove_policy.go index 9c9113df..7783549c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.remove_policy.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.remove_policy.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.retry.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.retry.go index 467fc8b9..de1fb9b0 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.retry.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.retry.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.start.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.start.go index 2d6c497b..575cb57e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.start.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.start.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.stop.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.stop.go index 66c8ed3d..057a3c21 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.stop.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ilm.stop.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.create_data_stream.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.create_data_stream.go index 5577ee95..37caeced 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.create_data_stream.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.create_data_stream.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.data_streams_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.data_streams_stats.go index 9148c11f..f255150a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.data_streams_stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.data_streams_stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.delete_data_stream.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.delete_data_stream.go index 34247fb4..090bd1e6 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.delete_data_stream.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.delete_data_stream.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.freeze.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.freeze.go index e2d287ba..0f487314 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.freeze.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.freeze.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.get_data_stream.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.get_data_stream.go index 7fdc42a3..a0212f1e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.get_data_stream.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.get_data_stream.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.migrate_to_data_stream.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.migrate_to_data_stream.go index e7863de2..c6edc15f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.migrate_to_data_stream.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.migrate_to_data_stream.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.promote_data_stream.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.promote_data_stream.go index 3df04124..ffb88486 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.promote_data_stream.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.promote_data_stream.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.reload_search_analyzers.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.reload_search_analyzers.go index 08b6e904..7178e48c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.reload_search_analyzers.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.reload_search_analyzers.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -59,7 +72,7 @@ func (r IndicesReloadSearchAnalyzersRequest) Do(ctx context.Context, transport T params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len("_reload_search_analyzers")) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.unfreeze.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.unfreeze.go index 97f00901..e303f367 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.unfreeze.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.indices.unfreeze.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.delete.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.delete.go index fb3f6a65..2511bd1c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.delete.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.delete.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get.go index fc092b52..8f9b3c76 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get_basic_status.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get_basic_status.go index f4966218..7f1dd5c3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get_basic_status.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get_basic_status.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get_trial_status.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get_trial_status.go index 2cd67cda..da995ab9 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get_trial_status.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.get_trial_status.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post.go index 38f5f05f..54692093 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post_start_basic.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post_start_basic.go index 26f40972..6c767127 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post_start_basic.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post_start_basic.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post_start_trial.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post_start_trial.go index ef81f4e7..2d91096b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post_start_trial.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.license.post_start_trial.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.delete_pipeline.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.delete_pipeline.go index add6a2f5..35bc6bcd 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.delete_pipeline.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.delete_pipeline.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.get_pipeline.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.get_pipeline.go index ec1330b4..9a22e35d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.get_pipeline.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.get_pipeline.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.put_pipeline.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.put_pipeline.go index f1ee1bd9..8e4c7ed7 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.put_pipeline.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.logstash.put_pipeline.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.migration.deprecations.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.migration.deprecations.go index ff5a54c6..569a8ff2 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.migration.deprecations.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.migration.deprecations.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.migration.get_feature_upgrade_status.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.migration.get_feature_upgrade_status.go new file mode 100644 index 00000000..7c3d082b --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.migration.get_feature_upgrade_status.go @@ -0,0 +1,196 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newMigrationGetFeatureUpgradeStatusFunc(t Transport) MigrationGetFeatureUpgradeStatus { + return func(o ...func(*MigrationGetFeatureUpgradeStatusRequest)) (*Response, error) { + var r = MigrationGetFeatureUpgradeStatusRequest{} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// MigrationGetFeatureUpgradeStatus - Find out whether system features need to be upgraded or not +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html. +// +type MigrationGetFeatureUpgradeStatus func(o ...func(*MigrationGetFeatureUpgradeStatusRequest)) (*Response, error) + +// MigrationGetFeatureUpgradeStatusRequest configures the Migration Get Feature Upgrade Status API request. +// +type MigrationGetFeatureUpgradeStatusRequest struct { + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r MigrationGetFeatureUpgradeStatusRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(len("/_migration/system_features")) + path.WriteString("/_migration/system_features") + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f MigrationGetFeatureUpgradeStatus) WithContext(v context.Context) func(*MigrationGetFeatureUpgradeStatusRequest) { + return func(r *MigrationGetFeatureUpgradeStatusRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f MigrationGetFeatureUpgradeStatus) WithPretty() func(*MigrationGetFeatureUpgradeStatusRequest) { + return func(r *MigrationGetFeatureUpgradeStatusRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f MigrationGetFeatureUpgradeStatus) WithHuman() func(*MigrationGetFeatureUpgradeStatusRequest) { + return func(r *MigrationGetFeatureUpgradeStatusRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f MigrationGetFeatureUpgradeStatus) WithErrorTrace() func(*MigrationGetFeatureUpgradeStatusRequest) { + return func(r *MigrationGetFeatureUpgradeStatusRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f MigrationGetFeatureUpgradeStatus) WithFilterPath(v ...string) func(*MigrationGetFeatureUpgradeStatusRequest) { + return func(r *MigrationGetFeatureUpgradeStatusRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f MigrationGetFeatureUpgradeStatus) WithHeader(h map[string]string) func(*MigrationGetFeatureUpgradeStatusRequest) { + return func(r *MigrationGetFeatureUpgradeStatusRequest) { + 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 MigrationGetFeatureUpgradeStatus) WithOpaqueID(s string) func(*MigrationGetFeatureUpgradeStatusRequest) { + return func(r *MigrationGetFeatureUpgradeStatusRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.migration.post_feature_upgrade.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.migration.post_feature_upgrade.go new file mode 100644 index 00000000..a112dffb --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.migration.post_feature_upgrade.go @@ -0,0 +1,196 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newMigrationPostFeatureUpgradeFunc(t Transport) MigrationPostFeatureUpgrade { + return func(o ...func(*MigrationPostFeatureUpgradeRequest)) (*Response, error) { + var r = MigrationPostFeatureUpgradeRequest{} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// MigrationPostFeatureUpgrade - Begin upgrades for system features +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html. +// +type MigrationPostFeatureUpgrade func(o ...func(*MigrationPostFeatureUpgradeRequest)) (*Response, error) + +// MigrationPostFeatureUpgradeRequest configures the Migration Post Feature Upgrade API request. +// +type MigrationPostFeatureUpgradeRequest struct { + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r MigrationPostFeatureUpgradeRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(len("/_migration/system_features")) + path.WriteString("/_migration/system_features") + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f MigrationPostFeatureUpgrade) WithContext(v context.Context) func(*MigrationPostFeatureUpgradeRequest) { + return func(r *MigrationPostFeatureUpgradeRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f MigrationPostFeatureUpgrade) WithPretty() func(*MigrationPostFeatureUpgradeRequest) { + return func(r *MigrationPostFeatureUpgradeRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f MigrationPostFeatureUpgrade) WithHuman() func(*MigrationPostFeatureUpgradeRequest) { + return func(r *MigrationPostFeatureUpgradeRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f MigrationPostFeatureUpgrade) WithErrorTrace() func(*MigrationPostFeatureUpgradeRequest) { + return func(r *MigrationPostFeatureUpgradeRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f MigrationPostFeatureUpgrade) WithFilterPath(v ...string) func(*MigrationPostFeatureUpgradeRequest) { + return func(r *MigrationPostFeatureUpgradeRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f MigrationPostFeatureUpgrade) WithHeader(h map[string]string) func(*MigrationPostFeatureUpgradeRequest) { + return func(r *MigrationPostFeatureUpgradeRequest) { + 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 MigrationPostFeatureUpgrade) WithOpaqueID(s string) func(*MigrationPostFeatureUpgradeRequest) { + return func(r *MigrationPostFeatureUpgradeRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.close_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.close_job.go index 118e4e65..9cce4fd0 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.close_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.close_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar.go index ecd7e4ec..36674aec 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar_event.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar_event.go index de7047ae..c520ec18 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar_event.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar_event.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar_job.go index d06fc252..364ce605 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_calendar_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_data_frame_analytics.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_data_frame_analytics.go index 7c2b1e82..b0d96b12 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_data_frame_analytics.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_data_frame_analytics.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -28,8 +41,6 @@ func newMLDeleteDataFrameAnalyticsFunc(t Transport) MLDeleteDataFrameAnalytics { // MLDeleteDataFrameAnalytics - Deletes an existing data frame analytics job. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html. // type MLDeleteDataFrameAnalytics func(id string, o ...func(*MLDeleteDataFrameAnalyticsRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_datafeed.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_datafeed.go index acf56e0d..1efb7c98 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_datafeed.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_datafeed.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_expired_data.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_expired_data.go index 0b224a34..fa54be4f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_expired_data.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_expired_data.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_filter.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_filter.go index 1810f225..6b75a460 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_filter.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_filter.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_forecast.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_forecast.go index 7a8e8a9d..7b061dfd 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_forecast.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_forecast.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_job.go index 26dfcac5..fb3040cc 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_model_snapshot.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_model_snapshot.go index bee28de1..69e1600c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_model_snapshot.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_model_snapshot.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_trained_model.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_trained_model.go index 85abeda8..1b685f11 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_trained_model.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_trained_model.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -26,8 +39,6 @@ func newMLDeleteTrainedModelFunc(t Transport) MLDeleteTrainedModel { // MLDeleteTrainedModel - Deletes an existing trained inference model that is currently not referenced by an ingest pipeline. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html. // type MLDeleteTrainedModel func(model_id string, o ...func(*MLDeleteTrainedModelRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_trained_model_alias.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_trained_model_alias.go new file mode 100644 index 00000000..7f0ac8f1 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.delete_trained_model_alias.go @@ -0,0 +1,208 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newMLDeleteTrainedModelAliasFunc(t Transport) MLDeleteTrainedModelAlias { + return func(model_alias string, model_id string, o ...func(*MLDeleteTrainedModelAliasRequest)) (*Response, error) { + var r = MLDeleteTrainedModelAliasRequest{ModelAlias: model_alias, ModelID: model_id} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// MLDeleteTrainedModelAlias - Deletes a model alias that refers to the trained model +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html. +// +type MLDeleteTrainedModelAlias func(model_alias string, model_id string, o ...func(*MLDeleteTrainedModelAliasRequest)) (*Response, error) + +// MLDeleteTrainedModelAliasRequest configures the ML Delete Trained Model Alias API request. +// +type MLDeleteTrainedModelAliasRequest struct { + ModelAlias string + ModelID string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r MLDeleteTrainedModelAliasRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "DELETE" + + path.Grow(1 + len("_ml") + 1 + len("trained_models") + 1 + len(r.ModelID) + 1 + len("model_aliases") + 1 + len(r.ModelAlias)) + path.WriteString("/") + path.WriteString("_ml") + path.WriteString("/") + path.WriteString("trained_models") + path.WriteString("/") + path.WriteString(r.ModelID) + path.WriteString("/") + path.WriteString("model_aliases") + path.WriteString("/") + path.WriteString(r.ModelAlias) + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f MLDeleteTrainedModelAlias) WithContext(v context.Context) func(*MLDeleteTrainedModelAliasRequest) { + return func(r *MLDeleteTrainedModelAliasRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f MLDeleteTrainedModelAlias) WithPretty() func(*MLDeleteTrainedModelAliasRequest) { + return func(r *MLDeleteTrainedModelAliasRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f MLDeleteTrainedModelAlias) WithHuman() func(*MLDeleteTrainedModelAliasRequest) { + return func(r *MLDeleteTrainedModelAliasRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f MLDeleteTrainedModelAlias) WithErrorTrace() func(*MLDeleteTrainedModelAliasRequest) { + return func(r *MLDeleteTrainedModelAliasRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f MLDeleteTrainedModelAlias) WithFilterPath(v ...string) func(*MLDeleteTrainedModelAliasRequest) { + return func(r *MLDeleteTrainedModelAliasRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f MLDeleteTrainedModelAlias) WithHeader(h map[string]string) func(*MLDeleteTrainedModelAliasRequest) { + return func(r *MLDeleteTrainedModelAliasRequest) { + 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 MLDeleteTrainedModelAlias) WithOpaqueID(s string) func(*MLDeleteTrainedModelAliasRequest) { + return func(r *MLDeleteTrainedModelAliasRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.estimate_model_memory.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.estimate_model_memory.go index 8f4f583d..011e7555 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.estimate_model_memory.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.estimate_model_memory.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.evaluate_data_frame.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.evaluate_data_frame.go index d7ecc3d8..cd39bc6c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.evaluate_data_frame.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.evaluate_data_frame.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,8 +40,6 @@ func newMLEvaluateDataFrameFunc(t Transport) MLEvaluateDataFrame { // MLEvaluateDataFrame - Evaluates the data frame analytics for an annotated index. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html. // type MLEvaluateDataFrame func(body io.Reader, o ...func(*MLEvaluateDataFrameRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.explain_data_frame_analytics.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.explain_data_frame_analytics.go index 0a9f852a..3c6360ab 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.explain_data_frame_analytics.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.explain_data_frame_analytics.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,8 +40,6 @@ func newMLExplainDataFrameAnalyticsFunc(t Transport) MLExplainDataFrameAnalytics // MLExplainDataFrameAnalytics - Explains a data frame analytics config. // -// This API is beta. -// // See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html. // type MLExplainDataFrameAnalytics func(o ...func(*MLExplainDataFrameAnalyticsRequest)) (*Response, error) @@ -59,7 +70,7 @@ func (r MLExplainDataFrameAnalyticsRequest) Do(ctx context.Context, transport Tr params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_ml") + 1 + len("data_frame") + 1 + len("analytics") + 1 + len(r.DocumentID) + 1 + len("_explain")) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.find_file_structure.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.find_file_structure.go index db20f656..85a8cd59 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.find_file_structure.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.find_file_structure.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -31,7 +44,7 @@ func newMLFindFileStructureFunc(t Transport) MLFindFileStructure { // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html. // type MLFindFileStructure func(body io.Reader, o ...func(*MLFindFileStructureRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.flush_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.flush_job.go index 77cfaf43..8e4b7411 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.flush_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.flush_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.forecast.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.forecast.go index b277adbe..41a84fe0 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.forecast.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.forecast.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_buckets.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_buckets.go index e37db5ba..26b6e178 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_buckets.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_buckets.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -70,7 +83,7 @@ func (r MLGetBucketsRequest) Do(ctx context.Context, transport Transport) (*Resp params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_ml") + 1 + len("anomaly_detectors") + 1 + len(r.JobID) + 1 + len("results") + 1 + len("buckets") + 1 + len(r.Timestamp)) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_calendar_events.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_calendar_events.go index 488baec0..8e47a5d3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_calendar_events.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_calendar_events.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_calendars.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_calendars.go index 703a275a..d7a1fc20 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_calendars.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_calendars.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -61,7 +74,7 @@ func (r MLGetCalendarsRequest) Do(ctx context.Context, transport Transport) (*Re params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_ml") + 1 + len("calendars") + 1 + len(r.CalendarID)) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_categories.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_categories.go index 4804ec80..531487c0 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_categories.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_categories.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -63,7 +76,7 @@ func (r MLGetCategoriesRequest) Do(ctx context.Context, transport Transport) (*R params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_ml") + 1 + len("anomaly_detectors") + 1 + len(r.JobID) + 1 + len("results") + 1 + len("categories")) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_data_frame_analytics.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_data_frame_analytics.go index 492d8544..3360bcc0 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_data_frame_analytics.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_data_frame_analytics.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,8 +40,6 @@ func newMLGetDataFrameAnalyticsFunc(t Transport) MLGetDataFrameAnalytics { // MLGetDataFrameAnalytics - Retrieves configuration information for data frame analytics jobs. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html. // type MLGetDataFrameAnalytics func(o ...func(*MLGetDataFrameAnalyticsRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_data_frame_analytics_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_data_frame_analytics_stats.go index 8fc1426e..74d5b4cf 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_data_frame_analytics_stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_data_frame_analytics_stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,8 +40,6 @@ func newMLGetDataFrameAnalyticsStatsFunc(t Transport) MLGetDataFrameAnalyticsSta // MLGetDataFrameAnalyticsStats - Retrieves usage information for data frame analytics jobs. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html. // type MLGetDataFrameAnalyticsStats func(o ...func(*MLGetDataFrameAnalyticsStatsRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_datafeed_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_datafeed_stats.go index 85fb979f..51dcf215 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_datafeed_stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_datafeed_stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_datafeeds.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_datafeeds.go index 5d1fdc2e..bfa3db8a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_datafeeds.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_datafeeds.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// Code generated from specification version 7.12.0: DO NOT EDIT +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_filters.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_filters.go index 401f6be7..71fb2b5e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_filters.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_filters.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_influencers.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_influencers.go index 3f4ea8d1..d8819576 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_influencers.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_influencers.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -68,7 +81,7 @@ func (r MLGetInfluencersRequest) Do(ctx context.Context, transport Transport) (* params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_ml") + 1 + len("anomaly_detectors") + 1 + len(r.JobID) + 1 + len("results") + 1 + len("influencers")) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_job_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_job_stats.go index 858cd8cd..013b29b7 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_job_stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_job_stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_jobs.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_jobs.go index c32a1463..006d1527 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_jobs.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_jobs.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// Code generated from specification version 7.12.0: DO NOT EDIT +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_model_snapshots.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_model_snapshots.go index 5a11eaf3..1aad0db9 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_model_snapshots.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_model_snapshots.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -67,7 +80,7 @@ func (r MLGetModelSnapshotsRequest) Do(ctx context.Context, transport Transport) params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_ml") + 1 + len("anomaly_detectors") + 1 + len(r.JobID) + 1 + len("model_snapshots") + 1 + len(r.SnapshotID)) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_overall_buckets.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_overall_buckets.go index 4143c1f5..1a4c1d50 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_overall_buckets.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_overall_buckets.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -68,7 +81,7 @@ func (r MLGetOverallBucketsRequest) Do(ctx context.Context, transport Transport) params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_ml") + 1 + len("anomaly_detectors") + 1 + len(r.JobID) + 1 + len("results") + 1 + len("overall_buckets")) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_records.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_records.go index efd37763..c40d2230 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_records.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_records.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -68,7 +81,7 @@ func (r MLGetRecordsRequest) Do(ctx context.Context, transport Transport) (*Resp params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_ml") + 1 + len("anomaly_detectors") + 1 + len(r.JobID) + 1 + len("results") + 1 + len("records")) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_trained_models.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_trained_models.go index 6f6e7b45..9f995089 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_trained_models.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_trained_models.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,8 +40,6 @@ func newMLGetTrainedModelsFunc(t Transport) MLGetTrainedModels { // MLGetTrainedModels - Retrieves configuration information for a trained inference model. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html. // type MLGetTrainedModels func(o ...func(*MLGetTrainedModelsRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_trained_models_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_trained_models_stats.go index e2ebaf4a..18eb93ce 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_trained_models_stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.get_trained_models_stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,8 +40,6 @@ func newMLGetTrainedModelsStatsFunc(t Transport) MLGetTrainedModelsStats { // MLGetTrainedModelsStats - Retrieves usage information for trained inference models. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html. // type MLGetTrainedModelsStats func(o ...func(*MLGetTrainedModelsStatsRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.info.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.info.go index ce6022fa..a36c4119 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.info.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.info.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.open_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.open_job.go index bdca8142..bb731dd5 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.open_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.open_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.post_calendar_events.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.post_calendar_events.go index c5bcf0ee..944354a8 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.post_calendar_events.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.post_calendar_events.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.post_data.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.post_data.go index bb1a7bde..e021f28c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.post_data.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.post_data.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.preview_data_frame_analytics.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.preview_data_frame_analytics.go new file mode 100644 index 00000000..4a26e969 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.preview_data_frame_analytics.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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newMLPreviewDataFrameAnalyticsFunc(t Transport) MLPreviewDataFrameAnalytics { + return func(o ...func(*MLPreviewDataFrameAnalyticsRequest)) (*Response, error) { + var r = MLPreviewDataFrameAnalyticsRequest{} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// MLPreviewDataFrameAnalytics - Previews that will be analyzed given a data frame analytics config. +// +// See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html. +// +type MLPreviewDataFrameAnalytics func(o ...func(*MLPreviewDataFrameAnalyticsRequest)) (*Response, error) + +// MLPreviewDataFrameAnalyticsRequest configures the ML Preview Data Frame Analytics API request. +// +type MLPreviewDataFrameAnalyticsRequest struct { + DocumentID string + + Body io.Reader + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r MLPreviewDataFrameAnalyticsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(1 + len("_ml") + 1 + len("data_frame") + 1 + len("analytics") + 1 + len(r.DocumentID) + 1 + len("_preview")) + path.WriteString("/") + path.WriteString("_ml") + path.WriteString("/") + path.WriteString("data_frame") + path.WriteString("/") + path.WriteString("analytics") + if r.DocumentID != "" { + path.WriteString("/") + path.WriteString(r.DocumentID) + } + path.WriteString("/") + path.WriteString("_preview") + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f MLPreviewDataFrameAnalytics) WithContext(v context.Context) func(*MLPreviewDataFrameAnalyticsRequest) { + return func(r *MLPreviewDataFrameAnalyticsRequest) { + r.ctx = v + } +} + +// WithBody - The data frame analytics config to preview. +// +func (f MLPreviewDataFrameAnalytics) WithBody(v io.Reader) func(*MLPreviewDataFrameAnalyticsRequest) { + return func(r *MLPreviewDataFrameAnalyticsRequest) { + r.Body = v + } +} + +// WithDocumentID - the ID of the data frame analytics to preview. +// +func (f MLPreviewDataFrameAnalytics) WithDocumentID(v string) func(*MLPreviewDataFrameAnalyticsRequest) { + return func(r *MLPreviewDataFrameAnalyticsRequest) { + r.DocumentID = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f MLPreviewDataFrameAnalytics) WithPretty() func(*MLPreviewDataFrameAnalyticsRequest) { + return func(r *MLPreviewDataFrameAnalyticsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f MLPreviewDataFrameAnalytics) WithHuman() func(*MLPreviewDataFrameAnalyticsRequest) { + return func(r *MLPreviewDataFrameAnalyticsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f MLPreviewDataFrameAnalytics) WithErrorTrace() func(*MLPreviewDataFrameAnalyticsRequest) { + return func(r *MLPreviewDataFrameAnalyticsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f MLPreviewDataFrameAnalytics) WithFilterPath(v ...string) func(*MLPreviewDataFrameAnalyticsRequest) { + return func(r *MLPreviewDataFrameAnalyticsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f MLPreviewDataFrameAnalytics) WithHeader(h map[string]string) func(*MLPreviewDataFrameAnalyticsRequest) { + return func(r *MLPreviewDataFrameAnalyticsRequest) { + 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 MLPreviewDataFrameAnalytics) WithOpaqueID(s string) func(*MLPreviewDataFrameAnalyticsRequest) { + return func(r *MLPreviewDataFrameAnalyticsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.preview_datafeed.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.preview_datafeed.go index b09843e2..5957bfb3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.preview_datafeed.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.preview_datafeed.go @@ -1,20 +1,34 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi import ( "context" + "io" "net/http" "strings" ) func newMLPreviewDatafeedFunc(t Transport) MLPreviewDatafeed { - return func(datafeed_id string, o ...func(*MLPreviewDatafeedRequest)) (*Response, error) { - var r = MLPreviewDatafeedRequest{DatafeedID: datafeed_id} + return func(o ...func(*MLPreviewDatafeedRequest)) (*Response, error) { + var r = MLPreviewDatafeedRequest{} for _, f := range o { f(&r) } @@ -28,11 +42,13 @@ func newMLPreviewDatafeedFunc(t Transport) MLPreviewDatafeed { // // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html. // -type MLPreviewDatafeed func(datafeed_id string, o ...func(*MLPreviewDatafeedRequest)) (*Response, error) +type MLPreviewDatafeed func(o ...func(*MLPreviewDatafeedRequest)) (*Response, error) // MLPreviewDatafeedRequest configures the ML Preview Datafeed API request. // type MLPreviewDatafeedRequest struct { + Body io.Reader + DatafeedID string Pretty bool @@ -54,15 +70,17 @@ func (r MLPreviewDatafeedRequest) Do(ctx context.Context, transport Transport) ( params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_ml") + 1 + len("datafeeds") + 1 + len(r.DatafeedID) + 1 + len("_preview")) path.WriteString("/") path.WriteString("_ml") path.WriteString("/") path.WriteString("datafeeds") - path.WriteString("/") - path.WriteString(r.DatafeedID) + if r.DatafeedID != "" { + path.WriteString("/") + path.WriteString(r.DatafeedID) + } path.WriteString("/") path.WriteString("_preview") @@ -84,7 +102,7 @@ func (r MLPreviewDatafeedRequest) Do(ctx context.Context, transport Transport) ( params["filter_path"] = strings.Join(r.FilterPath, ",") } - req, err := newRequest(method, path.String(), nil) + req, err := newRequest(method, path.String(), r.Body) if err != nil { return nil, err } @@ -97,6 +115,10 @@ func (r MLPreviewDatafeedRequest) Do(ctx context.Context, transport Transport) ( req.URL.RawQuery = q.Encode() } + if r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + if len(r.Header) > 0 { if len(req.Header) == 0 { req.Header = r.Header @@ -135,6 +157,22 @@ func (f MLPreviewDatafeed) WithContext(v context.Context) func(*MLPreviewDatafee } } +// WithBody - The datafeed config and job config with which to execute the preview. +// +func (f MLPreviewDatafeed) WithBody(v io.Reader) func(*MLPreviewDatafeedRequest) { + return func(r *MLPreviewDatafeedRequest) { + r.Body = v + } +} + +// WithDatafeedID - the ID of the datafeed to preview. +// +func (f MLPreviewDatafeed) WithDatafeedID(v string) func(*MLPreviewDatafeedRequest) { + return func(r *MLPreviewDatafeedRequest) { + r.DatafeedID = v + } +} + // WithPretty makes the response body pretty-printed. // func (f MLPreviewDatafeed) WithPretty() func(*MLPreviewDatafeedRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_calendar.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_calendar.go index baaae8f2..388d618a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_calendar.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_calendar.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_calendar_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_calendar_job.go index 8adbe2b3..181176fa 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_calendar_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_calendar_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_data_frame_analytics.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_data_frame_analytics.go index 1e8200ee..d8255ddd 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_data_frame_analytics.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_data_frame_analytics.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,8 +40,6 @@ func newMLPutDataFrameAnalyticsFunc(t Transport) MLPutDataFrameAnalytics { // MLPutDataFrameAnalytics - Instantiates a data frame analytics job. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html. // type MLPutDataFrameAnalytics func(id string, body io.Reader, o ...func(*MLPutDataFrameAnalyticsRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_datafeed.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_datafeed.go index 54260ea9..f3312d11 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_datafeed.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_datafeed.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_filter.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_filter.go index ba27f639..e543036f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_filter.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_filter.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_job.go index 8ecf286e..2c6765ec 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -10,6 +23,7 @@ import ( "context" "io" "net/http" + "strconv" "strings" ) @@ -38,6 +52,11 @@ type MLPutJobRequest struct { JobID string + AllowNoIndices *bool + ExpandWildcards string + IgnoreThrottled *bool + IgnoreUnavailable *bool + Pretty bool Human bool ErrorTrace bool @@ -69,6 +88,22 @@ func (r MLPutJobRequest) Do(ctx context.Context, transport Transport) (*Response 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.IgnoreThrottled != nil { + params["ignore_throttled"] = strconv.FormatBool(*r.IgnoreThrottled) + } + + if r.IgnoreUnavailable != nil { + params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) + } + if r.Pretty { params["pretty"] = "true" } @@ -140,6 +175,38 @@ func (f MLPutJob) WithContext(v context.Context) func(*MLPutJobRequest) { } } +// WithAllowNoIndices - ignore if the source indices expressions resolves to no concrete indices (default: true). only set if datafeed_config is provided.. +// +func (f MLPutJob) WithAllowNoIndices(v bool) func(*MLPutJobRequest) { + return func(r *MLPutJobRequest) { + r.AllowNoIndices = &v + } +} + +// WithExpandWildcards - whether source index expressions should get expanded to open or closed indices (default: open). only set if datafeed_config is provided.. +// +func (f MLPutJob) WithExpandWildcards(v string) func(*MLPutJobRequest) { + return func(r *MLPutJobRequest) { + r.ExpandWildcards = v + } +} + +// WithIgnoreThrottled - ignore indices that are marked as throttled (default: true). only set if datafeed_config is provided.. +// +func (f MLPutJob) WithIgnoreThrottled(v bool) func(*MLPutJobRequest) { + return func(r *MLPutJobRequest) { + r.IgnoreThrottled = &v + } +} + +// WithIgnoreUnavailable - ignore unavailable indexes (default: false). only set if datafeed_config is provided.. +// +func (f MLPutJob) WithIgnoreUnavailable(v bool) func(*MLPutJobRequest) { + return func(r *MLPutJobRequest) { + r.IgnoreUnavailable = &v + } +} + // WithPretty makes the response body pretty-printed. // func (f MLPutJob) WithPretty() func(*MLPutJobRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_trained_model.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_trained_model.go index 0ecd8666..4dad30f4 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_trained_model.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_trained_model.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -10,6 +23,7 @@ import ( "context" "io" "net/http" + "strconv" "strings" ) @@ -27,8 +41,6 @@ func newMLPutTrainedModelFunc(t Transport) MLPutTrainedModel { // MLPutTrainedModel - Creates an inference trained model. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html. // type MLPutTrainedModel func(body io.Reader, model_id string, o ...func(*MLPutTrainedModelRequest)) (*Response, error) @@ -40,6 +52,8 @@ type MLPutTrainedModelRequest struct { ModelID string + DeferDefinitionDecompression *bool + Pretty bool Human bool ErrorTrace bool @@ -71,6 +85,10 @@ func (r MLPutTrainedModelRequest) Do(ctx context.Context, transport Transport) ( params = make(map[string]string) + if r.DeferDefinitionDecompression != nil { + params["defer_definition_decompression"] = strconv.FormatBool(*r.DeferDefinitionDecompression) + } + if r.Pretty { params["pretty"] = "true" } @@ -142,6 +160,14 @@ func (f MLPutTrainedModel) WithContext(v context.Context) func(*MLPutTrainedMode } } +// WithDeferDefinitionDecompression - if set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations.. +// +func (f MLPutTrainedModel) WithDeferDefinitionDecompression(v bool) func(*MLPutTrainedModelRequest) { + return func(r *MLPutTrainedModelRequest) { + r.DeferDefinitionDecompression = &v + } +} + // WithPretty makes the response body pretty-printed. // func (f MLPutTrainedModel) WithPretty() func(*MLPutTrainedModelRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_trained_model_alias.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_trained_model_alias.go new file mode 100644 index 00000000..94773c31 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.put_trained_model_alias.go @@ -0,0 +1,223 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" +) + +func newMLPutTrainedModelAliasFunc(t Transport) MLPutTrainedModelAlias { + return func(model_alias string, model_id string, o ...func(*MLPutTrainedModelAliasRequest)) (*Response, error) { + var r = MLPutTrainedModelAliasRequest{ModelAlias: model_alias, ModelID: model_id} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// MLPutTrainedModelAlias - Creates a new model alias (or reassigns an existing one) to refer to the trained model +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html. +// +type MLPutTrainedModelAlias func(model_id string, model_alias string, o ...func(*MLPutTrainedModelAliasRequest)) (*Response, error) + +// MLPutTrainedModelAliasRequest configures the ML Put Trained Model Alias API request. +// +type MLPutTrainedModelAliasRequest struct { + ModelAlias string + ModelID string + + Reassign *bool + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r MLPutTrainedModelAliasRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "PUT" + + path.Grow(1 + len("_ml") + 1 + len("trained_models") + 1 + len(r.ModelID) + 1 + len("model_aliases") + 1 + len(r.ModelAlias)) + path.WriteString("/") + path.WriteString("_ml") + path.WriteString("/") + path.WriteString("trained_models") + path.WriteString("/") + path.WriteString(r.ModelID) + path.WriteString("/") + path.WriteString("model_aliases") + path.WriteString("/") + path.WriteString(r.ModelAlias) + + params = make(map[string]string) + + if r.Reassign != nil { + params["reassign"] = strconv.FormatBool(*r.Reassign) + } + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f MLPutTrainedModelAlias) WithContext(v context.Context) func(*MLPutTrainedModelAliasRequest) { + return func(r *MLPutTrainedModelAliasRequest) { + r.ctx = v + } +} + +// WithReassign - if the model_alias already exists and points to a separate model_id, this parameter must be true. defaults to false.. +// +func (f MLPutTrainedModelAlias) WithReassign(v bool) func(*MLPutTrainedModelAliasRequest) { + return func(r *MLPutTrainedModelAliasRequest) { + r.Reassign = &v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f MLPutTrainedModelAlias) WithPretty() func(*MLPutTrainedModelAliasRequest) { + return func(r *MLPutTrainedModelAliasRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f MLPutTrainedModelAlias) WithHuman() func(*MLPutTrainedModelAliasRequest) { + return func(r *MLPutTrainedModelAliasRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f MLPutTrainedModelAlias) WithErrorTrace() func(*MLPutTrainedModelAliasRequest) { + return func(r *MLPutTrainedModelAliasRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f MLPutTrainedModelAlias) WithFilterPath(v ...string) func(*MLPutTrainedModelAliasRequest) { + return func(r *MLPutTrainedModelAliasRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f MLPutTrainedModelAlias) WithHeader(h map[string]string) func(*MLPutTrainedModelAliasRequest) { + return func(r *MLPutTrainedModelAliasRequest) { + 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 MLPutTrainedModelAlias) WithOpaqueID(s string) func(*MLPutTrainedModelAliasRequest) { + return func(r *MLPutTrainedModelAliasRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.reset_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.reset_job.go new file mode 100644 index 00000000..9f8376bf --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.reset_job.go @@ -0,0 +1,220 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" +) + +func newMLResetJobFunc(t Transport) MLResetJob { + return func(job_id string, o ...func(*MLResetJobRequest)) (*Response, error) { + var r = MLResetJobRequest{JobID: job_id} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// MLResetJob - Resets an existing anomaly detection job. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html. +// +type MLResetJob func(job_id string, o ...func(*MLResetJobRequest)) (*Response, error) + +// MLResetJobRequest configures the ML Reset Job API request. +// +type MLResetJobRequest struct { + JobID string + + WaitForCompletion *bool + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r MLResetJobRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(1 + len("_ml") + 1 + len("anomaly_detectors") + 1 + len(r.JobID) + 1 + len("_reset")) + path.WriteString("/") + path.WriteString("_ml") + path.WriteString("/") + path.WriteString("anomaly_detectors") + path.WriteString("/") + path.WriteString(r.JobID) + path.WriteString("/") + path.WriteString("_reset") + + params = make(map[string]string) + + if r.WaitForCompletion != nil { + params["wait_for_completion"] = strconv.FormatBool(*r.WaitForCompletion) + } + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f MLResetJob) WithContext(v context.Context) func(*MLResetJobRequest) { + return func(r *MLResetJobRequest) { + r.ctx = v + } +} + +// WithWaitForCompletion - should this request wait until the operation has completed before returning. +// +func (f MLResetJob) WithWaitForCompletion(v bool) func(*MLResetJobRequest) { + return func(r *MLResetJobRequest) { + r.WaitForCompletion = &v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f MLResetJob) WithPretty() func(*MLResetJobRequest) { + return func(r *MLResetJobRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f MLResetJob) WithHuman() func(*MLResetJobRequest) { + return func(r *MLResetJobRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f MLResetJob) WithErrorTrace() func(*MLResetJobRequest) { + return func(r *MLResetJobRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f MLResetJob) WithFilterPath(v ...string) func(*MLResetJobRequest) { + return func(r *MLResetJobRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f MLResetJob) WithHeader(h map[string]string) func(*MLResetJobRequest) { + return func(r *MLResetJobRequest) { + 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 MLResetJob) WithOpaqueID(s string) func(*MLResetJobRequest) { + return func(r *MLResetJobRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.revert_model_snapshot.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.revert_model_snapshot.go index c8abeeb2..0a946be2 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.revert_model_snapshot.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.revert_model_snapshot.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.set_upgrade_mode.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.set_upgrade_mode.go index 5054949d..09f02c48 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.set_upgrade_mode.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.set_upgrade_mode.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.start_data_frame_analytics.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.start_data_frame_analytics.go index 9e797c88..6b5e8e34 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.start_data_frame_analytics.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.start_data_frame_analytics.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -28,8 +41,6 @@ func newMLStartDataFrameAnalyticsFunc(t Transport) MLStartDataFrameAnalytics { // MLStartDataFrameAnalytics - Starts a data frame analytics job. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html. // type MLStartDataFrameAnalytics func(id string, o ...func(*MLStartDataFrameAnalyticsRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.start_datafeed.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.start_datafeed.go index cc5cc7ec..1a610409 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.start_datafeed.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.start_datafeed.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.stop_data_frame_analytics.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.stop_data_frame_analytics.go index 97441a19..f14d9c38 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.stop_data_frame_analytics.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.stop_data_frame_analytics.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -29,8 +42,6 @@ func newMLStopDataFrameAnalyticsFunc(t Transport) MLStopDataFrameAnalytics { // MLStopDataFrameAnalytics - Stops one or more data frame analytics jobs. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html. // type MLStopDataFrameAnalytics func(id string, o ...func(*MLStopDataFrameAnalyticsRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.stop_datafeed.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.stop_datafeed.go index e280a33e..825a1d57 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.stop_datafeed.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.stop_datafeed.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_data_frame_analytics.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_data_frame_analytics.go index 132d306b..4817070b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_data_frame_analytics.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_data_frame_analytics.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,8 +40,6 @@ func newMLUpdateDataFrameAnalyticsFunc(t Transport) MLUpdateDataFrameAnalytics { // MLUpdateDataFrameAnalytics - Updates certain properties of a data frame analytics job. // -// This API is beta. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html. // type MLUpdateDataFrameAnalytics func(id string, body io.Reader, o ...func(*MLUpdateDataFrameAnalyticsRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_datafeed.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_datafeed.go index 544c7a32..b2a30c2e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_datafeed.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_datafeed.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_filter.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_filter.go index 93c93d91..6f1ef81e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_filter.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_filter.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_job.go index 8cdd64fb..b7c971fc 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_model_snapshot.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_model_snapshot.go index bb7c6752..c8f57ab3 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_model_snapshot.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.update_model_snapshot.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.upgrade_job_snapshot.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.upgrade_job_snapshot.go index 1b451378..9e8e125e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.upgrade_job_snapshot.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.upgrade_job_snapshot.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.validate.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.validate.go index 05beb10b..c89963f2 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.validate.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.validate.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.validate_detector.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.validate_detector.go index 61c2ad7a..a1816d33 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.validate_detector.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ml.validate_detector.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.monitoring.bulk.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.monitoring.bulk.go index d8129b38..094b4ff4 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.monitoring.bulk.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.monitoring.bulk.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,8 +40,6 @@ func newMonitoringBulkFunc(t Transport) MonitoringBulk { // MonitoringBulk - Used by the monitoring features to send monitoring data. // -// This API is experimental. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/monitor-elasticsearch-cluster.html. // type MonitoringBulk func(body io.Reader, o ...func(*MonitoringBulkRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.open_point_in_time.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.open_point_in_time.go index 75a155ed..b1cb2b11 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.open_point_in_time.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.open_point_in_time.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -14,8 +27,8 @@ import ( ) func newOpenPointInTimeFunc(t Transport) OpenPointInTime { - return func(o ...func(*OpenPointInTimeRequest)) (*Response, error) { - var r = OpenPointInTimeRequest{} + return func(index []string, keep_alive string, o ...func(*OpenPointInTimeRequest)) (*Response, error) { + var r = OpenPointInTimeRequest{Index: index, KeepAlive: keep_alive} for _, f := range o { f(&r) } @@ -29,7 +42,7 @@ func newOpenPointInTimeFunc(t Transport) OpenPointInTime { // // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html. // -type OpenPointInTime func(o ...func(*OpenPointInTimeRequest)) (*Response, error) +type OpenPointInTime func(index []string, keep_alive string, o ...func(*OpenPointInTimeRequest)) (*Response, error) // OpenPointInTimeRequest configures the Open Point In Time API request. // @@ -64,10 +77,8 @@ func (r OpenPointInTimeRequest) Do(ctx context.Context, transport Transport) (*R method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len("_pit")) - if len(r.Index) > 0 { - path.WriteString("/") - path.WriteString(strings.Join(r.Index, ",")) - } + path.WriteString("/") + path.WriteString(strings.Join(r.Index, ",")) path.WriteString("/") path.WriteString("_pit") @@ -160,14 +171,6 @@ func (f OpenPointInTime) WithContext(v context.Context) func(*OpenPointInTimeReq } } -// WithIndex - a list of index names to open point in time; use _all to perform the operation on all indices. -// -func (f OpenPointInTime) WithIndex(v ...string) func(*OpenPointInTimeRequest) { - return func(r *OpenPointInTimeRequest) { - r.Index = v - } -} - // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. // func (f OpenPointInTime) WithExpandWildcards(v string) func(*OpenPointInTimeRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.delete_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.delete_job.go index b44a690f..bbeaa029 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.delete_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.delete_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_jobs.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_jobs.go index a26e8380..2a869782 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_jobs.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_jobs.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_rollup_caps.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_rollup_caps.go index d1e12916..160f8bb8 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_rollup_caps.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_rollup_caps.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_rollup_index_caps.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_rollup_index_caps.go index bd87e2d6..f7d5a49d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_rollup_index_caps.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.get_rollup_index_caps.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.put_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.put_job.go index 378bac94..0f8d5418 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.put_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.put_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.rollup.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.rollup.go index 6ece7507..dfbc90b1 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.rollup.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.rollup.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,7 +40,9 @@ func newRollupRollupFunc(t Transport) RollupRollup { // RollupRollup - Rollup an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-api.html. +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html. // type RollupRollup func(index string, body io.Reader, rollup_index string, o ...func(*RollupRollupRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.rollup_search.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.rollup_search.go index 75849317..41e7084b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.rollup_search.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.rollup_search.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -64,7 +77,7 @@ func (r RollupRollupSearchRequest) Do(ctx context.Context, transport Transport) params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len(strings.Join(r.Index, ",")) + 1 + len(r.DocumentType) + 1 + len("_rollup_search")) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.start_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.start_job.go index 57fcbfc2..9948f40a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.start_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.start_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.stop_job.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.stop_job.go index 8d9f24ee..09416528 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.stop_job.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.rollup.stop_job.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.cache_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.cache_stats.go new file mode 100644 index 00000000..dc1fc824 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.cache_stats.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 specification version 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newSearchableSnapshotsCacheStatsFunc(t Transport) SearchableSnapshotsCacheStats { + return func(o ...func(*SearchableSnapshotsCacheStatsRequest)) (*Response, error) { + var r = SearchableSnapshotsCacheStatsRequest{} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SearchableSnapshotsCacheStats - Retrieve node-level cache statistics about searchable snapshots. +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html. +// +type SearchableSnapshotsCacheStats func(o ...func(*SearchableSnapshotsCacheStatsRequest)) (*Response, error) + +// SearchableSnapshotsCacheStatsRequest configures the Searchable Snapshots Cache Stats API request. +// +type SearchableSnapshotsCacheStatsRequest struct { + NodeID []string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SearchableSnapshotsCacheStatsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(1 + len("_searchable_snapshots") + 1 + len(strings.Join(r.NodeID, ",")) + 1 + len("cache") + 1 + len("stats")) + path.WriteString("/") + path.WriteString("_searchable_snapshots") + if len(r.NodeID) > 0 { + path.WriteString("/") + path.WriteString(strings.Join(r.NodeID, ",")) + } + path.WriteString("/") + path.WriteString("cache") + path.WriteString("/") + path.WriteString("stats") + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SearchableSnapshotsCacheStats) WithContext(v context.Context) func(*SearchableSnapshotsCacheStatsRequest) { + return func(r *SearchableSnapshotsCacheStatsRequest) { + r.ctx = v + } +} + +// WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. +// +func (f SearchableSnapshotsCacheStats) WithNodeID(v ...string) func(*SearchableSnapshotsCacheStatsRequest) { + return func(r *SearchableSnapshotsCacheStatsRequest) { + r.NodeID = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SearchableSnapshotsCacheStats) WithPretty() func(*SearchableSnapshotsCacheStatsRequest) { + return func(r *SearchableSnapshotsCacheStatsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SearchableSnapshotsCacheStats) WithHuman() func(*SearchableSnapshotsCacheStatsRequest) { + return func(r *SearchableSnapshotsCacheStatsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SearchableSnapshotsCacheStats) WithErrorTrace() func(*SearchableSnapshotsCacheStatsRequest) { + return func(r *SearchableSnapshotsCacheStatsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SearchableSnapshotsCacheStats) WithFilterPath(v ...string) func(*SearchableSnapshotsCacheStatsRequest) { + return func(r *SearchableSnapshotsCacheStatsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SearchableSnapshotsCacheStats) WithHeader(h map[string]string) func(*SearchableSnapshotsCacheStatsRequest) { + return func(r *SearchableSnapshotsCacheStatsRequest) { + 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 SearchableSnapshotsCacheStats) WithOpaqueID(s string) func(*SearchableSnapshotsCacheStatsRequest) { + return func(r *SearchableSnapshotsCacheStatsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.clear_cache.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.clear_cache.go index 72ee0a92..118f2c86 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.clear_cache.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.clear_cache.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.mount.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.mount.go index 6aacd953..cf1b050c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.mount.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.mount.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -29,8 +42,6 @@ func newSearchableSnapshotsMountFunc(t Transport) SearchableSnapshotsMount { // SearchableSnapshotsMount - Mount a snapshot as a searchable index. // -// This API is experimental. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-mount-snapshot.html. // type SearchableSnapshotsMount func(repository string, snapshot string, body io.Reader, o ...func(*SearchableSnapshotsMountRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.repository_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.repository_stats.go index b141464a..bf594519 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.repository_stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.repository_stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.stats.go index 314162fa..4e5d670d 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.searchable_snapshots.stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -24,9 +37,7 @@ func newSearchableSnapshotsStatsFunc(t Transport) SearchableSnapshotsStats { // ----- API Definition ------------------------------------------------------- -// SearchableSnapshotsStats - Retrieve various statistics about searchable snapshots. -// -// This API is experimental. +// SearchableSnapshotsStats - Retrieve shard-level statistics about searchable snapshots. // // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html. // diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.authenticate.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.authenticate.go index 01777554..1eea36df 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.authenticate.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.authenticate.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.change_password.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.change_password.go index 0922d488..a56b9c33 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.change_password.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.change_password.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_api_key_cache.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_api_key_cache.go index 48cd1af4..7cf6f0cb 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_api_key_cache.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_api_key_cache.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_privileges.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_privileges.go index 002f5245..6cef799a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_privileges.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_privileges.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_realms.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_realms.go index bfb838d1..a8762bd9 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_realms.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_realms.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_roles.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_roles.go index 96c5778b..f21287c5 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_roles.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_roles.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_service_tokens.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_service_tokens.go new file mode 100644 index 00000000..08ed4a5e --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.clear_cached_service_tokens.go @@ -0,0 +1,215 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newSecurityClearCachedServiceTokensFunc(t Transport) SecurityClearCachedServiceTokens { + return func(name []string, namespace string, service string, o ...func(*SecurityClearCachedServiceTokensRequest)) (*Response, error) { + var r = SecurityClearCachedServiceTokensRequest{Name: name, Service: service, Namespace: namespace} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecurityClearCachedServiceTokens - Evicts tokens from the service account token caches. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html. +// +type SecurityClearCachedServiceTokens func(name []string, namespace string, service string, o ...func(*SecurityClearCachedServiceTokensRequest)) (*Response, error) + +// SecurityClearCachedServiceTokensRequest configures the Security Clear Cached Service Tokens API request. +// +type SecurityClearCachedServiceTokensRequest struct { + Name []string + Namespace string + Service string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecurityClearCachedServiceTokensRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(1 + len("_security") + 1 + len("service") + 1 + len(r.Namespace) + 1 + len(r.Service) + 1 + len("credential") + 1 + len("token") + 1 + len(strings.Join(r.Name, ",")) + 1 + len("_clear_cache")) + path.WriteString("/") + path.WriteString("_security") + path.WriteString("/") + path.WriteString("service") + path.WriteString("/") + path.WriteString(r.Namespace) + path.WriteString("/") + path.WriteString(r.Service) + path.WriteString("/") + path.WriteString("credential") + path.WriteString("/") + path.WriteString("token") + path.WriteString("/") + path.WriteString(strings.Join(r.Name, ",")) + path.WriteString("/") + path.WriteString("_clear_cache") + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecurityClearCachedServiceTokens) WithContext(v context.Context) func(*SecurityClearCachedServiceTokensRequest) { + return func(r *SecurityClearCachedServiceTokensRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecurityClearCachedServiceTokens) WithPretty() func(*SecurityClearCachedServiceTokensRequest) { + return func(r *SecurityClearCachedServiceTokensRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecurityClearCachedServiceTokens) WithHuman() func(*SecurityClearCachedServiceTokensRequest) { + return func(r *SecurityClearCachedServiceTokensRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecurityClearCachedServiceTokens) WithErrorTrace() func(*SecurityClearCachedServiceTokensRequest) { + return func(r *SecurityClearCachedServiceTokensRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecurityClearCachedServiceTokens) WithFilterPath(v ...string) func(*SecurityClearCachedServiceTokensRequest) { + return func(r *SecurityClearCachedServiceTokensRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecurityClearCachedServiceTokens) WithHeader(h map[string]string) func(*SecurityClearCachedServiceTokensRequest) { + return func(r *SecurityClearCachedServiceTokensRequest) { + 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 SecurityClearCachedServiceTokens) WithOpaqueID(s string) func(*SecurityClearCachedServiceTokensRequest) { + return func(r *SecurityClearCachedServiceTokensRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.create_api_key.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.create_api_key.go index 1a9c294e..ecf72aa4 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.create_api_key.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.create_api_key.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.create_service_token.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.create_service_token.go new file mode 100644 index 00000000..53b44367 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.create_service_token.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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newSecurityCreateServiceTokenFunc(t Transport) SecurityCreateServiceToken { + return func(namespace string, service string, o ...func(*SecurityCreateServiceTokenRequest)) (*Response, error) { + var r = SecurityCreateServiceTokenRequest{Service: service, Namespace: namespace} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecurityCreateServiceToken - Creates a service account token for access without requiring basic authentication. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html. +// +type SecurityCreateServiceToken func(namespace string, service string, o ...func(*SecurityCreateServiceTokenRequest)) (*Response, error) + +// SecurityCreateServiceTokenRequest configures the Security Create Service Token API request. +// +type SecurityCreateServiceTokenRequest struct { + Name string + Namespace string + Service string + + Refresh string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecurityCreateServiceTokenRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "PUT" + + path.Grow(1 + len("_security") + 1 + len("service") + 1 + len(r.Namespace) + 1 + len(r.Service) + 1 + len("credential") + 1 + len("token") + 1 + len(r.Name)) + path.WriteString("/") + path.WriteString("_security") + path.WriteString("/") + path.WriteString("service") + path.WriteString("/") + path.WriteString(r.Namespace) + path.WriteString("/") + path.WriteString(r.Service) + path.WriteString("/") + path.WriteString("credential") + path.WriteString("/") + path.WriteString("token") + if r.Name != "" { + path.WriteString("/") + path.WriteString(r.Name) + } + + params = make(map[string]string) + + if r.Refresh != "" { + params["refresh"] = r.Refresh + } + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecurityCreateServiceToken) WithContext(v context.Context) func(*SecurityCreateServiceTokenRequest) { + return func(r *SecurityCreateServiceTokenRequest) { + r.ctx = v + } +} + +// WithName - an identifier for the token name. +// +func (f SecurityCreateServiceToken) WithName(v string) func(*SecurityCreateServiceTokenRequest) { + return func(r *SecurityCreateServiceTokenRequest) { + r.Name = v + } +} + +// WithRefresh - if `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.. +// +func (f SecurityCreateServiceToken) WithRefresh(v string) func(*SecurityCreateServiceTokenRequest) { + return func(r *SecurityCreateServiceTokenRequest) { + r.Refresh = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecurityCreateServiceToken) WithPretty() func(*SecurityCreateServiceTokenRequest) { + return func(r *SecurityCreateServiceTokenRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecurityCreateServiceToken) WithHuman() func(*SecurityCreateServiceTokenRequest) { + return func(r *SecurityCreateServiceTokenRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecurityCreateServiceToken) WithErrorTrace() func(*SecurityCreateServiceTokenRequest) { + return func(r *SecurityCreateServiceTokenRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecurityCreateServiceToken) WithFilterPath(v ...string) func(*SecurityCreateServiceTokenRequest) { + return func(r *SecurityCreateServiceTokenRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecurityCreateServiceToken) WithHeader(h map[string]string) func(*SecurityCreateServiceTokenRequest) { + return func(r *SecurityCreateServiceTokenRequest) { + 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 SecurityCreateServiceToken) WithOpaqueID(s string) func(*SecurityCreateServiceTokenRequest) { + return func(r *SecurityCreateServiceTokenRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_privileges.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_privileges.go index 70727e1f..1e985106 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_privileges.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_privileges.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_role.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_role.go index 71b71f4a..2b1dad62 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_role.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_role.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_role_mapping.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_role_mapping.go index 60fc0f34..de639aed 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_role_mapping.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_role_mapping.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_service_token.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_service_token.go new file mode 100644 index 00000000..74ece81e --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_service_token.go @@ -0,0 +1,227 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newSecurityDeleteServiceTokenFunc(t Transport) SecurityDeleteServiceToken { + return func(name string, namespace string, service string, o ...func(*SecurityDeleteServiceTokenRequest)) (*Response, error) { + var r = SecurityDeleteServiceTokenRequest{Name: name, Namespace: namespace, Service: service} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecurityDeleteServiceToken - Deletes a service account token. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html. +// +type SecurityDeleteServiceToken func(name string, service string, namespace string, o ...func(*SecurityDeleteServiceTokenRequest)) (*Response, error) + +// SecurityDeleteServiceTokenRequest configures the Security Delete Service Token API request. +// +type SecurityDeleteServiceTokenRequest struct { + Name string + Namespace string + Service string + + Refresh string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecurityDeleteServiceTokenRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "DELETE" + + path.Grow(1 + len("_security") + 1 + len("service") + 1 + len(r.Namespace) + 1 + len(r.Service) + 1 + len("credential") + 1 + len("token") + 1 + len(r.Name)) + path.WriteString("/") + path.WriteString("_security") + path.WriteString("/") + path.WriteString("service") + path.WriteString("/") + path.WriteString(r.Namespace) + path.WriteString("/") + path.WriteString(r.Service) + path.WriteString("/") + path.WriteString("credential") + path.WriteString("/") + path.WriteString("token") + path.WriteString("/") + path.WriteString(r.Name) + + params = make(map[string]string) + + if r.Refresh != "" { + params["refresh"] = r.Refresh + } + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecurityDeleteServiceToken) WithContext(v context.Context) func(*SecurityDeleteServiceTokenRequest) { + return func(r *SecurityDeleteServiceTokenRequest) { + r.ctx = v + } +} + +// WithRefresh - if `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.. +// +func (f SecurityDeleteServiceToken) WithRefresh(v string) func(*SecurityDeleteServiceTokenRequest) { + return func(r *SecurityDeleteServiceTokenRequest) { + r.Refresh = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecurityDeleteServiceToken) WithPretty() func(*SecurityDeleteServiceTokenRequest) { + return func(r *SecurityDeleteServiceTokenRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecurityDeleteServiceToken) WithHuman() func(*SecurityDeleteServiceTokenRequest) { + return func(r *SecurityDeleteServiceTokenRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecurityDeleteServiceToken) WithErrorTrace() func(*SecurityDeleteServiceTokenRequest) { + return func(r *SecurityDeleteServiceTokenRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecurityDeleteServiceToken) WithFilterPath(v ...string) func(*SecurityDeleteServiceTokenRequest) { + return func(r *SecurityDeleteServiceTokenRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecurityDeleteServiceToken) WithHeader(h map[string]string) func(*SecurityDeleteServiceTokenRequest) { + return func(r *SecurityDeleteServiceTokenRequest) { + 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 SecurityDeleteServiceToken) WithOpaqueID(s string) func(*SecurityDeleteServiceTokenRequest) { + return func(r *SecurityDeleteServiceTokenRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_user.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_user.go index 2c1a6d74..9486d428 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_user.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.delete_user.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.disable_user.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.disable_user.go index 7c60368f..4e26907e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.disable_user.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.disable_user.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.enable_user.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.enable_user.go index 6e12e673..0d9826e4 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.enable_user.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.enable_user.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_api_key.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_api_key.go index 1118c2f3..4c52c373 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_api_key.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_api_key.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_builtin_privileges.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_builtin_privileges.go index 824ee54a..edfdfd4f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_builtin_privileges.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_builtin_privileges.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_privileges.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_privileges.go index d8dcd817..3662f218 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_privileges.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_privileges.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_role.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_role.go index 462570a5..176a1f17 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_role.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_role.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_role_mapping.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_role_mapping.go index a54bddbd..0cf7f5fc 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_role_mapping.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_role_mapping.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_service_accounts.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_service_accounts.go new file mode 100644 index 00000000..b03c9307 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_service_accounts.go @@ -0,0 +1,226 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newSecurityGetServiceAccountsFunc(t Transport) SecurityGetServiceAccounts { + return func(o ...func(*SecurityGetServiceAccountsRequest)) (*Response, error) { + var r = SecurityGetServiceAccountsRequest{} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecurityGetServiceAccounts - Retrieves information about service accounts. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html. +// +type SecurityGetServiceAccounts func(o ...func(*SecurityGetServiceAccountsRequest)) (*Response, error) + +// SecurityGetServiceAccountsRequest configures the Security Get Service Accounts API request. +// +type SecurityGetServiceAccountsRequest struct { + Namespace string + Service string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecurityGetServiceAccountsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(1 + len("_security") + 1 + len("service") + 1 + len(r.Namespace) + 1 + len(r.Service)) + path.WriteString("/") + path.WriteString("_security") + path.WriteString("/") + path.WriteString("service") + if r.Namespace != "" { + path.WriteString("/") + path.WriteString(r.Namespace) + } + if r.Service != "" { + path.WriteString("/") + path.WriteString(r.Service) + } + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecurityGetServiceAccounts) WithContext(v context.Context) func(*SecurityGetServiceAccountsRequest) { + return func(r *SecurityGetServiceAccountsRequest) { + r.ctx = v + } +} + +// WithNamespace - an identifier for the namespace. +// +func (f SecurityGetServiceAccounts) WithNamespace(v string) func(*SecurityGetServiceAccountsRequest) { + return func(r *SecurityGetServiceAccountsRequest) { + r.Namespace = v + } +} + +// WithService - an identifier for the service name. +// +func (f SecurityGetServiceAccounts) WithService(v string) func(*SecurityGetServiceAccountsRequest) { + return func(r *SecurityGetServiceAccountsRequest) { + r.Service = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecurityGetServiceAccounts) WithPretty() func(*SecurityGetServiceAccountsRequest) { + return func(r *SecurityGetServiceAccountsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecurityGetServiceAccounts) WithHuman() func(*SecurityGetServiceAccountsRequest) { + return func(r *SecurityGetServiceAccountsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecurityGetServiceAccounts) WithErrorTrace() func(*SecurityGetServiceAccountsRequest) { + return func(r *SecurityGetServiceAccountsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecurityGetServiceAccounts) WithFilterPath(v ...string) func(*SecurityGetServiceAccountsRequest) { + return func(r *SecurityGetServiceAccountsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecurityGetServiceAccounts) WithHeader(h map[string]string) func(*SecurityGetServiceAccountsRequest) { + return func(r *SecurityGetServiceAccountsRequest) { + 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 SecurityGetServiceAccounts) WithOpaqueID(s string) func(*SecurityGetServiceAccountsRequest) { + return func(r *SecurityGetServiceAccountsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_service_credentials.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_service_credentials.go new file mode 100644 index 00000000..ca1abc9b --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_service_credentials.go @@ -0,0 +1,208 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newSecurityGetServiceCredentialsFunc(t Transport) SecurityGetServiceCredentials { + return func(namespace string, service string, o ...func(*SecurityGetServiceCredentialsRequest)) (*Response, error) { + var r = SecurityGetServiceCredentialsRequest{Namespace: namespace, Service: service} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecurityGetServiceCredentials - Retrieves information of all service credentials for a service account. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html. +// +type SecurityGetServiceCredentials func(namespace string, service string, o ...func(*SecurityGetServiceCredentialsRequest)) (*Response, error) + +// SecurityGetServiceCredentialsRequest configures the Security Get Service Credentials API request. +// +type SecurityGetServiceCredentialsRequest struct { + Namespace string + Service string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecurityGetServiceCredentialsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(1 + len("_security") + 1 + len("service") + 1 + len(r.Namespace) + 1 + len(r.Service) + 1 + len("credential")) + path.WriteString("/") + path.WriteString("_security") + path.WriteString("/") + path.WriteString("service") + path.WriteString("/") + path.WriteString(r.Namespace) + path.WriteString("/") + path.WriteString(r.Service) + path.WriteString("/") + path.WriteString("credential") + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecurityGetServiceCredentials) WithContext(v context.Context) func(*SecurityGetServiceCredentialsRequest) { + return func(r *SecurityGetServiceCredentialsRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecurityGetServiceCredentials) WithPretty() func(*SecurityGetServiceCredentialsRequest) { + return func(r *SecurityGetServiceCredentialsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecurityGetServiceCredentials) WithHuman() func(*SecurityGetServiceCredentialsRequest) { + return func(r *SecurityGetServiceCredentialsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecurityGetServiceCredentials) WithErrorTrace() func(*SecurityGetServiceCredentialsRequest) { + return func(r *SecurityGetServiceCredentialsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecurityGetServiceCredentials) WithFilterPath(v ...string) func(*SecurityGetServiceCredentialsRequest) { + return func(r *SecurityGetServiceCredentialsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecurityGetServiceCredentials) WithHeader(h map[string]string) func(*SecurityGetServiceCredentialsRequest) { + return func(r *SecurityGetServiceCredentialsRequest) { + 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 SecurityGetServiceCredentials) WithOpaqueID(s string) func(*SecurityGetServiceCredentialsRequest) { + return func(r *SecurityGetServiceCredentialsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_token.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_token.go index 83b9811f..8db1ec0f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_token.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_token.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_user.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_user.go index 4abcda0c..d4fb6c3e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_user.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_user.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_user_privileges.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_user_privileges.go index 66eba7a1..8c2fbc65 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_user_privileges.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.get_user_privileges.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -24,9 +37,9 @@ func newSecurityGetUserPrivilegesFunc(t Transport) SecurityGetUserPrivileges { // ----- API Definition ------------------------------------------------------- -// SecurityGetUserPrivileges - Retrieves application privileges. +// SecurityGetUserPrivileges - Retrieves security privileges for the logged in user. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html. // type SecurityGetUserPrivileges func(o ...func(*SecurityGetUserPrivilegesRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.grant_api_key.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.grant_api_key.go index 94c25747..f99e623a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.grant_api_key.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.grant_api_key.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.has_privileges.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.has_privileges.go index aab3a45e..7f707de1 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.has_privileges.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.has_privileges.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -57,7 +70,7 @@ func (r SecurityHasPrivilegesRequest) Do(ctx context.Context, transport Transpor params map[string]string ) - method = "GET" + method = "POST" path.Grow(1 + len("_security") + 1 + len("user") + 1 + len(r.User) + 1 + len("_has_privileges")) path.WriteString("/") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.invalidate_api_key.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.invalidate_api_key.go index 57339488..bc4770aa 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.invalidate_api_key.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.invalidate_api_key.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.invalidate_token.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.invalidate_token.go index 225a2e36..65e041e2 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.invalidate_token.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.invalidate_token.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_privileges.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_privileges.go index b5a46247..e56d174e 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_privileges.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_privileges.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_role.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_role.go index 64372eb5..023f2fd2 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_role.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_role.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_role_mapping.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_role_mapping.go index 67848791..9b6e030f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_role_mapping.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_role_mapping.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_user.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_user.go index 0cd1e45b..4efa1722 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_user.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.put_user.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.query_api_keys.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.query_api_keys.go new file mode 100644 index 00000000..09369bd2 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.query_api_keys.go @@ -0,0 +1,211 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newSecurityQueryAPIKeysFunc(t Transport) SecurityQueryAPIKeys { + return func(o ...func(*SecurityQueryAPIKeysRequest)) (*Response, error) { + var r = SecurityQueryAPIKeysRequest{} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecurityQueryAPIKeys - Retrieves information for API keys using a subset of query DSL +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html. +// +type SecurityQueryAPIKeys func(o ...func(*SecurityQueryAPIKeysRequest)) (*Response, error) + +// SecurityQueryAPIKeysRequest configures the Security QueryAPI Keys API request. +// +type SecurityQueryAPIKeysRequest struct { + Body io.Reader + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecurityQueryAPIKeysRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(len("/_security/_query/api_key")) + path.WriteString("/_security/_query/api_key") + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecurityQueryAPIKeys) WithContext(v context.Context) func(*SecurityQueryAPIKeysRequest) { + return func(r *SecurityQueryAPIKeysRequest) { + r.ctx = v + } +} + +// WithBody - From, size, query, sort and search_after. +// +func (f SecurityQueryAPIKeys) WithBody(v io.Reader) func(*SecurityQueryAPIKeysRequest) { + return func(r *SecurityQueryAPIKeysRequest) { + r.Body = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecurityQueryAPIKeys) WithPretty() func(*SecurityQueryAPIKeysRequest) { + return func(r *SecurityQueryAPIKeysRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecurityQueryAPIKeys) WithHuman() func(*SecurityQueryAPIKeysRequest) { + return func(r *SecurityQueryAPIKeysRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecurityQueryAPIKeys) WithErrorTrace() func(*SecurityQueryAPIKeysRequest) { + return func(r *SecurityQueryAPIKeysRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecurityQueryAPIKeys) WithFilterPath(v ...string) func(*SecurityQueryAPIKeysRequest) { + return func(r *SecurityQueryAPIKeysRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecurityQueryAPIKeys) WithHeader(h map[string]string) func(*SecurityQueryAPIKeysRequest) { + return func(r *SecurityQueryAPIKeysRequest) { + 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 SecurityQueryAPIKeys) WithOpaqueID(s string) func(*SecurityQueryAPIKeysRequest) { + return func(r *SecurityQueryAPIKeysRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_authenticate.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_authenticate.go new file mode 100644 index 00000000..d6d26eab --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_authenticate.go @@ -0,0 +1,203 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newSecuritySamlAuthenticateFunc(t Transport) SecuritySamlAuthenticate { + return func(body io.Reader, o ...func(*SecuritySamlAuthenticateRequest)) (*Response, error) { + var r = SecuritySamlAuthenticateRequest{Body: body} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecuritySamlAuthenticate - Exchanges a SAML Response message for an Elasticsearch access token and refresh token pair +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html. +// +type SecuritySamlAuthenticate func(body io.Reader, o ...func(*SecuritySamlAuthenticateRequest)) (*Response, error) + +// SecuritySamlAuthenticateRequest configures the Security Saml Authenticate API request. +// +type SecuritySamlAuthenticateRequest struct { + Body io.Reader + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecuritySamlAuthenticateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(len("/_security/saml/authenticate")) + path.WriteString("/_security/saml/authenticate") + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecuritySamlAuthenticate) WithContext(v context.Context) func(*SecuritySamlAuthenticateRequest) { + return func(r *SecuritySamlAuthenticateRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecuritySamlAuthenticate) WithPretty() func(*SecuritySamlAuthenticateRequest) { + return func(r *SecuritySamlAuthenticateRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecuritySamlAuthenticate) WithHuman() func(*SecuritySamlAuthenticateRequest) { + return func(r *SecuritySamlAuthenticateRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecuritySamlAuthenticate) WithErrorTrace() func(*SecuritySamlAuthenticateRequest) { + return func(r *SecuritySamlAuthenticateRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecuritySamlAuthenticate) WithFilterPath(v ...string) func(*SecuritySamlAuthenticateRequest) { + return func(r *SecuritySamlAuthenticateRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecuritySamlAuthenticate) WithHeader(h map[string]string) func(*SecuritySamlAuthenticateRequest) { + return func(r *SecuritySamlAuthenticateRequest) { + 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 SecuritySamlAuthenticate) WithOpaqueID(s string) func(*SecuritySamlAuthenticateRequest) { + return func(r *SecuritySamlAuthenticateRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_complete_logout.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_complete_logout.go new file mode 100644 index 00000000..849b41b0 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_complete_logout.go @@ -0,0 +1,203 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newSecuritySamlCompleteLogoutFunc(t Transport) SecuritySamlCompleteLogout { + return func(body io.Reader, o ...func(*SecuritySamlCompleteLogoutRequest)) (*Response, error) { + var r = SecuritySamlCompleteLogoutRequest{Body: body} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecuritySamlCompleteLogout - Verifies the logout response sent from the SAML IdP +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html. +// +type SecuritySamlCompleteLogout func(body io.Reader, o ...func(*SecuritySamlCompleteLogoutRequest)) (*Response, error) + +// SecuritySamlCompleteLogoutRequest configures the Security Saml Complete Logout API request. +// +type SecuritySamlCompleteLogoutRequest struct { + Body io.Reader + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecuritySamlCompleteLogoutRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(len("/_security/saml/complete_logout")) + path.WriteString("/_security/saml/complete_logout") + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecuritySamlCompleteLogout) WithContext(v context.Context) func(*SecuritySamlCompleteLogoutRequest) { + return func(r *SecuritySamlCompleteLogoutRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecuritySamlCompleteLogout) WithPretty() func(*SecuritySamlCompleteLogoutRequest) { + return func(r *SecuritySamlCompleteLogoutRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecuritySamlCompleteLogout) WithHuman() func(*SecuritySamlCompleteLogoutRequest) { + return func(r *SecuritySamlCompleteLogoutRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecuritySamlCompleteLogout) WithErrorTrace() func(*SecuritySamlCompleteLogoutRequest) { + return func(r *SecuritySamlCompleteLogoutRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecuritySamlCompleteLogout) WithFilterPath(v ...string) func(*SecuritySamlCompleteLogoutRequest) { + return func(r *SecuritySamlCompleteLogoutRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecuritySamlCompleteLogout) WithHeader(h map[string]string) func(*SecuritySamlCompleteLogoutRequest) { + return func(r *SecuritySamlCompleteLogoutRequest) { + 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 SecuritySamlCompleteLogout) WithOpaqueID(s string) func(*SecuritySamlCompleteLogoutRequest) { + return func(r *SecuritySamlCompleteLogoutRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_invalidate.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_invalidate.go new file mode 100644 index 00000000..7b322927 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_invalidate.go @@ -0,0 +1,203 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newSecuritySamlInvalidateFunc(t Transport) SecuritySamlInvalidate { + return func(body io.Reader, o ...func(*SecuritySamlInvalidateRequest)) (*Response, error) { + var r = SecuritySamlInvalidateRequest{Body: body} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecuritySamlInvalidate - Consumes a SAML LogoutRequest +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html. +// +type SecuritySamlInvalidate func(body io.Reader, o ...func(*SecuritySamlInvalidateRequest)) (*Response, error) + +// SecuritySamlInvalidateRequest configures the Security Saml Invalidate API request. +// +type SecuritySamlInvalidateRequest struct { + Body io.Reader + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecuritySamlInvalidateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(len("/_security/saml/invalidate")) + path.WriteString("/_security/saml/invalidate") + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecuritySamlInvalidate) WithContext(v context.Context) func(*SecuritySamlInvalidateRequest) { + return func(r *SecuritySamlInvalidateRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecuritySamlInvalidate) WithPretty() func(*SecuritySamlInvalidateRequest) { + return func(r *SecuritySamlInvalidateRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecuritySamlInvalidate) WithHuman() func(*SecuritySamlInvalidateRequest) { + return func(r *SecuritySamlInvalidateRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecuritySamlInvalidate) WithErrorTrace() func(*SecuritySamlInvalidateRequest) { + return func(r *SecuritySamlInvalidateRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecuritySamlInvalidate) WithFilterPath(v ...string) func(*SecuritySamlInvalidateRequest) { + return func(r *SecuritySamlInvalidateRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecuritySamlInvalidate) WithHeader(h map[string]string) func(*SecuritySamlInvalidateRequest) { + return func(r *SecuritySamlInvalidateRequest) { + 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 SecuritySamlInvalidate) WithOpaqueID(s string) func(*SecuritySamlInvalidateRequest) { + return func(r *SecuritySamlInvalidateRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_logout.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_logout.go new file mode 100644 index 00000000..76a6d851 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_logout.go @@ -0,0 +1,203 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newSecuritySamlLogoutFunc(t Transport) SecuritySamlLogout { + return func(body io.Reader, o ...func(*SecuritySamlLogoutRequest)) (*Response, error) { + var r = SecuritySamlLogoutRequest{Body: body} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecuritySamlLogout - Invalidates an access token and a refresh token that were generated via the SAML Authenticate API +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html. +// +type SecuritySamlLogout func(body io.Reader, o ...func(*SecuritySamlLogoutRequest)) (*Response, error) + +// SecuritySamlLogoutRequest configures the Security Saml Logout API request. +// +type SecuritySamlLogoutRequest struct { + Body io.Reader + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecuritySamlLogoutRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(len("/_security/saml/logout")) + path.WriteString("/_security/saml/logout") + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecuritySamlLogout) WithContext(v context.Context) func(*SecuritySamlLogoutRequest) { + return func(r *SecuritySamlLogoutRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecuritySamlLogout) WithPretty() func(*SecuritySamlLogoutRequest) { + return func(r *SecuritySamlLogoutRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecuritySamlLogout) WithHuman() func(*SecuritySamlLogoutRequest) { + return func(r *SecuritySamlLogoutRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecuritySamlLogout) WithErrorTrace() func(*SecuritySamlLogoutRequest) { + return func(r *SecuritySamlLogoutRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecuritySamlLogout) WithFilterPath(v ...string) func(*SecuritySamlLogoutRequest) { + return func(r *SecuritySamlLogoutRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecuritySamlLogout) WithHeader(h map[string]string) func(*SecuritySamlLogoutRequest) { + return func(r *SecuritySamlLogoutRequest) { + 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 SecuritySamlLogout) WithOpaqueID(s string) func(*SecuritySamlLogoutRequest) { + return func(r *SecuritySamlLogoutRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_prepare_authentication.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_prepare_authentication.go new file mode 100644 index 00000000..dee1a720 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_prepare_authentication.go @@ -0,0 +1,203 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newSecuritySamlPrepareAuthenticationFunc(t Transport) SecuritySamlPrepareAuthentication { + return func(body io.Reader, o ...func(*SecuritySamlPrepareAuthenticationRequest)) (*Response, error) { + var r = SecuritySamlPrepareAuthenticationRequest{Body: body} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecuritySamlPrepareAuthentication - Creates a SAML authentication request +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html. +// +type SecuritySamlPrepareAuthentication func(body io.Reader, o ...func(*SecuritySamlPrepareAuthenticationRequest)) (*Response, error) + +// SecuritySamlPrepareAuthenticationRequest configures the Security Saml Prepare Authentication API request. +// +type SecuritySamlPrepareAuthenticationRequest struct { + Body io.Reader + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecuritySamlPrepareAuthenticationRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(len("/_security/saml/prepare")) + path.WriteString("/_security/saml/prepare") + + 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 { + 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 r.Body != nil { + req.Header[headerContentType] = headerContentTypeJSON + } + + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecuritySamlPrepareAuthentication) WithContext(v context.Context) func(*SecuritySamlPrepareAuthenticationRequest) { + return func(r *SecuritySamlPrepareAuthenticationRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecuritySamlPrepareAuthentication) WithPretty() func(*SecuritySamlPrepareAuthenticationRequest) { + return func(r *SecuritySamlPrepareAuthenticationRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecuritySamlPrepareAuthentication) WithHuman() func(*SecuritySamlPrepareAuthenticationRequest) { + return func(r *SecuritySamlPrepareAuthenticationRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecuritySamlPrepareAuthentication) WithErrorTrace() func(*SecuritySamlPrepareAuthenticationRequest) { + return func(r *SecuritySamlPrepareAuthenticationRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecuritySamlPrepareAuthentication) WithFilterPath(v ...string) func(*SecuritySamlPrepareAuthenticationRequest) { + return func(r *SecuritySamlPrepareAuthenticationRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecuritySamlPrepareAuthentication) WithHeader(h map[string]string) func(*SecuritySamlPrepareAuthenticationRequest) { + return func(r *SecuritySamlPrepareAuthenticationRequest) { + 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 SecuritySamlPrepareAuthentication) WithOpaqueID(s string) func(*SecuritySamlPrepareAuthenticationRequest) { + return func(r *SecuritySamlPrepareAuthenticationRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_service_provider_metadata.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_service_provider_metadata.go new file mode 100644 index 00000000..7b5ca848 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.security.saml_service_provider_metadata.go @@ -0,0 +1,205 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newSecuritySamlServiceProviderMetadataFunc(t Transport) SecuritySamlServiceProviderMetadata { + return func(realm_name string, o ...func(*SecuritySamlServiceProviderMetadataRequest)) (*Response, error) { + var r = SecuritySamlServiceProviderMetadataRequest{RealmName: realm_name} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecuritySamlServiceProviderMetadata - Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html. +// +type SecuritySamlServiceProviderMetadata func(realm_name string, o ...func(*SecuritySamlServiceProviderMetadataRequest)) (*Response, error) + +// SecuritySamlServiceProviderMetadataRequest configures the Security Saml Service Provider Metadata API request. +// +type SecuritySamlServiceProviderMetadataRequest struct { + RealmName string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SecuritySamlServiceProviderMetadataRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(1 + len("_security") + 1 + len("saml") + 1 + len("metadata") + 1 + len(r.RealmName)) + path.WriteString("/") + path.WriteString("_security") + path.WriteString("/") + path.WriteString("saml") + path.WriteString("/") + path.WriteString("metadata") + path.WriteString("/") + path.WriteString(r.RealmName) + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SecuritySamlServiceProviderMetadata) WithContext(v context.Context) func(*SecuritySamlServiceProviderMetadataRequest) { + return func(r *SecuritySamlServiceProviderMetadataRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SecuritySamlServiceProviderMetadata) WithPretty() func(*SecuritySamlServiceProviderMetadataRequest) { + return func(r *SecuritySamlServiceProviderMetadataRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SecuritySamlServiceProviderMetadata) WithHuman() func(*SecuritySamlServiceProviderMetadataRequest) { + return func(r *SecuritySamlServiceProviderMetadataRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SecuritySamlServiceProviderMetadata) WithErrorTrace() func(*SecuritySamlServiceProviderMetadataRequest) { + return func(r *SecuritySamlServiceProviderMetadataRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SecuritySamlServiceProviderMetadata) WithFilterPath(v ...string) func(*SecuritySamlServiceProviderMetadataRequest) { + return func(r *SecuritySamlServiceProviderMetadataRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SecuritySamlServiceProviderMetadata) WithHeader(h map[string]string) func(*SecuritySamlServiceProviderMetadataRequest) { + return func(r *SecuritySamlServiceProviderMetadataRequest) { + 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 SecuritySamlServiceProviderMetadata) WithOpaqueID(s string) func(*SecuritySamlServiceProviderMetadataRequest) { + return func(r *SecuritySamlServiceProviderMetadataRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.delete_lifecycle.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.delete_lifecycle.go index 61c677ee..f3710d76 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.delete_lifecycle.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.delete_lifecycle.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.execute_lifecycle.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.execute_lifecycle.go index e4349d0c..4679aaae 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.execute_lifecycle.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.execute_lifecycle.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.execute_retention.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.execute_retention.go index 18a54569..1529fe94 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.execute_retention.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.execute_retention.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_lifecycle.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_lifecycle.go index 541c995b..9c5cd849 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_lifecycle.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_lifecycle.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_stats.go index 3ca8866a..5ee78d81 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_status.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_status.go index bb37d8aa..89481c15 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_status.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.get_status.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.put_lifecycle.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.put_lifecycle.go index f1a0a814..ceb3b8c6 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.put_lifecycle.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.put_lifecycle.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.start.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.start.go index e80a495d..fe3b2ff9 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.start.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.start.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.stop.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.stop.go index 34589a04..98bf7242 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.stop.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.slm.stop.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.clear_cursor.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.clear_cursor.go index f623d9b3..5d9156ac 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.clear_cursor.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.clear_cursor.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,7 +40,7 @@ func newSQLClearCursorFunc(t Transport) SQLClearCursor { // SQLClearCursor - Clears the SQL cursor // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-pagination.html. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html. // type SQLClearCursor func(body io.Reader, o ...func(*SQLClearCursorRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.delete_async.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.delete_async.go new file mode 100644 index 00000000..ad09eabe --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.delete_async.go @@ -0,0 +1,205 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newSQLDeleteAsyncFunc(t Transport) SQLDeleteAsync { + return func(id string, o ...func(*SQLDeleteAsyncRequest)) (*Response, error) { + var r = SQLDeleteAsyncRequest{DocumentID: id} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SQLDeleteAsync - Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-async-sql-search-api.html. +// +type SQLDeleteAsync func(id string, o ...func(*SQLDeleteAsyncRequest)) (*Response, error) + +// SQLDeleteAsyncRequest configures the SQL Delete Async API request. +// +type SQLDeleteAsyncRequest struct { + DocumentID string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SQLDeleteAsyncRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "DELETE" + + path.Grow(1 + len("_sql") + 1 + len("async") + 1 + len("delete") + 1 + len(r.DocumentID)) + path.WriteString("/") + path.WriteString("_sql") + path.WriteString("/") + path.WriteString("async") + path.WriteString("/") + path.WriteString("delete") + path.WriteString("/") + path.WriteString(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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SQLDeleteAsync) WithContext(v context.Context) func(*SQLDeleteAsyncRequest) { + return func(r *SQLDeleteAsyncRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SQLDeleteAsync) WithPretty() func(*SQLDeleteAsyncRequest) { + return func(r *SQLDeleteAsyncRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SQLDeleteAsync) WithHuman() func(*SQLDeleteAsyncRequest) { + return func(r *SQLDeleteAsyncRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SQLDeleteAsync) WithErrorTrace() func(*SQLDeleteAsyncRequest) { + return func(r *SQLDeleteAsyncRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SQLDeleteAsync) WithFilterPath(v ...string) func(*SQLDeleteAsyncRequest) { + return func(r *SQLDeleteAsyncRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SQLDeleteAsync) WithHeader(h map[string]string) func(*SQLDeleteAsyncRequest) { + return func(r *SQLDeleteAsyncRequest) { + 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 SQLDeleteAsync) WithOpaqueID(s string) func(*SQLDeleteAsyncRequest) { + return func(r *SQLDeleteAsyncRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.get_async.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.get_async.go new file mode 100644 index 00000000..d490e2d7 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.get_async.go @@ -0,0 +1,257 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" + "time" +) + +func newSQLGetAsyncFunc(t Transport) SQLGetAsync { + return func(id string, o ...func(*SQLGetAsyncRequest)) (*Response, error) { + var r = SQLGetAsyncRequest{DocumentID: id} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SQLGetAsync - Returns the current status and available results for an async SQL search or stored synchronous SQL search +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-api.html. +// +type SQLGetAsync func(id string, o ...func(*SQLGetAsyncRequest)) (*Response, error) + +// SQLGetAsyncRequest configures the SQL Get Async API request. +// +type SQLGetAsyncRequest struct { + DocumentID string + + Delimiter string + Format string + KeepAlive time.Duration + WaitForCompletionTimeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SQLGetAsyncRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(1 + len("_sql") + 1 + len("async") + 1 + len(r.DocumentID)) + path.WriteString("/") + path.WriteString("_sql") + path.WriteString("/") + path.WriteString("async") + path.WriteString("/") + path.WriteString(r.DocumentID) + + params = make(map[string]string) + + if r.Delimiter != "" { + params["delimiter"] = r.Delimiter + } + + if r.Format != "" { + params["format"] = r.Format + } + + if r.KeepAlive != 0 { + params["keep_alive"] = formatDuration(r.KeepAlive) + } + + if r.WaitForCompletionTimeout != 0 { + params["wait_for_completion_timeout"] = formatDuration(r.WaitForCompletionTimeout) + } + + 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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SQLGetAsync) WithContext(v context.Context) func(*SQLGetAsyncRequest) { + return func(r *SQLGetAsyncRequest) { + r.ctx = v + } +} + +// WithDelimiter - separator for csv results. +// +func (f SQLGetAsync) WithDelimiter(v string) func(*SQLGetAsyncRequest) { + return func(r *SQLGetAsyncRequest) { + r.Delimiter = v + } +} + +// WithFormat - short version of the accept header, e.g. json, yaml. +// +func (f SQLGetAsync) WithFormat(v string) func(*SQLGetAsyncRequest) { + return func(r *SQLGetAsyncRequest) { + r.Format = v + } +} + +// WithKeepAlive - retention period for the search and its results. +// +func (f SQLGetAsync) WithKeepAlive(v time.Duration) func(*SQLGetAsyncRequest) { + return func(r *SQLGetAsyncRequest) { + r.KeepAlive = v + } +} + +// WithWaitForCompletionTimeout - duration to wait for complete results. +// +func (f SQLGetAsync) WithWaitForCompletionTimeout(v time.Duration) func(*SQLGetAsyncRequest) { + return func(r *SQLGetAsyncRequest) { + r.WaitForCompletionTimeout = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SQLGetAsync) WithPretty() func(*SQLGetAsyncRequest) { + return func(r *SQLGetAsyncRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SQLGetAsync) WithHuman() func(*SQLGetAsyncRequest) { + return func(r *SQLGetAsyncRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SQLGetAsync) WithErrorTrace() func(*SQLGetAsyncRequest) { + return func(r *SQLGetAsyncRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SQLGetAsync) WithFilterPath(v ...string) func(*SQLGetAsyncRequest) { + return func(r *SQLGetAsyncRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SQLGetAsync) WithHeader(h map[string]string) func(*SQLGetAsyncRequest) { + return func(r *SQLGetAsyncRequest) { + 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 SQLGetAsync) WithOpaqueID(s string) func(*SQLGetAsyncRequest) { + return func(r *SQLGetAsyncRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.get_async_status.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.get_async_status.go new file mode 100644 index 00000000..f623daa0 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.get_async_status.go @@ -0,0 +1,205 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newSQLGetAsyncStatusFunc(t Transport) SQLGetAsyncStatus { + return func(id string, o ...func(*SQLGetAsyncStatusRequest)) (*Response, error) { + var r = SQLGetAsyncStatusRequest{DocumentID: id} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SQLGetAsyncStatus - Returns the current status of an async SQL search or a stored synchronous SQL search +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-status-api.html. +// +type SQLGetAsyncStatus func(id string, o ...func(*SQLGetAsyncStatusRequest)) (*Response, error) + +// SQLGetAsyncStatusRequest configures the SQL Get Async Status API request. +// +type SQLGetAsyncStatusRequest struct { + DocumentID string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r SQLGetAsyncStatusRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "GET" + + path.Grow(1 + len("_sql") + 1 + len("async") + 1 + len("status") + 1 + len(r.DocumentID)) + path.WriteString("/") + path.WriteString("_sql") + path.WriteString("/") + path.WriteString("async") + path.WriteString("/") + path.WriteString("status") + path.WriteString("/") + path.WriteString(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 { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f SQLGetAsyncStatus) WithContext(v context.Context) func(*SQLGetAsyncStatusRequest) { + return func(r *SQLGetAsyncStatusRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f SQLGetAsyncStatus) WithPretty() func(*SQLGetAsyncStatusRequest) { + return func(r *SQLGetAsyncStatusRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f SQLGetAsyncStatus) WithHuman() func(*SQLGetAsyncStatusRequest) { + return func(r *SQLGetAsyncStatusRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f SQLGetAsyncStatus) WithErrorTrace() func(*SQLGetAsyncStatusRequest) { + return func(r *SQLGetAsyncStatusRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f SQLGetAsyncStatus) WithFilterPath(v ...string) func(*SQLGetAsyncStatusRequest) { + return func(r *SQLGetAsyncStatusRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f SQLGetAsyncStatus) WithHeader(h map[string]string) func(*SQLGetAsyncStatusRequest) { + return func(r *SQLGetAsyncStatusRequest) { + 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 SQLGetAsyncStatus) WithOpaqueID(s string) func(*SQLGetAsyncStatusRequest) { + return func(r *SQLGetAsyncStatusRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.query.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.query.go index 0137a146..b3a8698b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.query.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.query.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,7 +40,7 @@ func newSQLQueryFunc(t Transport) SQLQuery { // SQLQuery - Executes a SQL request // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest-overview.html. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html. // type SQLQuery func(body io.Reader, o ...func(*SQLQueryRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.translate.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.translate.go index cbbd6dd5..b85aa103 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.translate.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.sql.translate.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -27,7 +40,7 @@ func newSQLTranslateFunc(t Transport) SQLTranslate { // SQLTranslate - Translates SQL into Elasticsearch queries // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate.html. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html. // type SQLTranslate func(body io.Reader, o ...func(*SQLTranslateRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ssl.certificates.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ssl.certificates.go index 7edbcf0d..4692f881 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ssl.certificates.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.ssl.certificates.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.text_structure.find_structure.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.text_structure.find_structure.go index e2ce23f8..713ad0f4 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.text_structure.find_structure.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.text_structure.find_structure.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -29,8 +42,6 @@ func newTextStructureFindStructureFunc(t Transport) TextStructureFindStructure { // TextStructureFindStructure - Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch. // -// This API is experimental. -// // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html. // type TextStructureFindStructure func(body io.Reader, o ...func(*TextStructureFindStructureRequest)) (*Response, error) diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.delete_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.delete_transform.go index 3578576a..c7e003ad 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.delete_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.delete_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -11,6 +24,7 @@ import ( "net/http" "strconv" "strings" + "time" ) func newTransformDeleteTransformFunc(t Transport) TransformDeleteTransform { @@ -36,7 +50,8 @@ type TransformDeleteTransform func(transform_id string, o ...func(*TransformDele type TransformDeleteTransformRequest struct { TransformID string - Force *bool + Force *bool + Timeout time.Duration Pretty bool Human bool @@ -71,6 +86,10 @@ func (r TransformDeleteTransformRequest) Do(ctx context.Context, transport Trans params["force"] = strconv.FormatBool(*r.Force) } + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -146,6 +165,14 @@ func (f TransformDeleteTransform) WithForce(v bool) func(*TransformDeleteTransfo } } +// WithTimeout - controls the time to wait for the transform deletion. +// +func (f TransformDeleteTransform) WithTimeout(v time.Duration) func(*TransformDeleteTransformRequest) { + return func(r *TransformDeleteTransformRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. // func (f TransformDeleteTransform) WithPretty() func(*TransformDeleteTransformRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.get_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.get_transform.go index fa873654..51dbb317 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.get_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.get_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.get_transform_stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.get_transform_stats.go index 686e6b66..40a42efb 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.get_transform_stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.get_transform_stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.preview_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.preview_transform.go index 043bed16..7242a810 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.preview_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.preview_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -11,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newTransformPreviewTransformFunc(t Transport) TransformPreviewTransform { - return func(body io.Reader, o ...func(*TransformPreviewTransformRequest)) (*Response, error) { - var r = TransformPreviewTransformRequest{Body: body} + return func(o ...func(*TransformPreviewTransformRequest)) (*Response, error) { + var r = TransformPreviewTransformRequest{} for _, f := range o { f(&r) } @@ -29,13 +43,17 @@ func newTransformPreviewTransformFunc(t Transport) TransformPreviewTransform { // // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html. // -type TransformPreviewTransform func(body io.Reader, o ...func(*TransformPreviewTransformRequest)) (*Response, error) +type TransformPreviewTransform func(o ...func(*TransformPreviewTransformRequest)) (*Response, error) // TransformPreviewTransformRequest configures the Transform Preview Transform API request. // type TransformPreviewTransformRequest struct { Body io.Reader + TransformID string + + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -57,11 +75,22 @@ func (r TransformPreviewTransformRequest) Do(ctx context.Context, transport Tran method = "POST" - path.Grow(len("/_transform/_preview")) - path.WriteString("/_transform/_preview") + path.Grow(1 + len("_transform") + 1 + len(r.TransformID) + 1 + len("_preview")) + path.WriteString("/") + path.WriteString("_transform") + if r.TransformID != "" { + path.WriteString("/") + path.WriteString(r.TransformID) + } + path.WriteString("/") + path.WriteString("_preview") params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -133,6 +162,30 @@ func (f TransformPreviewTransform) WithContext(v context.Context) func(*Transfor } } +// WithBody - The definition for the transform to preview. +// +func (f TransformPreviewTransform) WithBody(v io.Reader) func(*TransformPreviewTransformRequest) { + return func(r *TransformPreviewTransformRequest) { + r.Body = v + } +} + +// WithTransformID - the ID of the transform to preview.. +// +func (f TransformPreviewTransform) WithTransformID(v string) func(*TransformPreviewTransformRequest) { + return func(r *TransformPreviewTransformRequest) { + r.TransformID = v + } +} + +// WithTimeout - controls the time to wait for the preview. +// +func (f TransformPreviewTransform) WithTimeout(v time.Duration) func(*TransformPreviewTransformRequest) { + return func(r *TransformPreviewTransformRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. // func (f TransformPreviewTransform) WithPretty() func(*TransformPreviewTransformRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.put_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.put_transform.go index 593b1ce3..69b55db6 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.put_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.put_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -12,6 +25,7 @@ import ( "net/http" "strconv" "strings" + "time" ) func newTransformPutTransformFunc(t Transport) TransformPutTransform { @@ -40,6 +54,7 @@ type TransformPutTransformRequest struct { TransformID string DeferValidation *bool + Timeout time.Duration Pretty bool Human bool @@ -74,6 +89,10 @@ func (r TransformPutTransformRequest) Do(ctx context.Context, transport Transpor params["defer_validation"] = strconv.FormatBool(*r.DeferValidation) } + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -153,6 +172,14 @@ func (f TransformPutTransform) WithDeferValidation(v bool) func(*TransformPutTra } } +// WithTimeout - controls the time to wait for the transform to start. +// +func (f TransformPutTransform) WithTimeout(v time.Duration) func(*TransformPutTransformRequest) { + return func(r *TransformPutTransformRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. // func (f TransformPutTransform) WithPretty() func(*TransformPutTransformRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.start_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.start_transform.go index 82e89bb3..7767e7d1 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.start_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.start_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.stop_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.stop_transform.go index f3bcca2c..bba5f139 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.stop_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.stop_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.update_transform.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.update_transform.go index da93a45d..3780a0cb 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.update_transform.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.update_transform.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -12,6 +25,7 @@ import ( "net/http" "strconv" "strings" + "time" ) func newTransformUpdateTransformFunc(t Transport) TransformUpdateTransform { @@ -40,6 +54,7 @@ type TransformUpdateTransformRequest struct { TransformID string DeferValidation *bool + Timeout time.Duration Pretty bool Human bool @@ -76,6 +91,10 @@ func (r TransformUpdateTransformRequest) Do(ctx context.Context, transport Trans params["defer_validation"] = strconv.FormatBool(*r.DeferValidation) } + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -155,6 +174,14 @@ func (f TransformUpdateTransform) WithDeferValidation(v bool) func(*TransformUpd } } +// WithTimeout - controls the time to wait for the update. +// +func (f TransformUpdateTransform) WithTimeout(v time.Duration) func(*TransformUpdateTransformRequest) { + return func(r *TransformUpdateTransformRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. // func (f TransformUpdateTransform) WithPretty() func(*TransformUpdateTransformRequest) { diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.upgrade_transforms.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.upgrade_transforms.go new file mode 100644 index 00000000..1309d1e5 --- /dev/null +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.transform.upgrade_transforms.go @@ -0,0 +1,225 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 7.16.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" + "time" +) + +func newTransformUpgradeTransformsFunc(t Transport) TransformUpgradeTransforms { + return func(o ...func(*TransformUpgradeTransformsRequest)) (*Response, error) { + var r = TransformUpgradeTransformsRequest{} + for _, f := range o { + f(&r) + } + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// TransformUpgradeTransforms - Upgrades all transforms. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html. +// +type TransformUpgradeTransforms func(o ...func(*TransformUpgradeTransformsRequest)) (*Response, error) + +// TransformUpgradeTransformsRequest configures the Transform Upgrade Transforms API request. +// +type TransformUpgradeTransformsRequest struct { + DryRun *bool + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context +} + +// Do executes the request and returns response or error. +// +func (r TransformUpgradeTransformsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ) + + method = "POST" + + path.Grow(len("/_transform/_upgrade")) + path.WriteString("/_transform/_upgrade") + + params = make(map[string]string) + + if r.DryRun != nil { + params["dry_run"] = strconv.FormatBool(*r.DryRun) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + 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) + } + + res, err := transport.Perform(req) + if err != nil { + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +// +func (f TransformUpgradeTransforms) WithContext(v context.Context) func(*TransformUpgradeTransformsRequest) { + return func(r *TransformUpgradeTransformsRequest) { + r.ctx = v + } +} + +// WithDryRun - whether to only check for updates but don't execute. +// +func (f TransformUpgradeTransforms) WithDryRun(v bool) func(*TransformUpgradeTransformsRequest) { + return func(r *TransformUpgradeTransformsRequest) { + r.DryRun = &v + } +} + +// WithTimeout - controls the time to wait for the upgrade. +// +func (f TransformUpgradeTransforms) WithTimeout(v time.Duration) func(*TransformUpgradeTransformsRequest) { + return func(r *TransformUpgradeTransformsRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +// +func (f TransformUpgradeTransforms) WithPretty() func(*TransformUpgradeTransformsRequest) { + return func(r *TransformUpgradeTransformsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +// +func (f TransformUpgradeTransforms) WithHuman() func(*TransformUpgradeTransformsRequest) { + return func(r *TransformUpgradeTransformsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +// +func (f TransformUpgradeTransforms) WithErrorTrace() func(*TransformUpgradeTransformsRequest) { + return func(r *TransformUpgradeTransformsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +// +func (f TransformUpgradeTransforms) WithFilterPath(v ...string) func(*TransformUpgradeTransformsRequest) { + return func(r *TransformUpgradeTransformsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +// +func (f TransformUpgradeTransforms) WithHeader(h map[string]string) func(*TransformUpgradeTransformsRequest) { + return func(r *TransformUpgradeTransformsRequest) { + 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 TransformUpgradeTransforms) WithOpaqueID(s string) func(*TransformUpgradeTransformsRequest) { + return func(r *TransformUpgradeTransformsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.ack_watch.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.ack_watch.go index 9bb42a10..0c353ea1 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.ack_watch.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.ack_watch.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.activate_watch.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.activate_watch.go index c1ecd5a4..a3138d15 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.activate_watch.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.activate_watch.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.deactivate_watch.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.deactivate_watch.go index 105bfce8..d36341da 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.deactivate_watch.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.deactivate_watch.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.delete_watch.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.delete_watch.go index 5e54d478..0f39b26f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.delete_watch.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.delete_watch.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.execute_watch.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.execute_watch.go index 495dbd0d..755fecc2 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.execute_watch.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.execute_watch.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.get_watch.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.get_watch.go index 225f0e85..d7b131c4 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.get_watch.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.get_watch.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.put_watch.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.put_watch.go index 7a4f726f..447d59cb 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.put_watch.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.put_watch.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.query_watches.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.query_watches.go index 6f529c87..0197f220 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.query_watches.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.query_watches.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi @@ -55,7 +68,7 @@ func (r WatcherQueryWatchesRequest) Do(ctx context.Context, transport Transport) params map[string]string ) - method = "GET" + method = "POST" path.Grow(len("/_watcher/_query/watches")) path.WriteString("/_watcher/_query/watches") diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.start.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.start.go index 47cc7189..47f2564f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.start.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.start.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.stats.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.stats.go index f7648800..224620c9 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.stats.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.stats.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.stop.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.stop.go index b738f604..85cd8cfd 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.stop.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.watcher.stop.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.xpack.info.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.xpack.info.go index db8d0ca9..db2f92ef 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.xpack.info.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.xpack.info.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.xpack.usage.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.xpack.usage.go index c6a3bf7c..38faa9af 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.xpack.usage.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/api.xpack.xpack.usage.go @@ -1,8 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// Code generated from specification version 7.12.0: DO NOT EDIT +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 7.16.0: DO NOT EDIT package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/doc.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/doc.go index f522175f..404d6bca 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/doc.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/doc.go @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + /* Package esapi provides the Go API for Elasticsearch. diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.go index f7ef9dae..2efb1c2f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.go @@ -1,6 +1,19 @@ -// Licensed to Elasticsearch B.V. under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.request.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.request.go index d967fc61..23498361 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.request.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.request.go @@ -1,6 +1,19 @@ -// Licensed to Elasticsearch B.V. under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.response.go b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.response.go index b542aeca..a657b5ee 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.response.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/esapi/esapi.response.go @@ -1,6 +1,19 @@ -// Licensed to Elasticsearch B.V. under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package esapi diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/connection.go b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/connection.go index 7764a503..53eb081b 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/connection.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/connection.go @@ -1,6 +1,19 @@ -// Licensed to Elasticsearch B.V. under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package estransport diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/discovery.go b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/discovery.go index a7500d3a..ccbb586a 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/discovery.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/discovery.go @@ -1,6 +1,19 @@ -// Licensed to Elasticsearch B.V. under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package estransport @@ -30,7 +43,7 @@ type nodeInfo struct { ID string Name string URL *url.URL - Roles []string + Roles []string `json:"roles"` Attributes map[string]interface{} HTTP struct { PublishAddress string `json:"publish_address"` @@ -52,23 +65,19 @@ func (c *Client) DiscoverNodes() error { for _, node := range nodes { var ( - isDataNode bool - isIngestNode bool + isMasterOnlyNode bool ) roles := append(node.Roles[:0:0], node.Roles...) sort.Strings(roles) - if i := sort.SearchStrings(roles, "data"); i < len(roles) && roles[i] == "data" { - isDataNode = true - } - if i := sort.SearchStrings(roles, "ingest"); i < len(roles) && roles[i] == "ingest" { - isIngestNode = true + if len(roles) == 1 && roles[0] == "master" { + isMasterOnlyNode = true } if debugLogger != nil { var skip string - if !isDataNode || !isIngestNode { + if isMasterOnlyNode { skip = "; [SKIP]" } debugLogger.Logf("Discovered node [%s]; %s; roles=%s%s\n", node.Name, node.URL, node.Roles, skip) @@ -76,7 +85,7 @@ func (c *Client) DiscoverNodes() error { // Skip master only nodes // TODO(karmi): Move logic to Selector? - if !isDataNode || !isIngestNode { + if isMasterOnlyNode { continue } diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/doc.go b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/doc.go index 096b7307..56731074 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/doc.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/doc.go @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + /* Package estransport provides the transport layer for the Elasticsearch client. diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/estransport.go b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/estransport.go index d8782cc7..6680e26c 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/estransport.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/estransport.go @@ -1,12 +1,29 @@ -// Licensed to Elasticsearch B.V. under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package estransport import ( "bytes" + "compress/gzip" + "crypto/sha256" + "crypto/tls" "crypto/x509" + "encoding/hex" "errors" "fmt" "io" @@ -17,6 +34,7 @@ import ( "os" "regexp" "runtime" + "strconv" "strings" "sync" "time" @@ -24,14 +42,21 @@ import ( "github.com/elastic/go-elasticsearch/v7/internal/version" ) -// Version returns the package version as a string. -// -const Version = version.Client +const ( + // Version returns the package version as a string. + Version = version.Client + + // esCompatHeader defines the env var for Compatibility header. + esCompatHeader = "ELASTIC_CLIENT_APIVERSIONING" + + userAgentHeader = "User-Agent" +) var ( - userAgent string - metaHeader string - reGoVersion = regexp.MustCompile(`go(\d+\.\d+\..+)`) + userAgent string + metaHeader string + compatibilityHeader bool + reGoVersion = regexp.MustCompile(`go(\d+\.\d+\..+)`) defaultMaxRetries = 3 defaultRetryOnStatus = [...]int{502, 503, 504} @@ -40,6 +65,9 @@ var ( func init() { userAgent = initUserAgent() metaHeader = initMetaHeader() + + compatHeaderEnv := os.Getenv(esCompatHeader) + compatibilityHeader, _ = strconv.ParseBool(compatHeaderEnv) } // Interface defines the interface for HTTP client. @@ -51,10 +79,11 @@ type Interface interface { // Config represents the configuration of HTTP client. // type Config struct { - URLs []*url.URL - Username string - Password string - APIKey string + URLs []*url.URL + Username string + Password string + APIKey string + ServiceToken string Header http.Header CACert []byte @@ -65,6 +94,9 @@ type Config struct { MaxRetries int RetryBackoff func(attempt int) time.Duration + CompressRequestBody bool + CompatibilityHeader bool + EnableMetrics bool EnableDebugLogger bool @@ -77,6 +109,8 @@ type Config struct { Selector Selector ConnectionPoolFunc func([]*Connection, Selector) ConnectionPool + + CertificateFingerprint string } // Client represents the HTTP client. @@ -84,21 +118,26 @@ type Config struct { type Client struct { sync.Mutex - urls []*url.URL - username string - password string - apikey string - header http.Header + urls []*url.URL + username string + password string + apikey string + servicetoken string + fingerprint string + header http.Header retryOnStatus []int disableRetry bool enableRetryOnTimeout bool - disableMetaHeader bool + disableMetaHeader bool maxRetries int retryBackoff func(attempt int) time.Duration discoverNodesInterval time.Duration discoverNodesTimer *time.Timer + compressRequestBody bool + compatibilityHeader bool + metrics *metrics transport http.RoundTripper @@ -117,6 +156,32 @@ func New(cfg Config) (*Client, error) { cfg.Transport = http.DefaultTransport } + if transport, ok := cfg.Transport.(*http.Transport); ok { + if cfg.CertificateFingerprint != "" { + transport.DialTLS = func(network, addr string) (net.Conn, error) { + fingerprint, _ := hex.DecodeString(cfg.CertificateFingerprint) + + c, err := tls.Dial(network, addr, &tls.Config{InsecureSkipVerify: true}) + if err != nil { + return nil, err + } + + // Retrieve the connection state from the remote server. + cState := c.ConnectionState() + for _, cert := range cState.PeerCertificates { + // Compute digest for each certificate. + digest := sha256.Sum256(cert.Raw) + + // Provided fingerprint should match at least one certificate from remote before we continue. + if bytes.Compare(digest[0:], fingerprint) == 0 { + return c, nil + } + } + return nil, fmt.Errorf("fingerprint mismatch, provided: %s", cfg.CertificateFingerprint) + } + } + } + if cfg.CACert != nil { httpTransport, ok := cfg.Transport.(*http.Transport) if !ok { @@ -147,20 +212,24 @@ func New(cfg Config) (*Client, error) { } client := Client{ - urls: cfg.URLs, - username: cfg.Username, - password: cfg.Password, - apikey: cfg.APIKey, - header: cfg.Header, + urls: cfg.URLs, + username: cfg.Username, + password: cfg.Password, + apikey: cfg.APIKey, + servicetoken: cfg.ServiceToken, + header: cfg.Header, retryOnStatus: cfg.RetryOnStatus, disableRetry: cfg.DisableRetry, enableRetryOnTimeout: cfg.EnableRetryOnTimeout, - disableMetaHeader: cfg.DisableMetaHeader, + disableMetaHeader: cfg.DisableMetaHeader, maxRetries: cfg.MaxRetries, retryBackoff: cfg.RetryBackoff, discoverNodesInterval: cfg.DiscoverNodesInterval, + compressRequestBody: cfg.CompressRequestBody, + compatibilityHeader: cfg.CompatibilityHeader, + transport: cfg.Transport, logger: cfg.Logger, selector: cfg.Selector, @@ -205,6 +274,14 @@ func (c *Client) Perform(req *http.Request) (*http.Response, error) { err error ) + // Compatibility Header + if compatibilityHeader || c.compatibilityHeader { + if req.Body != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=7") + } + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=7") + } + // Record metrics, when enabled if c.metrics != nil { c.metrics.Lock() @@ -217,16 +294,36 @@ func (c *Client) Perform(req *http.Request) (*http.Response, error) { c.setReqGlobalHeader(req) c.setMetaHeader(req) - if req.Body != nil && req.Body != http.NoBody && req.GetBody == nil { - if !c.disableRetry || (c.logger != nil && c.logger.RequestBodyEnabled()) { + if req.Body != nil && req.Body != http.NoBody { + if c.compressRequestBody { var buf bytes.Buffer - buf.ReadFrom(req.Body) + zw := gzip.NewWriter(&buf) + if _, err := io.Copy(zw, req.Body); err != nil { + return nil, fmt.Errorf("failed to compress request body: %s", err) + } + if err := zw.Close(); err != nil { + return nil, fmt.Errorf("failed to compress request body (during close): %s", err) + } + req.GetBody = func() (io.ReadCloser, error) { r := buf return ioutil.NopCloser(&r), nil } - if req.Body, err = req.GetBody(); err != nil { - return nil, fmt.Errorf("cannot get request body: %s", err) + req.Body, _ = req.GetBody() + + req.Header.Set("Content-Encoding", "gzip") + req.ContentLength = int64(buf.Len()) + + } else if req.GetBody == nil { + if !c.disableRetry || (c.logger != nil && c.logger.RequestBodyEnabled()) { + var buf bytes.Buffer + buf.ReadFrom(req.Body) + + req.GetBody = func() (io.ReadCloser, error) { + r := buf + return ioutil.NopCloser(&r), nil + } + req.Body, _ = req.GetBody() } } } @@ -336,7 +433,19 @@ func (c *Client) Perform(req *http.Request) (*http.Response, error) { // Delay the retry if a backoff function is configured if c.retryBackoff != nil { - time.Sleep(c.retryBackoff(i + 1)) + var cancelled bool + backoff := c.retryBackoff(i + 1) + timer := time.NewTimer(backoff) + select { + case <-req.Context().Done(): + err = req.Context().Err() + cancelled = true + timer.Stop() + case <-timer.C: + } + if cancelled { + break + } } } @@ -383,6 +492,15 @@ func (c *Client) setReqAuth(u *url.URL, req *http.Request) *http.Request { return req } + if c.servicetoken != "" { + var b bytes.Buffer + b.Grow(len("Bearer ") + len(c.servicetoken)) + b.WriteString("Bearer ") + b.WriteString(c.servicetoken) + req.Header.Set("Authorization", b.String()) + return req + } + if c.username != "" && c.password != "" { req.SetBasicAuth(c.username, c.password) return req @@ -393,7 +511,14 @@ func (c *Client) setReqAuth(u *url.URL, req *http.Request) *http.Request { } func (c *Client) setReqUserAgent(req *http.Request) *http.Request { - req.Header.Set("User-Agent", userAgent) + if len(c.header) > 0 { + ua := c.header.Get(userAgentHeader) + if ua != "" { + req.Header.Set(userAgentHeader, ua) + return req + } + } + req.Header.Set(userAgentHeader, userAgent) return req } @@ -418,7 +543,7 @@ func (c *Client) setMetaHeader(req *http.Request) *http.Request { existingMetaHeader := req.Header.Get(HeaderClientMeta) if existingMetaHeader != "" { - req.Header.Set(HeaderClientMeta, strings.Join([]string{metaHeader, existingMetaHeader},",")) + req.Header.Set(HeaderClientMeta, strings.Join([]string{metaHeader, existingMetaHeader}, ",")) } else { req.Header.Add(HeaderClientMeta, metaHeader) } @@ -467,4 +592,4 @@ func initUserAgent() string { b.WriteRune(')') return b.String() -} \ No newline at end of file +} diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/logger.go b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/logger.go index 4f0af98a..fb368c30 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/logger.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/logger.go @@ -1,6 +1,19 @@ -// Licensed to Elasticsearch B.V. under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package estransport diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/metaheader.go b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/metaheader.go index b310e23c..190c5a0f 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/metaheader.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/metaheader.go @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + package estransport import ( diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/metrics.go b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/metrics.go index c01df0a2..591c2625 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/estransport/metrics.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/estransport/metrics.go @@ -1,6 +1,19 @@ -// Licensed to Elasticsearch B.V. under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package estransport diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/go.sum b/vendor/github.com/elastic/go-elasticsearch/v7/go.sum deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/github.com/elastic/go-elasticsearch/v7/internal/version/version.go b/vendor/github.com/elastic/go-elasticsearch/v7/internal/version/version.go index 3f05ca8f..e9296443 100644 --- a/vendor/github.com/elastic/go-elasticsearch/v7/internal/version/version.go +++ b/vendor/github.com/elastic/go-elasticsearch/v7/internal/version/version.go @@ -1,9 +1,22 @@ -// Licensed to Elasticsearch B.V. under one or more agreements. -// Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package version // Client returns the client version as a string. // -const Client = "7.12.0" +const Client = "7.16.0" diff --git a/vendor/modules.txt b/vendor/modules.txt index a385ca2b..06cf4a5f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -79,7 +79,7 @@ github.com/bgentry/go-netrc/netrc github.com/bgentry/speakeasy # github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew/spew -# github.com/elastic/go-elasticsearch/v7 v7.12.0 +# github.com/elastic/go-elasticsearch/v7 v7.16.0 ## explicit github.com/elastic/go-elasticsearch/v7 github.com/elastic/go-elasticsearch/v7/esapi