diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 36bab6c67..8a9c2615d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -2,7 +2,7 @@ steps: - label: ":java: :elasticsearch: Elasticsearch Java API client - {{matrix.workflow}}" agents: provider: "gcp" - branches: [ "main", "7.17", "8.14", "8.15" ] + branches: [ "main", "7.17", "8.15", "8.x", "9.0" ] matrix: setup: workflow: diff --git a/config/version.txt b/config/version.txt index 894aa0bc6..f7ee06693 100644 --- a/config/version.txt +++ b/config/version.txt @@ -1 +1 @@ -8.16.0 +9.0.0 diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java index 37cfcd5e1..d17c58377 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java @@ -24,6 +24,7 @@ import co.elastic.clients.elasticsearch.async_search.ElasticsearchAsyncSearchAsyncClient; import co.elastic.clients.elasticsearch.cat.ElasticsearchCatAsyncClient; import co.elastic.clients.elasticsearch.cluster.ElasticsearchClusterAsyncClient; +import co.elastic.clients.elasticsearch.connector.ElasticsearchConnectorAsyncClient; import co.elastic.clients.elasticsearch.core.BulkRequest; import co.elastic.clients.elasticsearch.core.BulkResponse; import co.elastic.clients.elasticsearch.core.ClearScrollRequest; @@ -170,6 +171,10 @@ public ElasticsearchClusterAsyncClient cluster() { return new ElasticsearchClusterAsyncClient(this.transport, this.transportOptions); } + public ElasticsearchConnectorAsyncClient connector() { + return new ElasticsearchConnectorAsyncClient(this.transport, this.transportOptions); + } + public ElasticsearchEnrichAsyncClient enrich() { return new ElasticsearchEnrichAsyncClient(this.transport, this.transportOptions); } @@ -241,8 +246,9 @@ public ElasticsearchTransformAsyncClient transform() { // ----- Endpoint: bulk /** - * Performs multiple indexing or delete operations in a single API call. This - * reduces overhead and can greatly increase indexing speed. + * Bulk index or delete documents. Performs multiple indexing or delete + * operations in a single API call. This reduces overhead and can greatly + * increase indexing speed. * * @see Documentation @@ -257,8 +263,9 @@ public CompletableFuture bulk(BulkRequest request) { } /** - * Performs multiple indexing or delete operations in a single API call. This - * reduces overhead and can greatly increase indexing speed. + * Bulk index or delete documents. Performs multiple indexing or delete + * operations in a single API call. This reduces overhead and can greatly + * increase indexing speed. * * @param fn * a function that initializes a builder to create the @@ -273,8 +280,9 @@ public final CompletableFuture bulk(FunctionDocumentation @@ -414,9 +422,9 @@ public CompletableFuture count() { // ----- Endpoint: create /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see Documentation @@ -431,9 +439,9 @@ public CompletableFuture create(CreateRequest CompletableFuture create( // ----- Endpoint: delete /** - * Removes a JSON document from the specified index. + * Delete a document. Removes a JSON document from the specified index. * * @see Documentation @@ -466,7 +474,7 @@ public CompletableFuture delete(DeleteRequest request) { } /** - * Removes a JSON document from the specified index. + * Delete a document. Removes a JSON document from the specified index. * * @param fn * a function that initializes a builder to create the @@ -484,7 +492,7 @@ public final CompletableFuture delete( // ----- Endpoint: delete_by_query /** - * Deletes documents that match the specified query. + * Delete documents. Deletes documents that match the specified query. * * @see Documentation @@ -499,7 +507,7 @@ public CompletableFuture deleteByQuery(DeleteByQueryReque } /** - * Deletes documents that match the specified query. + * Delete documents. Deletes documents that match the specified query. * * @param fn * a function that initializes a builder to create the @@ -517,7 +525,8 @@ public final CompletableFuture deleteByQuery( // ----- Endpoint: delete_script /** - * Deletes a stored script or search template. + * Delete a script or search template. Deletes a stored script or search + * template. * * @see Documentation @@ -532,7 +541,8 @@ public CompletableFuture deleteScript(DeleteScriptRequest } /** - * Deletes a stored script or search template. + * Delete a script or search template. Deletes a stored script or search + * template. * * @param fn * a function that initializes a builder to create the @@ -550,7 +560,7 @@ public final CompletableFuture deleteScript( // ----- Endpoint: exists /** - * Checks if a document in an index exists. + * Check a document. Checks if a specified document exists. * * @see Documentation @@ -565,7 +575,7 @@ public CompletableFuture exists(ExistsRequest request) { } /** - * Checks if a document in an index exists. + * Check a document. Checks if a specified document exists. * * @param fn * a function that initializes a builder to create the @@ -583,7 +593,8 @@ public final CompletableFuture exists( // ----- Endpoint: exists_source /** - * Checks if a document's _source is stored. + * Check for a document source. Checks if a document's _source is + * stored. * * @see Documentation @@ -598,7 +609,8 @@ public CompletableFuture existsSource(ExistsSourceRequest reque } /** - * Checks if a document's _source is stored. + * Check for a document source. Checks if a document's _source is + * stored. * * @param fn * a function that initializes a builder to create the @@ -616,8 +628,8 @@ public final CompletableFuture existsSource( // ----- Endpoint: explain /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @see Documentation @@ -635,8 +647,8 @@ public CompletableFuture> explain(Explain } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @param fn * a function that initializes a builder to create the @@ -652,8 +664,8 @@ public final CompletableFuture> explain( } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @see Documentation @@ -671,8 +683,8 @@ public CompletableFuture> explain(Explain } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @param fn * a function that initializes a builder to create the @@ -748,7 +760,8 @@ public CompletableFuture fieldCaps() { // ----- Endpoint: get /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @see Documentation @@ -766,7 +779,8 @@ public CompletableFuture> get(GetRequest requ } /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @param fn * a function that initializes a builder to create the @@ -782,7 +796,8 @@ public final CompletableFuture> get( } /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @see Documentation @@ -799,7 +814,8 @@ public CompletableFuture> get(GetRequest requ } /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @param fn * a function that initializes a builder to create the @@ -817,7 +833,8 @@ public final CompletableFuture> get( // ----- Endpoint: get_script /** - * Retrieves a stored script or search template. + * Get a script or search template. Retrieves a stored script or search + * template. * * @see Documentation @@ -832,7 +849,8 @@ public CompletableFuture getScript(GetScriptRequest request) } /** - * Retrieves a stored script or search template. + * Get a script or search template. Retrieves a stored script or search + * template. * * @param fn * a function that initializes a builder to create the @@ -850,7 +868,7 @@ public final CompletableFuture getScript( // ----- Endpoint: get_source /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @see Documentation @@ -869,7 +887,7 @@ public CompletableFuture> getSource(Get } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @param fn * a function that initializes a builder to create the @@ -885,7 +903,7 @@ public final CompletableFuture> getSour } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @see Documentation @@ -904,7 +922,7 @@ public CompletableFuture> getSource(Get } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @param fn * a function that initializes a builder to create the @@ -922,9 +940,9 @@ public final CompletableFuture> getSour // ----- Endpoint: index /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see Documentation @@ -939,9 +957,9 @@ public CompletableFuture index(IndexRequest CompletableFuture index( // ----- Endpoint: info /** - * Returns basic information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @see Documentation @@ -1277,7 +1295,7 @@ public final CompletableFuture openPointInTime( // ----- Endpoint: ping /** - * Returns whether the cluster is running. + * Ping the cluster. Returns whether the cluster is running. * * @see Documentation @@ -1290,7 +1308,8 @@ public CompletableFuture ping() { // ----- Endpoint: put_script /** - * Creates or updates a stored script or search template. + * Create or update a script or search template. Creates or updates a stored + * script or search template. * * @see Documentation @@ -1305,7 +1324,8 @@ public CompletableFuture putScript(PutScriptRequest request) } /** - * Creates or updates a stored script or search template. + * Create or update a script or search template. Creates or updates a stored + * script or search template. * * @param fn * a function that initializes a builder to create the @@ -1358,9 +1378,10 @@ public final CompletableFuture rankEval( // ----- Endpoint: reindex /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. + * Reindex documents. Copies documents from a source to a destination. The + * source can be any existing index, alias, or data stream. The destination must + * differ from the source. For example, you cannot reindex a data stream into + * itself. * * @see Documentation @@ -1375,9 +1396,10 @@ public CompletableFuture reindex(ReindexRequest request) { } /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. + * Reindex documents. Copies documents from a source to a destination. The + * source can be any existing index, alias, or data stream. The destination must + * differ from the source. For example, you cannot reindex a data stream into + * itself. * * @param fn * a function that initializes a builder to create the @@ -1441,7 +1463,7 @@ public CompletableFuture renderSearchTemplate() { // ----- Endpoint: scripts_painless_execute /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @see Documentation @@ -1460,7 +1482,7 @@ public CompletableFuture> scri } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @param fn * a function that initializes a builder to create the @@ -1477,7 +1499,7 @@ public final CompletableFuture } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @see Documentation @@ -1496,7 +1518,7 @@ public CompletableFuture> scri } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @param fn * a function that initializes a builder to create the @@ -1661,8 +1683,7 @@ public final CompletableFuture> search( // ----- Endpoint: search_mvt /** - * Searches a vector tile for geospatial values. Returns results as a binary - * Mapbox vector tile. + * Search a vector tile. Searches a vector tile for geospatial values. * * @see Documentation @@ -1677,8 +1698,7 @@ public CompletableFuture searchMvt(SearchMvtRequest request) { } /** - * Searches a vector tile for geospatial values. Returns results as a binary - * Mapbox vector tile. + * Search a vector tile. Searches a vector tile for geospatial values. * * @param fn * a function that initializes a builder to create the @@ -1806,8 +1826,8 @@ public final CompletableFuture termsEnum( // ----- Endpoint: termvectors /** - * Returns information and statistics about terms in the fields of a particular - * document. + * Get term vector information. Returns information and statistics about terms + * in the fields of a particular document. * * @see Documentation @@ -1822,8 +1842,8 @@ public CompletableFuture termvectors(Termvector } /** - * Returns information and statistics about terms in the fields of a particular - * document. + * Get term vector information. Returns information and statistics about terms + * in the fields of a particular document. * * @param fn * a function that initializes a builder to create the @@ -1841,7 +1861,8 @@ public final CompletableFuture termvectors( // ----- Endpoint: update /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @see Documentation @@ -1859,7 +1880,8 @@ public CompletableFuture } /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @param fn * a function that initializes a builder to create the @@ -1876,7 +1898,8 @@ public final CompletableFutureDocumentation @@ -1894,7 +1917,8 @@ public CompletableFuture } /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @param fn * a function that initializes a builder to create the @@ -1913,9 +1937,10 @@ public final CompletableFutureDocumentation @@ -1930,9 +1955,10 @@ public CompletableFuture updateByQuery(UpdateByQueryReque } /** - * Updates documents that match the specified query. If no query is specified, - * performs an update on every document in the data stream or index without - * modifying the source, which is useful for picking up mapping changes. + * Update documents. Updates documents that match the specified query. If no + * query is specified, performs an update on every document in the data stream + * or index without modifying the source, which is useful for picking up mapping + * changes. * * @param fn * a function that initializes a builder to create the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java index 07696bde9..63ece3e8c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java @@ -25,6 +25,7 @@ import co.elastic.clients.elasticsearch.async_search.ElasticsearchAsyncSearchClient; import co.elastic.clients.elasticsearch.cat.ElasticsearchCatClient; import co.elastic.clients.elasticsearch.cluster.ElasticsearchClusterClient; +import co.elastic.clients.elasticsearch.connector.ElasticsearchConnectorClient; import co.elastic.clients.elasticsearch.core.BulkRequest; import co.elastic.clients.elasticsearch.core.BulkResponse; import co.elastic.clients.elasticsearch.core.ClearScrollRequest; @@ -171,6 +172,10 @@ public ElasticsearchClusterClient cluster() { return new ElasticsearchClusterClient(this.transport, this.transportOptions); } + public ElasticsearchConnectorClient connector() { + return new ElasticsearchConnectorClient(this.transport, this.transportOptions); + } + public ElasticsearchEnrichClient enrich() { return new ElasticsearchEnrichClient(this.transport, this.transportOptions); } @@ -242,8 +247,9 @@ public ElasticsearchTransformClient transform() { // ----- Endpoint: bulk /** - * Performs multiple indexing or delete operations in a single API call. This - * reduces overhead and can greatly increase indexing speed. + * Bulk index or delete documents. Performs multiple indexing or delete + * operations in a single API call. This reduces overhead and can greatly + * increase indexing speed. * * @see Documentation @@ -258,8 +264,9 @@ public BulkResponse bulk(BulkRequest request) throws IOException, ElasticsearchE } /** - * Performs multiple indexing or delete operations in a single API call. This - * reduces overhead and can greatly increase indexing speed. + * Bulk index or delete documents. Performs multiple indexing or delete + * operations in a single API call. This reduces overhead and can greatly + * increase indexing speed. * * @param fn * a function that initializes a builder to create the @@ -275,8 +282,9 @@ public final BulkResponse bulk(FunctionDocumentation @@ -419,9 +427,9 @@ public CountResponse count() throws IOException, ElasticsearchException { // ----- Endpoint: create /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see Documentation @@ -437,9 +445,9 @@ public CreateResponse create(CreateRequest request) } /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @param fn * a function that initializes a builder to create the @@ -458,7 +466,7 @@ public final CreateResponse create( // ----- Endpoint: delete /** - * Removes a JSON document from the specified index. + * Delete a document. Removes a JSON document from the specified index. * * @see Documentation @@ -473,7 +481,7 @@ public DeleteResponse delete(DeleteRequest request) throws IOException, Elastics } /** - * Removes a JSON document from the specified index. + * Delete a document. Removes a JSON document from the specified index. * * @param fn * a function that initializes a builder to create the @@ -491,7 +499,7 @@ public final DeleteResponse delete(FunctionDocumentation @@ -507,7 +515,7 @@ public DeleteByQueryResponse deleteByQuery(DeleteByQueryRequest request) } /** - * Deletes documents that match the specified query. + * Delete documents. Deletes documents that match the specified query. * * @param fn * a function that initializes a builder to create the @@ -526,7 +534,8 @@ public final DeleteByQueryResponse deleteByQuery( // ----- Endpoint: delete_script /** - * Deletes a stored script or search template. + * Delete a script or search template. Deletes a stored script or search + * template. * * @see Documentation @@ -541,7 +550,8 @@ public DeleteScriptResponse deleteScript(DeleteScriptRequest request) throws IOE } /** - * Deletes a stored script or search template. + * Delete a script or search template. Deletes a stored script or search + * template. * * @param fn * a function that initializes a builder to create the @@ -560,7 +570,7 @@ public final DeleteScriptResponse deleteScript( // ----- Endpoint: exists /** - * Checks if a document in an index exists. + * Check a document. Checks if a specified document exists. * * @see Documentation @@ -575,7 +585,7 @@ public BooleanResponse exists(ExistsRequest request) throws IOException, Elastic } /** - * Checks if a document in an index exists. + * Check a document. Checks if a specified document exists. * * @param fn * a function that initializes a builder to create the @@ -593,7 +603,8 @@ public final BooleanResponse exists(Function_source is stored. + * Check for a document source. Checks if a document's _source is + * stored. * * @see Documentation @@ -608,7 +619,8 @@ public BooleanResponse existsSource(ExistsSourceRequest request) throws IOExcept } /** - * Checks if a document's _source is stored. + * Check for a document source. Checks if a document's _source is + * stored. * * @param fn * a function that initializes a builder to create the @@ -627,8 +639,8 @@ public final BooleanResponse existsSource( // ----- Endpoint: explain /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @see Documentation @@ -646,8 +658,8 @@ public ExplainResponse explain(ExplainRequest request, Cl } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @param fn * a function that initializes a builder to create the @@ -664,8 +676,8 @@ public final ExplainResponse explain( } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @see Documentation @@ -683,8 +695,8 @@ public ExplainResponse explain(ExplainRequest request, Ty } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @param fn * a function that initializes a builder to create the @@ -761,7 +773,8 @@ public FieldCapsResponse fieldCaps() throws IOException, ElasticsearchException // ----- Endpoint: get /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @see Documentation @@ -779,7 +792,8 @@ public GetResponse get(GetRequest request, Class GetResponse get(FunctionDocumentation @@ -813,7 +828,8 @@ public GetResponse get(GetRequest request, Type tDocument } /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @param fn * a function that initializes a builder to create the @@ -831,7 +847,8 @@ public final GetResponse get(FunctionDocumentation @@ -846,7 +863,8 @@ public GetScriptResponse getScript(GetScriptRequest request) throws IOException, } /** - * Retrieves a stored script or search template. + * Get a script or search template. Retrieves a stored script or search + * template. * * @param fn * a function that initializes a builder to create the @@ -864,7 +882,7 @@ public final GetScriptResponse getScript(FunctionDocumentation @@ -883,7 +901,7 @@ public GetSourceResponse getSource(GetSourceRequest reque } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @param fn * a function that initializes a builder to create the @@ -900,7 +918,7 @@ public final GetSourceResponse getSource( } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @see Documentation @@ -919,7 +937,7 @@ public GetSourceResponse getSource(GetSourceRequest reque } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @param fn * a function that initializes a builder to create the @@ -938,9 +956,9 @@ public final GetSourceResponse getSource( // ----- Endpoint: index /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see Documentation @@ -955,9 +973,9 @@ public IndexResponse index(IndexRequest request) throws I } /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @param fn * a function that initializes a builder to create the @@ -976,7 +994,7 @@ public final IndexResponse index( // ----- Endpoint: info /** - * Returns basic information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @see Documentation @@ -1301,7 +1319,7 @@ public final OpenPointInTimeResponse openPointInTime( // ----- Endpoint: ping /** - * Returns whether the cluster is running. + * Ping the cluster. Returns whether the cluster is running. * * @see Documentation @@ -1314,7 +1332,8 @@ public BooleanResponse ping() throws IOException, ElasticsearchException { // ----- Endpoint: put_script /** - * Creates or updates a stored script or search template. + * Create or update a script or search template. Creates or updates a stored + * script or search template. * * @see Documentation @@ -1329,7 +1348,8 @@ public PutScriptResponse putScript(PutScriptRequest request) throws IOException, } /** - * Creates or updates a stored script or search template. + * Create or update a script or search template. Creates or updates a stored + * script or search template. * * @param fn * a function that initializes a builder to create the @@ -1382,9 +1402,10 @@ public final RankEvalResponse rankEval(FunctionDocumentation @@ -1399,9 +1420,10 @@ public ReindexResponse reindex(ReindexRequest request) throws IOException, Elast } /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. + * Reindex documents. Copies documents from a source to a destination. The + * source can be any existing index, alias, or data stream. The destination must + * differ from the source. For example, you cannot reindex a data stream into + * itself. * * @param fn * a function that initializes a builder to create the @@ -1467,7 +1489,7 @@ public RenderSearchTemplateResponse renderSearchTemplate() throws IOException, E // ----- Endpoint: scripts_painless_execute /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @see Documentation @@ -1487,7 +1509,7 @@ public ScriptsPainlessExecuteResponse scriptsPainlessExecute( } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @param fn * a function that initializes a builder to create the @@ -1504,7 +1526,7 @@ public final ScriptsPainlessExecuteResponse scriptsPainlessEx } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @see Documentation @@ -1523,7 +1545,7 @@ public ScriptsPainlessExecuteResponse scriptsPainlessExecute( } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @param fn * a function that initializes a builder to create the @@ -1694,8 +1716,7 @@ public final SearchResponse search( // ----- Endpoint: search_mvt /** - * Searches a vector tile for geospatial values. Returns results as a binary - * Mapbox vector tile. + * Search a vector tile. Searches a vector tile for geospatial values. * * @see Documentation @@ -1710,8 +1731,7 @@ public BinaryResponse searchMvt(SearchMvtRequest request) throws IOException, El } /** - * Searches a vector tile for geospatial values. Returns results as a binary - * Mapbox vector tile. + * Search a vector tile. Searches a vector tile for geospatial values. * * @param fn * a function that initializes a builder to create the @@ -1840,8 +1860,8 @@ public final TermsEnumResponse termsEnum(FunctionDocumentation @@ -1857,8 +1877,8 @@ public TermvectorsResponse termvectors(TermvectorsRequest } /** - * Returns information and statistics about terms in the fields of a particular - * document. + * Get term vector information. Returns information and statistics about terms + * in the fields of a particular document. * * @param fn * a function that initializes a builder to create the @@ -1877,7 +1897,8 @@ public final TermvectorsResponse termvectors( // ----- Endpoint: update /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @see Documentation @@ -1896,7 +1917,8 @@ public UpdateResponse update( } /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @param fn * a function that initializes a builder to create the @@ -1913,7 +1935,8 @@ public final UpdateResponse update( } /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @see Documentation @@ -1932,7 +1955,8 @@ public UpdateResponse update( } /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @param fn * a function that initializes a builder to create the @@ -1951,9 +1975,10 @@ public final UpdateResponse update( // ----- Endpoint: update_by_query /** - * Updates documents that match the specified query. If no query is specified, - * performs an update on every document in the data stream or index without - * modifying the source, which is useful for picking up mapping changes. + * Update documents. Updates documents that match the specified query. If no + * query is specified, performs an update on every document in the data stream + * or index without modifying the source, which is useful for picking up mapping + * changes. * * @see Documentation @@ -1969,9 +1994,10 @@ public UpdateByQueryResponse updateByQuery(UpdateByQueryRequest request) } /** - * Updates documents that match the specified query. If no query is specified, - * performs an update on every document in the data stream or index without - * modifying the source, which is useful for picking up mapping changes. + * Update documents. Updates documents that match the specified query. If no + * query is specified, performs an update on every document in the data stream + * or index without modifying the source, which is useful for picking up mapping + * changes. * * @param fn * a function that initializes a builder to create the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java index 4c1818f1c..66ebb9d8c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java @@ -72,6 +72,9 @@ public class KnnQuery extends QueryBase implements QueryVariant { @Nullable private final Integer numCandidates; + @Nullable + private final Integer k; + private final List filter; @Nullable @@ -86,6 +89,7 @@ private KnnQuery(Builder builder) { this.queryVector = ApiTypeHelper.unmodifiable(builder.queryVector); this.queryVectorBuilder = builder.queryVectorBuilder; this.numCandidates = builder.numCandidates; + this.k = builder.k; this.filter = ApiTypeHelper.unmodifiable(builder.filter); this.similarity = builder.similarity; @@ -142,6 +146,16 @@ public final Integer numCandidates() { return this.numCandidates; } + /** + * The final number of nearest neighbors to return as top hits + *

+ * API name: {@code k} + */ + @Nullable + public final Integer k() { + return this.k; + } + /** * Filters for the kNN search query *

@@ -186,6 +200,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("num_candidates"); generator.write(this.numCandidates); + } + if (this.k != null) { + generator.writeKey("k"); + generator.write(this.k); + } if (ApiTypeHelper.isDefined(this.filter)) { generator.writeKey("filter"); @@ -223,6 +242,9 @@ public static class Builder extends QueryBase.AbstractBuilder implement @Nullable private Integer numCandidates; + @Nullable + private Integer k; + @Nullable private List filter; @@ -295,6 +317,16 @@ public final Builder numCandidates(@Nullable Integer value) { return this; } + /** + * The final number of nearest neighbors to return as top hits + *

+ * API name: {@code k} + */ + public final Builder k(@Nullable Integer value) { + this.k = value; + return this; + } + /** * Filters for the kNN search query *

@@ -373,6 +405,7 @@ protected static void setupKnnQueryDeserializer(ObjectDeserializer tTest(Function timeSeries(TimeSeriesAggregate v) { + this._kind = Kind.TimeSeries; + this._value = v; + return this; + } + + public ObjectBuilder timeSeries( + Function> fn) { + return this.timeSeries(fn.apply(new TimeSeriesAggregate.Builder()).build()); + } + public ObjectBuilder topHits(TopHitsAggregate v) { this._kind = Kind.TopHits; this._value = v; @@ -2342,6 +2372,7 @@ public Aggregate build() { deserializers.put("tdigest_percentile_ranks", TDigestPercentileRanksAggregate._DESERIALIZER); deserializers.put("tdigest_percentiles", TDigestPercentilesAggregate._DESERIALIZER); deserializers.put("t_test", TTestAggregate._DESERIALIZER); + deserializers.put("time_series", TimeSeriesAggregate._DESERIALIZER); deserializers.put("top_hits", TopHitsAggregate._DESERIALIZER); deserializers.put("top_metrics", TopMetricsAggregate._DESERIALIZER); deserializers.put("umrareterms", UnmappedRareTermsAggregate._DESERIALIZER); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBuilders.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBuilders.java index ea8787496..97f5bea73 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBuilders.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBuilders.java @@ -1149,6 +1149,24 @@ public static Aggregate tTest(Function> fn) { + Aggregate.Builder builder = new Aggregate.Builder(); + builder.timeSeries(fn.apply(new TimeSeriesAggregate.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link TopHitsAggregate top_hits} {@code Aggregate} * variant. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java index 6562f5312..b05d03a84 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java @@ -215,6 +215,8 @@ public enum Kind implements JsonEnum { Terms("terms"), + TimeSeries("time_series"), + TopHits("top_hits"), TTest("t_test"), @@ -1493,6 +1495,23 @@ public TermsAggregation terms() { return TaggedUnionUtils.get(this, Kind.Terms); } + /** + * Is this variant instance of kind {@code time_series}? + */ + public boolean isTimeSeries() { + return _kind == Kind.TimeSeries; + } + + /** + * Get the {@code time_series} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code time_series} kind. + */ + public TimeSeriesAggregation timeSeries() { + return TaggedUnionUtils.get(this, Kind.TimeSeries); + } + /** * Is this variant instance of kind {@code top_hits}? */ @@ -2477,6 +2496,17 @@ public ContainerBuilder terms(Function> fn) { + return this.timeSeries(fn.apply(new TimeSeriesAggregation.Builder()).build()); + } + public ContainerBuilder topHits(TopHitsAggregation v) { this._kind = Kind.TopHits; this._value = v; @@ -2702,6 +2732,7 @@ protected static void setupAggregationDeserializer(ObjectDeserializer o op.add(Builder::sum, SumAggregation._DESERIALIZER, "sum"); op.add(Builder::sumBucket, SumBucketAggregation._DESERIALIZER, "sum_bucket"); op.add(Builder::terms, TermsAggregation._DESERIALIZER, "terms"); + op.add(Builder::timeSeries, TimeSeriesAggregation._DESERIALIZER, "time_series"); op.add(Builder::topHits, TopHitsAggregation._DESERIALIZER, "top_hits"); op.add(Builder::tTest, TTestAggregation._DESERIALIZER, "t_test"); op.add(Builder::topMetrics, TopMetricsAggregation._DESERIALIZER, "top_metrics"); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBuilders.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBuilders.java index f35032bf6..f0b63a419 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBuilders.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBuilders.java @@ -1335,6 +1335,25 @@ public static Aggregation terms(Function> fn) { + Aggregation.Builder builder = new Aggregation.Builder(); + builder.timeSeries(fn.apply(new TimeSeriesAggregation.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link TopHitsAggregation top_hits} * {@code Aggregation} variant. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationRange.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationRange.java index 0a1ff795e..8da244134 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationRange.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationRange.java @@ -87,6 +87,8 @@ public static AggregationRange of(Function * API name: {@code from} + *

+ * Defaults to {@code 0} if parsed from a JSON {@code null} value. */ @Nullable public final Double from() { @@ -107,6 +109,8 @@ public final String key() { * End of the range (exclusive). *

* API name: {@code to} + *

+ * Defaults to {@code 0} if parsed from a JSON {@code null} value. */ @Nullable public final Double to() { @@ -126,8 +130,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (this.from != null) { generator.writeKey("from"); - generator.write(this.from); - + JsonpUtils.serializeDoubleOrNull(generator, this.from, 0); } if (this.key != null) { generator.writeKey("key"); @@ -136,8 +139,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } if (this.to != null) { generator.writeKey("to"); - generator.write(this.to); - + JsonpUtils.serializeDoubleOrNull(generator, this.to, 0); } } @@ -167,6 +169,8 @@ public static class Builder extends WithJsonObjectBuilderBase implement * Start of the range (inclusive). *

* API name: {@code from} + *

+ * Defaults to {@code 0} if parsed from a JSON {@code null} value. */ public final Builder from(@Nullable Double value) { this.from = value; @@ -187,6 +191,8 @@ public final Builder key(@Nullable String value) { * End of the range (exclusive). *

* API name: {@code to} + *

+ * Defaults to {@code 0} if parsed from a JSON {@code null} value. */ public final Builder to(@Nullable Double value) { this.to = value; @@ -221,9 +227,9 @@ public AggregationRange build() { protected static void setupAggregationRangeDeserializer(ObjectDeserializer op) { - op.add(Builder::from, JsonpDeserializer.doubleDeserializer(), "from"); + op.add(Builder::from, JsonpDeserializer.doubleOrNullDeserializer(0), "from"); op.add(Builder::key, JsonpDeserializer.stringDeserializer(), "key"); - op.add(Builder::to, JsonpDeserializer.doubleDeserializer(), "to"); + op.add(Builder::to, JsonpDeserializer.doubleOrNullDeserializer(0), "to"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TimeSeriesAggregate.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TimeSeriesAggregate.java new file mode 100644 index 000000000..aede05314 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TimeSeriesAggregate.java @@ -0,0 +1,116 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.TimeSeriesAggregate + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class TimeSeriesAggregate extends MultiBucketAggregateBase implements AggregateVariant { + // --------------------------------------------------------------------------------------------- + + private TimeSeriesAggregate(Builder builder) { + super(builder); + + } + + public static TimeSeriesAggregate of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Aggregate variant kind. + */ + @Override + public Aggregate.Kind _aggregateKind() { + return Aggregate.Kind.TimeSeries; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link TimeSeriesAggregate}. + */ + + public static class Builder extends MultiBucketAggregateBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link TimeSeriesAggregate}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public TimeSeriesAggregate build() { + _checkSingleUse(); + super.tBucketSerializer(null); + + return new TimeSeriesAggregate(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link TimeSeriesAggregate} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, TimeSeriesAggregate::setupTimeSeriesAggregateDeserializer); + + protected static void setupTimeSeriesAggregateDeserializer(ObjectDeserializer op) { + MultiBucketAggregateBase.setupMultiBucketAggregateBaseDeserializer(op, TimeSeriesBucket._DESERIALIZER); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TimeSeriesAggregation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TimeSeriesAggregation.java new file mode 100644 index 000000000..25dbfb308 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TimeSeriesAggregation.java @@ -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. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Integer; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.TimeSeriesAggregation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class TimeSeriesAggregation extends BucketAggregationBase implements AggregationVariant, JsonpSerializable { + @Nullable + private final Integer size; + + @Nullable + private final Boolean keyed; + + // --------------------------------------------------------------------------------------------- + + private TimeSeriesAggregation(Builder builder) { + + this.size = builder.size; + this.keyed = builder.keyed; + + } + + public static TimeSeriesAggregation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Aggregation variant kind. + */ + @Override + public Aggregation.Kind _aggregationKind() { + return Aggregation.Kind.TimeSeries; + } + + /** + * The maximum number of results to return. + *

+ * API name: {@code size} + */ + @Nullable + public final Integer size() { + return this.size; + } + + /** + * Set to true to associate a unique string key with each bucket + * and returns the ranges as a hash rather than an array. + *

+ * API name: {@code keyed} + */ + @Nullable + public final Boolean keyed() { + return this.keyed; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.size != null) { + generator.writeKey("size"); + generator.write(this.size); + + } + if (this.keyed != null) { + generator.writeKey("keyed"); + generator.write(this.keyed); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link TimeSeriesAggregation}. + */ + + public static class Builder extends BucketAggregationBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Integer size; + + @Nullable + private Boolean keyed; + + /** + * The maximum number of results to return. + *

+ * API name: {@code size} + */ + public final Builder size(@Nullable Integer value) { + this.size = value; + return this; + } + + /** + * Set to true to associate a unique string key with each bucket + * and returns the ranges as a hash rather than an array. + *

+ * API name: {@code keyed} + */ + public final Builder keyed(@Nullable Boolean value) { + this.keyed = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link TimeSeriesAggregation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public TimeSeriesAggregation build() { + _checkSingleUse(); + + return new TimeSeriesAggregation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link TimeSeriesAggregation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, TimeSeriesAggregation::setupTimeSeriesAggregationDeserializer); + + protected static void setupTimeSeriesAggregationDeserializer(ObjectDeserializer op) { + + op.add(Builder::size, JsonpDeserializer.integerDeserializer(), "size"); + op.add(Builder::keyed, JsonpDeserializer.booleanDeserializer(), "keyed"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TimeSeriesBucket.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TimeSeriesBucket.java new file mode 100644 index 000000000..a2e88b47e --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TimeSeriesBucket.java @@ -0,0 +1,173 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.elasticsearch._types.FieldValue; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.TimeSeriesBucket + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class TimeSeriesBucket extends MultiBucketBase { + private final Map key; + + // --------------------------------------------------------------------------------------------- + + private TimeSeriesBucket(Builder builder) { + super(builder); + + this.key = ApiTypeHelper.unmodifiableRequired(builder.key, this, "key"); + + } + + public static TimeSeriesBucket of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code key} + */ + public final Map key() { + return this.key; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + if (ApiTypeHelper.isDefined(this.key)) { + generator.writeKey("key"); + generator.writeStartObject(); + for (Map.Entry item0 : this.key.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link TimeSeriesBucket}. + */ + + public static class Builder extends MultiBucketBase.AbstractBuilder + implements + ObjectBuilder { + private Map key; + + /** + * Required - API name: {@code key} + *

+ * Adds all entries of map to key. + */ + public final Builder key(Map map) { + this.key = _mapPutAll(this.key, map); + return this; + } + + /** + * Required - API name: {@code key} + *

+ * Adds an entry to key. + */ + public final Builder key(String key, FieldValue value) { + this.key = _mapPut(this.key, key, value); + return this; + } + + /** + * Required - API name: {@code key} + *

+ * Adds an entry to key using a builder lambda. + */ + public final Builder key(String key, Function> fn) { + return key(key, fn.apply(new FieldValue.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link TimeSeriesBucket}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public TimeSeriesBucket build() { + _checkSingleUse(); + + return new TimeSeriesBucket(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link TimeSeriesBucket} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + TimeSeriesBucket::setupTimeSeriesBucketDeserializer); + + protected static void setupTimeSeriesBucketDeserializer(ObjectDeserializer op) { + MultiBucketBase.setupMultiBucketBaseDeserializer(op); + op.add(Builder::key, JsonpDeserializer.stringMapDeserializer(FieldValue._DESERIALIZER), "key"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java index 78fbdec16..6108a2b94 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java @@ -72,32 +72,104 @@ public class Analyzer implements OpenTaggedUnion, JsonpSe */ public enum Kind implements JsonEnum { + Arabic("arabic"), + + Armenian("armenian"), + + Basque("basque"), + + Bengali("bengali"), + + Brazilian("brazilian"), + + Bulgarian("bulgarian"), + + Catalan("catalan"), + + Chinese("chinese"), + + Cjk("cjk"), + Custom("custom"), + Czech("czech"), + + Danish("danish"), + Dutch("dutch"), + English("english"), + + Estonian("estonian"), + Fingerprint("fingerprint"), + Finnish("finnish"), + + French("french"), + + Galician("galician"), + + German("german"), + + Greek("greek"), + + Hindi("hindi"), + + Hungarian("hungarian"), + IcuAnalyzer("icu_analyzer"), + Indonesian("indonesian"), + + Irish("irish"), + + Italian("italian"), + Keyword("keyword"), Kuromoji("kuromoji"), Language("language"), + Latvian("latvian"), + + Lithuanian("lithuanian"), + Nori("nori"), + Norwegian("norwegian"), + Pattern("pattern"), + Persian("persian"), + + Portuguese("portuguese"), + + Romanian("romanian"), + + Russian("russian"), + + Serbian("serbian"), + Simple("simple"), Snowball("snowball"), + Sorani("sorani"), + + Spanish("spanish"), + Standard("standard"), Stop("stop"), + Swedish("swedish"), + + Thai("thai"), + + Turkish("turkish"), + Whitespace("whitespace"), /** A custom {@code Analyzer} defined by a plugin */ @@ -161,326 +233,1144 @@ public Analyzer(String kind, JsonData value) { } /** - * Is this variant instance of kind {@code custom}? + * Is this variant instance of kind {@code arabic}? */ - public boolean isCustom() { - return _kind == Kind.Custom; + public boolean isArabic() { + return _kind == Kind.Arabic; } /** - * Get the {@code custom} variant value. + * Get the {@code arabic} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code custom} kind. + * if the current variant is not of the {@code arabic} kind. */ - public CustomAnalyzer custom() { - return TaggedUnionUtils.get(this, Kind.Custom); + public ArabicAnalyzer arabic() { + return TaggedUnionUtils.get(this, Kind.Arabic); } /** - * Is this variant instance of kind {@code dutch}? + * Is this variant instance of kind {@code armenian}? */ - public boolean isDutch() { - return _kind == Kind.Dutch; + public boolean isArmenian() { + return _kind == Kind.Armenian; } /** - * Get the {@code dutch} variant value. + * Get the {@code armenian} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code dutch} kind. + * if the current variant is not of the {@code armenian} kind. */ - public DutchAnalyzer dutch() { - return TaggedUnionUtils.get(this, Kind.Dutch); + public ArmenianAnalyzer armenian() { + return TaggedUnionUtils.get(this, Kind.Armenian); } /** - * Is this variant instance of kind {@code fingerprint}? + * Is this variant instance of kind {@code basque}? */ - public boolean isFingerprint() { - return _kind == Kind.Fingerprint; + public boolean isBasque() { + return _kind == Kind.Basque; } /** - * Get the {@code fingerprint} variant value. + * Get the {@code basque} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code fingerprint} kind. + * if the current variant is not of the {@code basque} kind. */ - public FingerprintAnalyzer fingerprint() { - return TaggedUnionUtils.get(this, Kind.Fingerprint); + public BasqueAnalyzer basque() { + return TaggedUnionUtils.get(this, Kind.Basque); } /** - * Is this variant instance of kind {@code icu_analyzer}? + * Is this variant instance of kind {@code bengali}? */ - public boolean isIcuAnalyzer() { - return _kind == Kind.IcuAnalyzer; + public boolean isBengali() { + return _kind == Kind.Bengali; } /** - * Get the {@code icu_analyzer} variant value. + * Get the {@code bengali} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code icu_analyzer} kind. + * if the current variant is not of the {@code bengali} kind. */ - public IcuAnalyzer icuAnalyzer() { - return TaggedUnionUtils.get(this, Kind.IcuAnalyzer); + public BengaliAnalyzer bengali() { + return TaggedUnionUtils.get(this, Kind.Bengali); } /** - * Is this variant instance of kind {@code keyword}? + * Is this variant instance of kind {@code brazilian}? */ - public boolean isKeyword() { - return _kind == Kind.Keyword; + public boolean isBrazilian() { + return _kind == Kind.Brazilian; } /** - * Get the {@code keyword} variant value. + * Get the {@code brazilian} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code keyword} kind. + * if the current variant is not of the {@code brazilian} kind. */ - public KeywordAnalyzer keyword() { - return TaggedUnionUtils.get(this, Kind.Keyword); + public BrazilianAnalyzer brazilian() { + return TaggedUnionUtils.get(this, Kind.Brazilian); } /** - * Is this variant instance of kind {@code kuromoji}? + * Is this variant instance of kind {@code bulgarian}? */ - public boolean isKuromoji() { - return _kind == Kind.Kuromoji; + public boolean isBulgarian() { + return _kind == Kind.Bulgarian; } /** - * Get the {@code kuromoji} variant value. + * Get the {@code bulgarian} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code kuromoji} kind. + * if the current variant is not of the {@code bulgarian} kind. */ - public KuromojiAnalyzer kuromoji() { - return TaggedUnionUtils.get(this, Kind.Kuromoji); + public BulgarianAnalyzer bulgarian() { + return TaggedUnionUtils.get(this, Kind.Bulgarian); } /** - * Is this variant instance of kind {@code language}? + * Is this variant instance of kind {@code catalan}? */ - public boolean isLanguage() { - return _kind == Kind.Language; + public boolean isCatalan() { + return _kind == Kind.Catalan; } /** - * Get the {@code language} variant value. + * Get the {@code catalan} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code language} kind. + * if the current variant is not of the {@code catalan} kind. */ - public LanguageAnalyzer language() { - return TaggedUnionUtils.get(this, Kind.Language); + public CatalanAnalyzer catalan() { + return TaggedUnionUtils.get(this, Kind.Catalan); } /** - * Is this variant instance of kind {@code nori}? + * Is this variant instance of kind {@code chinese}? */ - public boolean isNori() { - return _kind == Kind.Nori; + public boolean isChinese() { + return _kind == Kind.Chinese; } /** - * Get the {@code nori} variant value. + * Get the {@code chinese} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code nori} kind. + * if the current variant is not of the {@code chinese} kind. */ - public NoriAnalyzer nori() { - return TaggedUnionUtils.get(this, Kind.Nori); + public ChineseAnalyzer chinese() { + return TaggedUnionUtils.get(this, Kind.Chinese); } /** - * Is this variant instance of kind {@code pattern}? + * Is this variant instance of kind {@code cjk}? */ - public boolean isPattern() { - return _kind == Kind.Pattern; + public boolean isCjk() { + return _kind == Kind.Cjk; } /** - * Get the {@code pattern} variant value. + * Get the {@code cjk} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code pattern} kind. + * if the current variant is not of the {@code cjk} kind. */ - public PatternAnalyzer pattern() { - return TaggedUnionUtils.get(this, Kind.Pattern); + public CjkAnalyzer cjk() { + return TaggedUnionUtils.get(this, Kind.Cjk); } /** - * Is this variant instance of kind {@code simple}? + * Is this variant instance of kind {@code custom}? */ - public boolean isSimple() { - return _kind == Kind.Simple; + public boolean isCustom() { + return _kind == Kind.Custom; } /** - * Get the {@code simple} variant value. + * Get the {@code custom} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code simple} kind. + * if the current variant is not of the {@code custom} kind. */ - public SimpleAnalyzer simple() { - return TaggedUnionUtils.get(this, Kind.Simple); + public CustomAnalyzer custom() { + return TaggedUnionUtils.get(this, Kind.Custom); } /** - * Is this variant instance of kind {@code snowball}? + * Is this variant instance of kind {@code czech}? */ - public boolean isSnowball() { - return _kind == Kind.Snowball; + public boolean isCzech() { + return _kind == Kind.Czech; } /** - * Get the {@code snowball} variant value. + * Get the {@code czech} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code snowball} kind. + * if the current variant is not of the {@code czech} kind. */ - public SnowballAnalyzer snowball() { - return TaggedUnionUtils.get(this, Kind.Snowball); + public CzechAnalyzer czech() { + return TaggedUnionUtils.get(this, Kind.Czech); } /** - * Is this variant instance of kind {@code standard}? + * Is this variant instance of kind {@code danish}? */ - public boolean isStandard() { - return _kind == Kind.Standard; + public boolean isDanish() { + return _kind == Kind.Danish; } /** - * Get the {@code standard} variant value. + * Get the {@code danish} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code standard} kind. + * if the current variant is not of the {@code danish} kind. */ - public StandardAnalyzer standard() { - return TaggedUnionUtils.get(this, Kind.Standard); + public DanishAnalyzer danish() { + return TaggedUnionUtils.get(this, Kind.Danish); } /** - * Is this variant instance of kind {@code stop}? + * Is this variant instance of kind {@code dutch}? */ - public boolean isStop() { - return _kind == Kind.Stop; + public boolean isDutch() { + return _kind == Kind.Dutch; } /** - * Get the {@code stop} variant value. + * Get the {@code dutch} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code stop} kind. + * if the current variant is not of the {@code dutch} kind. */ - public StopAnalyzer stop() { - return TaggedUnionUtils.get(this, Kind.Stop); + public DutchAnalyzer dutch() { + return TaggedUnionUtils.get(this, Kind.Dutch); } /** - * Is this variant instance of kind {@code whitespace}? + * Is this variant instance of kind {@code english}? */ - public boolean isWhitespace() { - return _kind == Kind.Whitespace; + public boolean isEnglish() { + return _kind == Kind.English; } /** - * Get the {@code whitespace} variant value. + * Get the {@code english} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code whitespace} kind. + * if the current variant is not of the {@code english} kind. */ - public WhitespaceAnalyzer whitespace() { - return TaggedUnionUtils.get(this, Kind.Whitespace); + public EnglishAnalyzer english() { + return TaggedUnionUtils.get(this, Kind.English); } - @Nullable - private final String _customKind; + /** + * Is this variant instance of kind {@code estonian}? + */ + public boolean isEstonian() { + return _kind == Kind.Estonian; + } /** - * Is this a custom {@code Analyzer} defined by a plugin? + * Get the {@code estonian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code estonian} kind. */ - public boolean _isCustom() { - return _kind == Kind._Custom; + public EstonianAnalyzer estonian() { + return TaggedUnionUtils.get(this, Kind.Estonian); } /** - * Get the actual kind when {@code _kind()} equals {@link Kind#_Custom} - * (plugin-defined variant). + * Is this variant instance of kind {@code fingerprint}? */ - @Nullable - public final String _customKind() { - return _customKind; + public boolean isFingerprint() { + return _kind == Kind.Fingerprint; } /** - * Get the custom plugin-defined variant value. + * Get the {@code fingerprint} variant value. * * @throws IllegalStateException - * if the current variant is not {@link Kind#_Custom}. + * if the current variant is not of the {@code fingerprint} kind. */ - public JsonData _custom() { - return TaggedUnionUtils.get(this, Kind._Custom); + public FingerprintAnalyzer fingerprint() { + return TaggedUnionUtils.get(this, Kind.Fingerprint); } - @Override - public void serialize(JsonGenerator generator, JsonpMapper mapper) { + /** + * Is this variant instance of kind {@code finnish}? + */ + public boolean isFinnish() { + return _kind == Kind.Finnish; + } - mapper.serialize(_value, generator); + /** + * Get the {@code finnish} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code finnish} kind. + */ + public FinnishAnalyzer finnish() { + return TaggedUnionUtils.get(this, Kind.Finnish); + } + /** + * Is this variant instance of kind {@code french}? + */ + public boolean isFrench() { + return _kind == Kind.French; } - @Override - public String toString() { - return JsonpUtils.toString(this); + /** + * Get the {@code french} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code french} kind. + */ + public FrenchAnalyzer french() { + return TaggedUnionUtils.get(this, Kind.French); } - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private Kind _kind; - private Object _value; - private String _customKind; + /** + * Is this variant instance of kind {@code galician}? + */ + public boolean isGalician() { + return _kind == Kind.Galician; + } - @Override - protected Builder self() { - return this; - } - public ObjectBuilder custom(CustomAnalyzer v) { - this._kind = Kind.Custom; - this._value = v; - return this; - } + /** + * Get the {@code galician} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code galician} kind. + */ + public GalicianAnalyzer galician() { + return TaggedUnionUtils.get(this, Kind.Galician); + } - public ObjectBuilder custom(Function> fn) { - return this.custom(fn.apply(new CustomAnalyzer.Builder()).build()); - } + /** + * Is this variant instance of kind {@code german}? + */ + public boolean isGerman() { + return _kind == Kind.German; + } - public ObjectBuilder dutch(DutchAnalyzer v) { - this._kind = Kind.Dutch; - this._value = v; - return this; - } + /** + * Get the {@code german} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code german} kind. + */ + public GermanAnalyzer german() { + return TaggedUnionUtils.get(this, Kind.German); + } - public ObjectBuilder dutch(Function> fn) { - return this.dutch(fn.apply(new DutchAnalyzer.Builder()).build()); - } + /** + * Is this variant instance of kind {@code greek}? + */ + public boolean isGreek() { + return _kind == Kind.Greek; + } - public ObjectBuilder fingerprint(FingerprintAnalyzer v) { - this._kind = Kind.Fingerprint; - this._value = v; - return this; - } + /** + * Get the {@code greek} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code greek} kind. + */ + public GreekAnalyzer greek() { + return TaggedUnionUtils.get(this, Kind.Greek); + } - public ObjectBuilder fingerprint( - Function> fn) { - return this.fingerprint(fn.apply(new FingerprintAnalyzer.Builder()).build()); - } + /** + * Is this variant instance of kind {@code hindi}? + */ + public boolean isHindi() { + return _kind == Kind.Hindi; + } - public ObjectBuilder icuAnalyzer(IcuAnalyzer v) { - this._kind = Kind.IcuAnalyzer; + /** + * Get the {@code hindi} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code hindi} kind. + */ + public HindiAnalyzer hindi() { + return TaggedUnionUtils.get(this, Kind.Hindi); + } + + /** + * Is this variant instance of kind {@code hungarian}? + */ + public boolean isHungarian() { + return _kind == Kind.Hungarian; + } + + /** + * Get the {@code hungarian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code hungarian} kind. + */ + public HungarianAnalyzer hungarian() { + return TaggedUnionUtils.get(this, Kind.Hungarian); + } + + /** + * Is this variant instance of kind {@code icu_analyzer}? + */ + public boolean isIcuAnalyzer() { + return _kind == Kind.IcuAnalyzer; + } + + /** + * Get the {@code icu_analyzer} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code icu_analyzer} kind. + */ + public IcuAnalyzer icuAnalyzer() { + return TaggedUnionUtils.get(this, Kind.IcuAnalyzer); + } + + /** + * Is this variant instance of kind {@code indonesian}? + */ + public boolean isIndonesian() { + return _kind == Kind.Indonesian; + } + + /** + * Get the {@code indonesian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code indonesian} kind. + */ + public IndonesianAnalyzer indonesian() { + return TaggedUnionUtils.get(this, Kind.Indonesian); + } + + /** + * Is this variant instance of kind {@code irish}? + */ + public boolean isIrish() { + return _kind == Kind.Irish; + } + + /** + * Get the {@code irish} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code irish} kind. + */ + public IrishAnalyzer irish() { + return TaggedUnionUtils.get(this, Kind.Irish); + } + + /** + * Is this variant instance of kind {@code italian}? + */ + public boolean isItalian() { + return _kind == Kind.Italian; + } + + /** + * Get the {@code italian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code italian} kind. + */ + public ItalianAnalyzer italian() { + return TaggedUnionUtils.get(this, Kind.Italian); + } + + /** + * Is this variant instance of kind {@code keyword}? + */ + public boolean isKeyword() { + return _kind == Kind.Keyword; + } + + /** + * Get the {@code keyword} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code keyword} kind. + */ + public KeywordAnalyzer keyword() { + return TaggedUnionUtils.get(this, Kind.Keyword); + } + + /** + * Is this variant instance of kind {@code kuromoji}? + */ + public boolean isKuromoji() { + return _kind == Kind.Kuromoji; + } + + /** + * Get the {@code kuromoji} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code kuromoji} kind. + */ + public KuromojiAnalyzer kuromoji() { + return TaggedUnionUtils.get(this, Kind.Kuromoji); + } + + /** + * Is this variant instance of kind {@code language}? + */ + public boolean isLanguage() { + return _kind == Kind.Language; + } + + /** + * Get the {@code language} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code language} kind. + */ + public LanguageAnalyzer language() { + return TaggedUnionUtils.get(this, Kind.Language); + } + + /** + * Is this variant instance of kind {@code latvian}? + */ + public boolean isLatvian() { + return _kind == Kind.Latvian; + } + + /** + * Get the {@code latvian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code latvian} kind. + */ + public LatvianAnalyzer latvian() { + return TaggedUnionUtils.get(this, Kind.Latvian); + } + + /** + * Is this variant instance of kind {@code lithuanian}? + */ + public boolean isLithuanian() { + return _kind == Kind.Lithuanian; + } + + /** + * Get the {@code lithuanian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code lithuanian} kind. + */ + public LithuanianAnalyzer lithuanian() { + return TaggedUnionUtils.get(this, Kind.Lithuanian); + } + + /** + * Is this variant instance of kind {@code nori}? + */ + public boolean isNori() { + return _kind == Kind.Nori; + } + + /** + * Get the {@code nori} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code nori} kind. + */ + public NoriAnalyzer nori() { + return TaggedUnionUtils.get(this, Kind.Nori); + } + + /** + * Is this variant instance of kind {@code norwegian}? + */ + public boolean isNorwegian() { + return _kind == Kind.Norwegian; + } + + /** + * Get the {@code norwegian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code norwegian} kind. + */ + public NorwegianAnalyzer norwegian() { + return TaggedUnionUtils.get(this, Kind.Norwegian); + } + + /** + * Is this variant instance of kind {@code pattern}? + */ + public boolean isPattern() { + return _kind == Kind.Pattern; + } + + /** + * Get the {@code pattern} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code pattern} kind. + */ + public PatternAnalyzer pattern() { + return TaggedUnionUtils.get(this, Kind.Pattern); + } + + /** + * Is this variant instance of kind {@code persian}? + */ + public boolean isPersian() { + return _kind == Kind.Persian; + } + + /** + * Get the {@code persian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code persian} kind. + */ + public PersianAnalyzer persian() { + return TaggedUnionUtils.get(this, Kind.Persian); + } + + /** + * Is this variant instance of kind {@code portuguese}? + */ + public boolean isPortuguese() { + return _kind == Kind.Portuguese; + } + + /** + * Get the {@code portuguese} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code portuguese} kind. + */ + public PortugueseAnalyzer portuguese() { + return TaggedUnionUtils.get(this, Kind.Portuguese); + } + + /** + * Is this variant instance of kind {@code romanian}? + */ + public boolean isRomanian() { + return _kind == Kind.Romanian; + } + + /** + * Get the {@code romanian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code romanian} kind. + */ + public RomanianAnalyzer romanian() { + return TaggedUnionUtils.get(this, Kind.Romanian); + } + + /** + * Is this variant instance of kind {@code russian}? + */ + public boolean isRussian() { + return _kind == Kind.Russian; + } + + /** + * Get the {@code russian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code russian} kind. + */ + public RussianAnalyzer russian() { + return TaggedUnionUtils.get(this, Kind.Russian); + } + + /** + * Is this variant instance of kind {@code serbian}? + */ + public boolean isSerbian() { + return _kind == Kind.Serbian; + } + + /** + * Get the {@code serbian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code serbian} kind. + */ + public SerbianAnalyzer serbian() { + return TaggedUnionUtils.get(this, Kind.Serbian); + } + + /** + * Is this variant instance of kind {@code simple}? + */ + public boolean isSimple() { + return _kind == Kind.Simple; + } + + /** + * Get the {@code simple} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code simple} kind. + */ + public SimpleAnalyzer simple() { + return TaggedUnionUtils.get(this, Kind.Simple); + } + + /** + * Is this variant instance of kind {@code snowball}? + */ + public boolean isSnowball() { + return _kind == Kind.Snowball; + } + + /** + * Get the {@code snowball} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code snowball} kind. + */ + public SnowballAnalyzer snowball() { + return TaggedUnionUtils.get(this, Kind.Snowball); + } + + /** + * Is this variant instance of kind {@code sorani}? + */ + public boolean isSorani() { + return _kind == Kind.Sorani; + } + + /** + * Get the {@code sorani} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code sorani} kind. + */ + public SoraniAnalyzer sorani() { + return TaggedUnionUtils.get(this, Kind.Sorani); + } + + /** + * Is this variant instance of kind {@code spanish}? + */ + public boolean isSpanish() { + return _kind == Kind.Spanish; + } + + /** + * Get the {@code spanish} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code spanish} kind. + */ + public SpanishAnalyzer spanish() { + return TaggedUnionUtils.get(this, Kind.Spanish); + } + + /** + * Is this variant instance of kind {@code standard}? + */ + public boolean isStandard() { + return _kind == Kind.Standard; + } + + /** + * Get the {@code standard} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code standard} kind. + */ + public StandardAnalyzer standard() { + return TaggedUnionUtils.get(this, Kind.Standard); + } + + /** + * Is this variant instance of kind {@code stop}? + */ + public boolean isStop() { + return _kind == Kind.Stop; + } + + /** + * Get the {@code stop} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code stop} kind. + */ + public StopAnalyzer stop() { + return TaggedUnionUtils.get(this, Kind.Stop); + } + + /** + * Is this variant instance of kind {@code swedish}? + */ + public boolean isSwedish() { + return _kind == Kind.Swedish; + } + + /** + * Get the {@code swedish} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code swedish} kind. + */ + public SwedishAnalyzer swedish() { + return TaggedUnionUtils.get(this, Kind.Swedish); + } + + /** + * Is this variant instance of kind {@code thai}? + */ + public boolean isThai() { + return _kind == Kind.Thai; + } + + /** + * Get the {@code thai} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code thai} kind. + */ + public ThaiAnalyzer thai() { + return TaggedUnionUtils.get(this, Kind.Thai); + } + + /** + * Is this variant instance of kind {@code turkish}? + */ + public boolean isTurkish() { + return _kind == Kind.Turkish; + } + + /** + * Get the {@code turkish} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code turkish} kind. + */ + public TurkishAnalyzer turkish() { + return TaggedUnionUtils.get(this, Kind.Turkish); + } + + /** + * Is this variant instance of kind {@code whitespace}? + */ + public boolean isWhitespace() { + return _kind == Kind.Whitespace; + } + + /** + * Get the {@code whitespace} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code whitespace} kind. + */ + public WhitespaceAnalyzer whitespace() { + return TaggedUnionUtils.get(this, Kind.Whitespace); + } + + @Nullable + private final String _customKind; + + /** + * Is this a custom {@code Analyzer} defined by a plugin? + */ + public boolean _isCustom() { + return _kind == Kind._Custom; + } + + /** + * Get the actual kind when {@code _kind()} equals {@link Kind#_Custom} + * (plugin-defined variant). + */ + @Nullable + public final String _customKind() { + return _customKind; + } + + /** + * Get the custom plugin-defined variant value. + * + * @throws IllegalStateException + * if the current variant is not {@link Kind#_Custom}. + */ + public JsonData _custom() { + return TaggedUnionUtils.get(this, Kind._Custom); + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + + mapper.serialize(_value, generator); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + private String _customKind; + + @Override + protected Builder self() { + return this; + } + public ObjectBuilder arabic(ArabicAnalyzer v) { + this._kind = Kind.Arabic; + this._value = v; + return this; + } + + public ObjectBuilder arabic(Function> fn) { + return this.arabic(fn.apply(new ArabicAnalyzer.Builder()).build()); + } + + public ObjectBuilder armenian(ArmenianAnalyzer v) { + this._kind = Kind.Armenian; + this._value = v; + return this; + } + + public ObjectBuilder armenian( + Function> fn) { + return this.armenian(fn.apply(new ArmenianAnalyzer.Builder()).build()); + } + + public ObjectBuilder basque(BasqueAnalyzer v) { + this._kind = Kind.Basque; + this._value = v; + return this; + } + + public ObjectBuilder basque(Function> fn) { + return this.basque(fn.apply(new BasqueAnalyzer.Builder()).build()); + } + + public ObjectBuilder bengali(BengaliAnalyzer v) { + this._kind = Kind.Bengali; + this._value = v; + return this; + } + + public ObjectBuilder bengali(Function> fn) { + return this.bengali(fn.apply(new BengaliAnalyzer.Builder()).build()); + } + + public ObjectBuilder brazilian(BrazilianAnalyzer v) { + this._kind = Kind.Brazilian; + this._value = v; + return this; + } + + public ObjectBuilder brazilian( + Function> fn) { + return this.brazilian(fn.apply(new BrazilianAnalyzer.Builder()).build()); + } + + public ObjectBuilder bulgarian(BulgarianAnalyzer v) { + this._kind = Kind.Bulgarian; + this._value = v; + return this; + } + + public ObjectBuilder bulgarian( + Function> fn) { + return this.bulgarian(fn.apply(new BulgarianAnalyzer.Builder()).build()); + } + + public ObjectBuilder catalan(CatalanAnalyzer v) { + this._kind = Kind.Catalan; + this._value = v; + return this; + } + + public ObjectBuilder catalan(Function> fn) { + return this.catalan(fn.apply(new CatalanAnalyzer.Builder()).build()); + } + + public ObjectBuilder chinese(ChineseAnalyzer v) { + this._kind = Kind.Chinese; + this._value = v; + return this; + } + + public ObjectBuilder chinese(Function> fn) { + return this.chinese(fn.apply(new ChineseAnalyzer.Builder()).build()); + } + + public ObjectBuilder cjk(CjkAnalyzer v) { + this._kind = Kind.Cjk; + this._value = v; + return this; + } + + public ObjectBuilder cjk(Function> fn) { + return this.cjk(fn.apply(new CjkAnalyzer.Builder()).build()); + } + + public ObjectBuilder custom(CustomAnalyzer v) { + this._kind = Kind.Custom; + this._value = v; + return this; + } + + public ObjectBuilder custom(Function> fn) { + return this.custom(fn.apply(new CustomAnalyzer.Builder()).build()); + } + + public ObjectBuilder czech(CzechAnalyzer v) { + this._kind = Kind.Czech; + this._value = v; + return this; + } + + public ObjectBuilder czech(Function> fn) { + return this.czech(fn.apply(new CzechAnalyzer.Builder()).build()); + } + + public ObjectBuilder danish(DanishAnalyzer v) { + this._kind = Kind.Danish; + this._value = v; + return this; + } + + public ObjectBuilder danish(Function> fn) { + return this.danish(fn.apply(new DanishAnalyzer.Builder()).build()); + } + + public ObjectBuilder dutch(DutchAnalyzer v) { + this._kind = Kind.Dutch; + this._value = v; + return this; + } + + public ObjectBuilder dutch(Function> fn) { + return this.dutch(fn.apply(new DutchAnalyzer.Builder()).build()); + } + + public ObjectBuilder english(EnglishAnalyzer v) { + this._kind = Kind.English; + this._value = v; + return this; + } + + public ObjectBuilder english(Function> fn) { + return this.english(fn.apply(new EnglishAnalyzer.Builder()).build()); + } + + public ObjectBuilder estonian(EstonianAnalyzer v) { + this._kind = Kind.Estonian; + this._value = v; + return this; + } + + public ObjectBuilder estonian( + Function> fn) { + return this.estonian(fn.apply(new EstonianAnalyzer.Builder()).build()); + } + + public ObjectBuilder fingerprint(FingerprintAnalyzer v) { + this._kind = Kind.Fingerprint; + this._value = v; + return this; + } + + public ObjectBuilder fingerprint( + Function> fn) { + return this.fingerprint(fn.apply(new FingerprintAnalyzer.Builder()).build()); + } + + public ObjectBuilder finnish(FinnishAnalyzer v) { + this._kind = Kind.Finnish; + this._value = v; + return this; + } + + public ObjectBuilder finnish(Function> fn) { + return this.finnish(fn.apply(new FinnishAnalyzer.Builder()).build()); + } + + public ObjectBuilder french(FrenchAnalyzer v) { + this._kind = Kind.French; + this._value = v; + return this; + } + + public ObjectBuilder french(Function> fn) { + return this.french(fn.apply(new FrenchAnalyzer.Builder()).build()); + } + + public ObjectBuilder galician(GalicianAnalyzer v) { + this._kind = Kind.Galician; + this._value = v; + return this; + } + + public ObjectBuilder galician( + Function> fn) { + return this.galician(fn.apply(new GalicianAnalyzer.Builder()).build()); + } + + public ObjectBuilder german(GermanAnalyzer v) { + this._kind = Kind.German; + this._value = v; + return this; + } + + public ObjectBuilder german(Function> fn) { + return this.german(fn.apply(new GermanAnalyzer.Builder()).build()); + } + + public ObjectBuilder greek(GreekAnalyzer v) { + this._kind = Kind.Greek; + this._value = v; + return this; + } + + public ObjectBuilder greek(Function> fn) { + return this.greek(fn.apply(new GreekAnalyzer.Builder()).build()); + } + + public ObjectBuilder hindi(HindiAnalyzer v) { + this._kind = Kind.Hindi; + this._value = v; + return this; + } + + public ObjectBuilder hindi(Function> fn) { + return this.hindi(fn.apply(new HindiAnalyzer.Builder()).build()); + } + + public ObjectBuilder hungarian(HungarianAnalyzer v) { + this._kind = Kind.Hungarian; + this._value = v; + return this; + } + + public ObjectBuilder hungarian( + Function> fn) { + return this.hungarian(fn.apply(new HungarianAnalyzer.Builder()).build()); + } + + public ObjectBuilder icuAnalyzer(IcuAnalyzer v) { + this._kind = Kind.IcuAnalyzer; this._value = v; return this; } @@ -489,6 +1379,37 @@ public ObjectBuilder icuAnalyzer(Function indonesian(IndonesianAnalyzer v) { + this._kind = Kind.Indonesian; + this._value = v; + return this; + } + + public ObjectBuilder indonesian( + Function> fn) { + return this.indonesian(fn.apply(new IndonesianAnalyzer.Builder()).build()); + } + + public ObjectBuilder irish(IrishAnalyzer v) { + this._kind = Kind.Irish; + this._value = v; + return this; + } + + public ObjectBuilder irish(Function> fn) { + return this.irish(fn.apply(new IrishAnalyzer.Builder()).build()); + } + + public ObjectBuilder italian(ItalianAnalyzer v) { + this._kind = Kind.Italian; + this._value = v; + return this; + } + + public ObjectBuilder italian(Function> fn) { + return this.italian(fn.apply(new ItalianAnalyzer.Builder()).build()); + } + public ObjectBuilder keyword(KeywordAnalyzer v) { this._kind = Kind.Keyword; this._value = v; @@ -521,6 +1442,27 @@ public ObjectBuilder language( return this.language(fn.apply(new LanguageAnalyzer.Builder()).build()); } + public ObjectBuilder latvian(LatvianAnalyzer v) { + this._kind = Kind.Latvian; + this._value = v; + return this; + } + + public ObjectBuilder latvian(Function> fn) { + return this.latvian(fn.apply(new LatvianAnalyzer.Builder()).build()); + } + + public ObjectBuilder lithuanian(LithuanianAnalyzer v) { + this._kind = Kind.Lithuanian; + this._value = v; + return this; + } + + public ObjectBuilder lithuanian( + Function> fn) { + return this.lithuanian(fn.apply(new LithuanianAnalyzer.Builder()).build()); + } + public ObjectBuilder nori(NoriAnalyzer v) { this._kind = Kind.Nori; this._value = v; @@ -531,6 +1473,17 @@ public ObjectBuilder nori(Function norwegian(NorwegianAnalyzer v) { + this._kind = Kind.Norwegian; + this._value = v; + return this; + } + + public ObjectBuilder norwegian( + Function> fn) { + return this.norwegian(fn.apply(new NorwegianAnalyzer.Builder()).build()); + } + public ObjectBuilder pattern(PatternAnalyzer v) { this._kind = Kind.Pattern; this._value = v; @@ -541,6 +1494,58 @@ public ObjectBuilder pattern(Function persian(PersianAnalyzer v) { + this._kind = Kind.Persian; + this._value = v; + return this; + } + + public ObjectBuilder persian(Function> fn) { + return this.persian(fn.apply(new PersianAnalyzer.Builder()).build()); + } + + public ObjectBuilder portuguese(PortugueseAnalyzer v) { + this._kind = Kind.Portuguese; + this._value = v; + return this; + } + + public ObjectBuilder portuguese( + Function> fn) { + return this.portuguese(fn.apply(new PortugueseAnalyzer.Builder()).build()); + } + + public ObjectBuilder romanian(RomanianAnalyzer v) { + this._kind = Kind.Romanian; + this._value = v; + return this; + } + + public ObjectBuilder romanian( + Function> fn) { + return this.romanian(fn.apply(new RomanianAnalyzer.Builder()).build()); + } + + public ObjectBuilder russian(RussianAnalyzer v) { + this._kind = Kind.Russian; + this._value = v; + return this; + } + + public ObjectBuilder russian(Function> fn) { + return this.russian(fn.apply(new RussianAnalyzer.Builder()).build()); + } + + public ObjectBuilder serbian(SerbianAnalyzer v) { + this._kind = Kind.Serbian; + this._value = v; + return this; + } + + public ObjectBuilder serbian(Function> fn) { + return this.serbian(fn.apply(new SerbianAnalyzer.Builder()).build()); + } + public ObjectBuilder simple(SimpleAnalyzer v) { this._kind = Kind.Simple; this._value = v; @@ -562,6 +1567,26 @@ public ObjectBuilder snowball( return this.snowball(fn.apply(new SnowballAnalyzer.Builder()).build()); } + public ObjectBuilder sorani(SoraniAnalyzer v) { + this._kind = Kind.Sorani; + this._value = v; + return this; + } + + public ObjectBuilder sorani(Function> fn) { + return this.sorani(fn.apply(new SoraniAnalyzer.Builder()).build()); + } + + public ObjectBuilder spanish(SpanishAnalyzer v) { + this._kind = Kind.Spanish; + this._value = v; + return this; + } + + public ObjectBuilder spanish(Function> fn) { + return this.spanish(fn.apply(new SpanishAnalyzer.Builder()).build()); + } + public ObjectBuilder standard(StandardAnalyzer v) { this._kind = Kind.Standard; this._value = v; @@ -583,6 +1608,36 @@ public ObjectBuilder stop(Function swedish(SwedishAnalyzer v) { + this._kind = Kind.Swedish; + this._value = v; + return this; + } + + public ObjectBuilder swedish(Function> fn) { + return this.swedish(fn.apply(new SwedishAnalyzer.Builder()).build()); + } + + public ObjectBuilder thai(ThaiAnalyzer v) { + this._kind = Kind.Thai; + this._value = v; + return this; + } + + public ObjectBuilder thai(Function> fn) { + return this.thai(fn.apply(new ThaiAnalyzer.Builder()).build()); + } + + public ObjectBuilder turkish(TurkishAnalyzer v) { + this._kind = Kind.Turkish; + this._value = v; + return this; + } + + public ObjectBuilder turkish(Function> fn) { + return this.turkish(fn.apply(new TurkishAnalyzer.Builder()).build()); + } + public ObjectBuilder whitespace(WhitespaceAnalyzer v) { this._kind = Kind.Whitespace; this._value = v; @@ -619,19 +1674,55 @@ public Analyzer build() { protected static void setupAnalyzerDeserializer(ObjectDeserializer op) { + op.add(Builder::arabic, ArabicAnalyzer._DESERIALIZER, "arabic"); + op.add(Builder::armenian, ArmenianAnalyzer._DESERIALIZER, "armenian"); + op.add(Builder::basque, BasqueAnalyzer._DESERIALIZER, "basque"); + op.add(Builder::bengali, BengaliAnalyzer._DESERIALIZER, "bengali"); + op.add(Builder::brazilian, BrazilianAnalyzer._DESERIALIZER, "brazilian"); + op.add(Builder::bulgarian, BulgarianAnalyzer._DESERIALIZER, "bulgarian"); + op.add(Builder::catalan, CatalanAnalyzer._DESERIALIZER, "catalan"); + op.add(Builder::chinese, ChineseAnalyzer._DESERIALIZER, "chinese"); + op.add(Builder::cjk, CjkAnalyzer._DESERIALIZER, "cjk"); op.add(Builder::custom, CustomAnalyzer._DESERIALIZER, "custom"); + op.add(Builder::czech, CzechAnalyzer._DESERIALIZER, "czech"); + op.add(Builder::danish, DanishAnalyzer._DESERIALIZER, "danish"); op.add(Builder::dutch, DutchAnalyzer._DESERIALIZER, "dutch"); + op.add(Builder::english, EnglishAnalyzer._DESERIALIZER, "english"); + op.add(Builder::estonian, EstonianAnalyzer._DESERIALIZER, "estonian"); op.add(Builder::fingerprint, FingerprintAnalyzer._DESERIALIZER, "fingerprint"); + op.add(Builder::finnish, FinnishAnalyzer._DESERIALIZER, "finnish"); + op.add(Builder::french, FrenchAnalyzer._DESERIALIZER, "french"); + op.add(Builder::galician, GalicianAnalyzer._DESERIALIZER, "galician"); + op.add(Builder::german, GermanAnalyzer._DESERIALIZER, "german"); + op.add(Builder::greek, GreekAnalyzer._DESERIALIZER, "greek"); + op.add(Builder::hindi, HindiAnalyzer._DESERIALIZER, "hindi"); + op.add(Builder::hungarian, HungarianAnalyzer._DESERIALIZER, "hungarian"); op.add(Builder::icuAnalyzer, IcuAnalyzer._DESERIALIZER, "icu_analyzer"); + op.add(Builder::indonesian, IndonesianAnalyzer._DESERIALIZER, "indonesian"); + op.add(Builder::irish, IrishAnalyzer._DESERIALIZER, "irish"); + op.add(Builder::italian, ItalianAnalyzer._DESERIALIZER, "italian"); op.add(Builder::keyword, KeywordAnalyzer._DESERIALIZER, "keyword"); op.add(Builder::kuromoji, KuromojiAnalyzer._DESERIALIZER, "kuromoji"); op.add(Builder::language, LanguageAnalyzer._DESERIALIZER, "language"); + op.add(Builder::latvian, LatvianAnalyzer._DESERIALIZER, "latvian"); + op.add(Builder::lithuanian, LithuanianAnalyzer._DESERIALIZER, "lithuanian"); op.add(Builder::nori, NoriAnalyzer._DESERIALIZER, "nori"); + op.add(Builder::norwegian, NorwegianAnalyzer._DESERIALIZER, "norwegian"); op.add(Builder::pattern, PatternAnalyzer._DESERIALIZER, "pattern"); + op.add(Builder::persian, PersianAnalyzer._DESERIALIZER, "persian"); + op.add(Builder::portuguese, PortugueseAnalyzer._DESERIALIZER, "portuguese"); + op.add(Builder::romanian, RomanianAnalyzer._DESERIALIZER, "romanian"); + op.add(Builder::russian, RussianAnalyzer._DESERIALIZER, "russian"); + op.add(Builder::serbian, SerbianAnalyzer._DESERIALIZER, "serbian"); op.add(Builder::simple, SimpleAnalyzer._DESERIALIZER, "simple"); op.add(Builder::snowball, SnowballAnalyzer._DESERIALIZER, "snowball"); + op.add(Builder::sorani, SoraniAnalyzer._DESERIALIZER, "sorani"); + op.add(Builder::spanish, SpanishAnalyzer._DESERIALIZER, "spanish"); op.add(Builder::standard, StandardAnalyzer._DESERIALIZER, "standard"); op.add(Builder::stop, StopAnalyzer._DESERIALIZER, "stop"); + op.add(Builder::swedish, SwedishAnalyzer._DESERIALIZER, "swedish"); + op.add(Builder::thai, ThaiAnalyzer._DESERIALIZER, "thai"); + op.add(Builder::turkish, TurkishAnalyzer._DESERIALIZER, "turkish"); op.add(Builder::whitespace, WhitespaceAnalyzer._DESERIALIZER, "whitespace"); op.setUnknownFieldHandler((builder, name, parser, mapper) -> { diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/AnalyzerBuilders.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/AnalyzerBuilders.java index f43787382..77c01248c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/AnalyzerBuilders.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/AnalyzerBuilders.java @@ -44,6 +44,166 @@ public class AnalyzerBuilders { private AnalyzerBuilders() { } + /** + * Creates a builder for the {@link ArabicAnalyzer arabic} {@code Analyzer} + * variant. + */ + public static ArabicAnalyzer.Builder arabic() { + return new ArabicAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link ArabicAnalyzer arabic} {@code Analyzer} + * variant. + */ + public static Analyzer arabic(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.arabic(fn.apply(new ArabicAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link ArmenianAnalyzer armenian} {@code Analyzer} + * variant. + */ + public static ArmenianAnalyzer.Builder armenian() { + return new ArmenianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link ArmenianAnalyzer armenian} {@code Analyzer} + * variant. + */ + public static Analyzer armenian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.armenian(fn.apply(new ArmenianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link BasqueAnalyzer basque} {@code Analyzer} + * variant. + */ + public static BasqueAnalyzer.Builder basque() { + return new BasqueAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link BasqueAnalyzer basque} {@code Analyzer} + * variant. + */ + public static Analyzer basque(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.basque(fn.apply(new BasqueAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link BengaliAnalyzer bengali} {@code Analyzer} + * variant. + */ + public static BengaliAnalyzer.Builder bengali() { + return new BengaliAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link BengaliAnalyzer bengali} {@code Analyzer} + * variant. + */ + public static Analyzer bengali(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.bengali(fn.apply(new BengaliAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link BrazilianAnalyzer brazilian} + * {@code Analyzer} variant. + */ + public static BrazilianAnalyzer.Builder brazilian() { + return new BrazilianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link BrazilianAnalyzer brazilian} + * {@code Analyzer} variant. + */ + public static Analyzer brazilian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.brazilian(fn.apply(new BrazilianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link BulgarianAnalyzer bulgarian} + * {@code Analyzer} variant. + */ + public static BulgarianAnalyzer.Builder bulgarian() { + return new BulgarianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link BulgarianAnalyzer bulgarian} + * {@code Analyzer} variant. + */ + public static Analyzer bulgarian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.bulgarian(fn.apply(new BulgarianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link CatalanAnalyzer catalan} {@code Analyzer} + * variant. + */ + public static CatalanAnalyzer.Builder catalan() { + return new CatalanAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link CatalanAnalyzer catalan} {@code Analyzer} + * variant. + */ + public static Analyzer catalan(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.catalan(fn.apply(new CatalanAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link ChineseAnalyzer chinese} {@code Analyzer} + * variant. + */ + public static ChineseAnalyzer.Builder chinese() { + return new ChineseAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link ChineseAnalyzer chinese} {@code Analyzer} + * variant. + */ + public static Analyzer chinese(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.chinese(fn.apply(new ChineseAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link CjkAnalyzer cjk} {@code Analyzer} variant. + */ + public static CjkAnalyzer.Builder cjk() { + return new CjkAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link CjkAnalyzer cjk} {@code Analyzer} variant. + */ + public static Analyzer cjk(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.cjk(fn.apply(new CjkAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link CustomAnalyzer custom} {@code Analyzer} * variant. @@ -62,6 +222,42 @@ public static Analyzer custom(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.czech(fn.apply(new CzechAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link DanishAnalyzer danish} {@code Analyzer} + * variant. + */ + public static DanishAnalyzer.Builder danish() { + return new DanishAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link DanishAnalyzer danish} {@code Analyzer} + * variant. + */ + public static Analyzer danish(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.danish(fn.apply(new DanishAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link DutchAnalyzer dutch} {@code Analyzer} * variant. @@ -80,6 +276,42 @@ public static Analyzer dutch(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.english(fn.apply(new EnglishAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link EstonianAnalyzer estonian} {@code Analyzer} + * variant. + */ + public static EstonianAnalyzer.Builder estonian() { + return new EstonianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link EstonianAnalyzer estonian} {@code Analyzer} + * variant. + */ + public static Analyzer estonian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.estonian(fn.apply(new EstonianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link FingerprintAnalyzer fingerprint} * {@code Analyzer} variant. @@ -98,6 +330,132 @@ public static Analyzer fingerprint(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.finnish(fn.apply(new FinnishAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link FrenchAnalyzer french} {@code Analyzer} + * variant. + */ + public static FrenchAnalyzer.Builder french() { + return new FrenchAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link FrenchAnalyzer french} {@code Analyzer} + * variant. + */ + public static Analyzer french(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.french(fn.apply(new FrenchAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link GalicianAnalyzer galician} {@code Analyzer} + * variant. + */ + public static GalicianAnalyzer.Builder galician() { + return new GalicianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link GalicianAnalyzer galician} {@code Analyzer} + * variant. + */ + public static Analyzer galician(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.galician(fn.apply(new GalicianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link GermanAnalyzer german} {@code Analyzer} + * variant. + */ + public static GermanAnalyzer.Builder german() { + return new GermanAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link GermanAnalyzer german} {@code Analyzer} + * variant. + */ + public static Analyzer german(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.german(fn.apply(new GermanAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link GreekAnalyzer greek} {@code Analyzer} + * variant. + */ + public static GreekAnalyzer.Builder greek() { + return new GreekAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link GreekAnalyzer greek} {@code Analyzer} + * variant. + */ + public static Analyzer greek(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.greek(fn.apply(new GreekAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link HindiAnalyzer hindi} {@code Analyzer} + * variant. + */ + public static HindiAnalyzer.Builder hindi() { + return new HindiAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link HindiAnalyzer hindi} {@code Analyzer} + * variant. + */ + public static Analyzer hindi(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.hindi(fn.apply(new HindiAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link HungarianAnalyzer hungarian} + * {@code Analyzer} variant. + */ + public static HungarianAnalyzer.Builder hungarian() { + return new HungarianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link HungarianAnalyzer hungarian} + * {@code Analyzer} variant. + */ + public static Analyzer hungarian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.hungarian(fn.apply(new HungarianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link IcuAnalyzer icu_analyzer} {@code Analyzer} * variant. @@ -116,6 +474,60 @@ public static Analyzer icuAnalyzer(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.indonesian(fn.apply(new IndonesianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link IrishAnalyzer irish} {@code Analyzer} + * variant. + */ + public static IrishAnalyzer.Builder irish() { + return new IrishAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link IrishAnalyzer irish} {@code Analyzer} + * variant. + */ + public static Analyzer irish(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.irish(fn.apply(new IrishAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link ItalianAnalyzer italian} {@code Analyzer} + * variant. + */ + public static ItalianAnalyzer.Builder italian() { + return new ItalianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link ItalianAnalyzer italian} {@code Analyzer} + * variant. + */ + public static Analyzer italian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.italian(fn.apply(new ItalianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link KeywordAnalyzer keyword} {@code Analyzer} * variant. @@ -170,6 +582,42 @@ public static Analyzer language(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.latvian(fn.apply(new LatvianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link LithuanianAnalyzer lithuanian} + * {@code Analyzer} variant. + */ + public static LithuanianAnalyzer.Builder lithuanian() { + return new LithuanianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link LithuanianAnalyzer lithuanian} + * {@code Analyzer} variant. + */ + public static Analyzer lithuanian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.lithuanian(fn.apply(new LithuanianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link NoriAnalyzer nori} {@code Analyzer} variant. */ @@ -186,6 +634,24 @@ public static Analyzer nori(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.norwegian(fn.apply(new NorwegianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link PatternAnalyzer pattern} {@code Analyzer} * variant. @@ -204,6 +670,96 @@ public static Analyzer pattern(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.persian(fn.apply(new PersianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link PortugueseAnalyzer portuguese} + * {@code Analyzer} variant. + */ + public static PortugueseAnalyzer.Builder portuguese() { + return new PortugueseAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link PortugueseAnalyzer portuguese} + * {@code Analyzer} variant. + */ + public static Analyzer portuguese(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.portuguese(fn.apply(new PortugueseAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link RomanianAnalyzer romanian} {@code Analyzer} + * variant. + */ + public static RomanianAnalyzer.Builder romanian() { + return new RomanianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link RomanianAnalyzer romanian} {@code Analyzer} + * variant. + */ + public static Analyzer romanian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.romanian(fn.apply(new RomanianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link RussianAnalyzer russian} {@code Analyzer} + * variant. + */ + public static RussianAnalyzer.Builder russian() { + return new RussianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link RussianAnalyzer russian} {@code Analyzer} + * variant. + */ + public static Analyzer russian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.russian(fn.apply(new RussianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link SerbianAnalyzer serbian} {@code Analyzer} + * variant. + */ + public static SerbianAnalyzer.Builder serbian() { + return new SerbianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link SerbianAnalyzer serbian} {@code Analyzer} + * variant. + */ + public static Analyzer serbian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.serbian(fn.apply(new SerbianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link SimpleAnalyzer simple} {@code Analyzer} * variant. @@ -240,6 +796,42 @@ public static Analyzer snowball(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.sorani(fn.apply(new SoraniAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link SpanishAnalyzer spanish} {@code Analyzer} + * variant. + */ + public static SpanishAnalyzer.Builder spanish() { + return new SpanishAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link SpanishAnalyzer spanish} {@code Analyzer} + * variant. + */ + public static Analyzer spanish(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.spanish(fn.apply(new SpanishAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link StandardAnalyzer standard} {@code Analyzer} * variant. @@ -274,6 +866,58 @@ public static Analyzer stop(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.swedish(fn.apply(new SwedishAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link ThaiAnalyzer thai} {@code Analyzer} variant. + */ + public static ThaiAnalyzer.Builder thai() { + return new ThaiAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link ThaiAnalyzer thai} {@code Analyzer} variant. + */ + public static Analyzer thai(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.thai(fn.apply(new ThaiAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link TurkishAnalyzer turkish} {@code Analyzer} + * variant. + */ + public static TurkishAnalyzer.Builder turkish() { + return new TurkishAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link TurkishAnalyzer turkish} {@code Analyzer} + * variant. + */ + public static Analyzer turkish(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.turkish(fn.apply(new TurkishAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link WhitespaceAnalyzer whitespace} * {@code Analyzer} variant. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArabicAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArabicAnalyzer.java new file mode 100644 index 000000000..ea64986f3 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArabicAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ArabicAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ArabicAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private ArabicAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static ArabicAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Arabic; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "arabic"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ArabicAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ArabicAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ArabicAnalyzer build() { + _checkSingleUse(); + + return new ArabicAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ArabicAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ArabicAnalyzer::setupArabicAnalyzerDeserializer); + + protected static void setupArabicAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArmenianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArmenianAnalyzer.java new file mode 100644 index 000000000..3e4da7101 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArmenianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ArmenianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ArmenianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private ArmenianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static ArmenianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Armenian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "armenian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ArmenianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ArmenianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ArmenianAnalyzer build() { + _checkSingleUse(); + + return new ArmenianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ArmenianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ArmenianAnalyzer::setupArmenianAnalyzerDeserializer); + + protected static void setupArmenianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BasqueAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BasqueAnalyzer.java new file mode 100644 index 000000000..6e9685bb4 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BasqueAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.BasqueAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class BasqueAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private BasqueAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static BasqueAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Basque; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "basque"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link BasqueAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link BasqueAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public BasqueAnalyzer build() { + _checkSingleUse(); + + return new BasqueAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link BasqueAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + BasqueAnalyzer::setupBasqueAnalyzerDeserializer); + + protected static void setupBasqueAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BengaliAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BengaliAnalyzer.java new file mode 100644 index 000000000..ff8e26057 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BengaliAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.BengaliAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class BengaliAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private BengaliAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static BengaliAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Bengali; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "bengali"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link BengaliAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link BengaliAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public BengaliAnalyzer build() { + _checkSingleUse(); + + return new BengaliAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link BengaliAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + BengaliAnalyzer::setupBengaliAnalyzerDeserializer); + + protected static void setupBengaliAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BrazilianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BrazilianAnalyzer.java new file mode 100644 index 000000000..b3ff95083 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BrazilianAnalyzer.java @@ -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. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.BrazilianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class BrazilianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private BrazilianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static BrazilianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Brazilian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "brazilian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link BrazilianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link BrazilianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public BrazilianAnalyzer build() { + _checkSingleUse(); + + return new BrazilianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link BrazilianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, BrazilianAnalyzer::setupBrazilianAnalyzerDeserializer); + + protected static void setupBrazilianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BulgarianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BulgarianAnalyzer.java new file mode 100644 index 000000000..bce4548fe --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BulgarianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.BulgarianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class BulgarianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private BulgarianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static BulgarianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Bulgarian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "bulgarian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link BulgarianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link BulgarianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public BulgarianAnalyzer build() { + _checkSingleUse(); + + return new BulgarianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link BulgarianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, BulgarianAnalyzer::setupBulgarianAnalyzerDeserializer); + + protected static void setupBulgarianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CatalanAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CatalanAnalyzer.java new file mode 100644 index 000000000..be3608b7e --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CatalanAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.CatalanAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CatalanAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private CatalanAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static CatalanAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Catalan; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "catalan"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CatalanAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CatalanAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CatalanAnalyzer build() { + _checkSingleUse(); + + return new CatalanAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CatalanAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CatalanAnalyzer::setupCatalanAnalyzerDeserializer); + + protected static void setupCatalanAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ChineseAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ChineseAnalyzer.java new file mode 100644 index 000000000..23af63468 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ChineseAnalyzer.java @@ -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. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ChineseAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ChineseAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private ChineseAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static ChineseAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Chinese; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "chinese"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ChineseAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ChineseAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ChineseAnalyzer build() { + _checkSingleUse(); + + return new ChineseAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ChineseAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ChineseAnalyzer::setupChineseAnalyzerDeserializer); + + protected static void setupChineseAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CjkAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CjkAnalyzer.java new file mode 100644 index 000000000..bf48d0fe7 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CjkAnalyzer.java @@ -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. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.CjkAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CjkAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private CjkAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static CjkAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Cjk; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "cjk"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CjkAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CjkAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CjkAnalyzer build() { + _checkSingleUse(); + + return new CjkAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CjkAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CjkAnalyzer::setupCjkAnalyzerDeserializer); + + protected static void setupCjkAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ClassicTokenizer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ClassicTokenizer.java new file mode 100644 index 000000000..4d47b9061 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ClassicTokenizer.java @@ -0,0 +1,156 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Integer; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ClassicTokenizer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ClassicTokenizer extends TokenizerBase implements TokenizerDefinitionVariant { + @Nullable + private final Integer maxTokenLength; + + // --------------------------------------------------------------------------------------------- + + private ClassicTokenizer(Builder builder) { + super(builder); + + this.maxTokenLength = builder.maxTokenLength; + + } + + public static ClassicTokenizer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * TokenizerDefinition variant kind. + */ + @Override + public TokenizerDefinition.Kind _tokenizerDefinitionKind() { + return TokenizerDefinition.Kind.Classic; + } + + /** + * API name: {@code max_token_length} + */ + @Nullable + public final Integer maxTokenLength() { + return this.maxTokenLength; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "classic"); + super.serializeInternal(generator, mapper); + if (this.maxTokenLength != null) { + generator.writeKey("max_token_length"); + generator.write(this.maxTokenLength); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ClassicTokenizer}. + */ + + public static class Builder extends TokenizerBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Integer maxTokenLength; + + /** + * API name: {@code max_token_length} + */ + public final Builder maxTokenLength(@Nullable Integer value) { + this.maxTokenLength = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ClassicTokenizer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ClassicTokenizer build() { + _checkSingleUse(); + + return new ClassicTokenizer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ClassicTokenizer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ClassicTokenizer::setupClassicTokenizerDeserializer); + + protected static void setupClassicTokenizerDeserializer(ObjectDeserializer op) { + TokenizerBase.setupTokenizerBaseDeserializer(op); + op.add(Builder::maxTokenLength, JsonpDeserializer.integerDeserializer(), "max_token_length"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CzechAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CzechAnalyzer.java new file mode 100644 index 000000000..9f6ba9e73 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CzechAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.CzechAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CzechAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private CzechAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static CzechAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Czech; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "czech"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CzechAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CzechAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CzechAnalyzer build() { + _checkSingleUse(); + + return new CzechAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CzechAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CzechAnalyzer::setupCzechAnalyzerDeserializer); + + protected static void setupCzechAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DanishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DanishAnalyzer.java new file mode 100644 index 000000000..c8f6d9137 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DanishAnalyzer.java @@ -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. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.DanishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class DanishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private DanishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static DanishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Danish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "danish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DanishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DanishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DanishAnalyzer build() { + _checkSingleUse(); + + return new DanishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DanishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + DanishAnalyzer::setupDanishAnalyzerDeserializer); + + protected static void setupDanishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java index 518b1e66a..7148de8c1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java @@ -63,11 +63,18 @@ public class DutchAnalyzer implements AnalyzerVariant, JsonpSerializable { private final List stopwords; + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + // --------------------------------------------------------------------------------------------- private DutchAnalyzer(Builder builder) { this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); } @@ -90,6 +97,21 @@ public final List stopwords() { return this.stopwords; } + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + /** * Serialize this object to JSON. */ @@ -113,6 +135,21 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } } @@ -131,6 +168,12 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private List stopwords; + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + /** * API name: {@code stopwords} *

@@ -151,6 +194,34 @@ public final Builder stopwords(String value, String... values) { return this; } + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + @Override protected Builder self() { return this; @@ -181,6 +252,9 @@ protected static void setupDutchAnalyzerDeserializer(ObjectDeserializer tokenChars() { return this.tokenChars; @@ -164,6 +164,7 @@ public static class Builder extends TokenizerBase.AbstractBuilder private Integer minGram; + @Nullable private List tokenChars; /** @@ -191,7 +192,7 @@ public final Builder minGram(int value) { } /** - * Required - API name: {@code token_chars} + * API name: {@code token_chars} *

* Adds all elements of list to tokenChars. */ @@ -201,7 +202,7 @@ public final Builder tokenChars(List list) { } /** - * Required - API name: {@code token_chars} + * API name: {@code token_chars} *

* Adds one or more values to tokenChars. */ diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/EnglishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/EnglishAnalyzer.java new file mode 100644 index 000000000..5981c60b3 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/EnglishAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.EnglishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class EnglishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private EnglishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static EnglishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.English; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "english"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link EnglishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link EnglishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public EnglishAnalyzer build() { + _checkSingleUse(); + + return new EnglishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link EnglishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + EnglishAnalyzer::setupEnglishAnalyzerDeserializer); + + protected static void setupEnglishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/EstonianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/EstonianAnalyzer.java new file mode 100644 index 000000000..85227ec6d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/EstonianAnalyzer.java @@ -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. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.EstonianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class EstonianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private EstonianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static EstonianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Estonian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "estonian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link EstonianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link EstonianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public EstonianAnalyzer build() { + _checkSingleUse(); + + return new EstonianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link EstonianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + EstonianAnalyzer::setupEstonianAnalyzerDeserializer); + + protected static void setupEstonianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FinnishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FinnishAnalyzer.java new file mode 100644 index 000000000..1a5082228 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FinnishAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.FinnishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FinnishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private FinnishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static FinnishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Finnish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "finnish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FinnishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FinnishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FinnishAnalyzer build() { + _checkSingleUse(); + + return new FinnishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FinnishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FinnishAnalyzer::setupFinnishAnalyzerDeserializer); + + protected static void setupFinnishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FrenchAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FrenchAnalyzer.java new file mode 100644 index 000000000..2101cf9bb --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FrenchAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.FrenchAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FrenchAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private FrenchAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static FrenchAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.French; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "french"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FrenchAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FrenchAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FrenchAnalyzer build() { + _checkSingleUse(); + + return new FrenchAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FrenchAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FrenchAnalyzer::setupFrenchAnalyzerDeserializer); + + protected static void setupFrenchAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GalicianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GalicianAnalyzer.java new file mode 100644 index 000000000..68444dfb0 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GalicianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.GalicianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GalicianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private GalicianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static GalicianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Galician; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "galician"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GalicianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GalicianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GalicianAnalyzer build() { + _checkSingleUse(); + + return new GalicianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GalicianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + GalicianAnalyzer::setupGalicianAnalyzerDeserializer); + + protected static void setupGalicianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GermanAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GermanAnalyzer.java new file mode 100644 index 000000000..d55757c1c --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GermanAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.GermanAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GermanAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private GermanAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static GermanAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.German; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "german"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GermanAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GermanAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GermanAnalyzer build() { + _checkSingleUse(); + + return new GermanAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GermanAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + GermanAnalyzer::setupGermanAnalyzerDeserializer); + + protected static void setupGermanAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GreekAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GreekAnalyzer.java new file mode 100644 index 000000000..d6bc8132d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GreekAnalyzer.java @@ -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. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.GreekAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GreekAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private GreekAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static GreekAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Greek; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "greek"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GreekAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GreekAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GreekAnalyzer build() { + _checkSingleUse(); + + return new GreekAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GreekAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + GreekAnalyzer::setupGreekAnalyzerDeserializer); + + protected static void setupGreekAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HindiAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HindiAnalyzer.java new file mode 100644 index 000000000..0c0d2ae59 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HindiAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.HindiAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class HindiAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private HindiAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static HindiAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Hindi; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "hindi"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link HindiAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link HindiAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public HindiAnalyzer build() { + _checkSingleUse(); + + return new HindiAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link HindiAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + HindiAnalyzer::setupHindiAnalyzerDeserializer); + + protected static void setupHindiAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HungarianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HungarianAnalyzer.java new file mode 100644 index 000000000..bfafdc917 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HungarianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.HungarianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class HungarianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private HungarianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static HungarianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Hungarian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "hungarian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link HungarianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link HungarianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public HungarianAnalyzer build() { + _checkSingleUse(); + + return new HungarianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link HungarianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, HungarianAnalyzer::setupHungarianAnalyzerDeserializer); + + protected static void setupHungarianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IndonesianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IndonesianAnalyzer.java new file mode 100644 index 000000000..1d8bba61b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IndonesianAnalyzer.java @@ -0,0 +1,264 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.IndonesianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class IndonesianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private IndonesianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static IndonesianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Indonesian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "indonesian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IndonesianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link IndonesianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IndonesianAnalyzer build() { + _checkSingleUse(); + + return new IndonesianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link IndonesianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, IndonesianAnalyzer::setupIndonesianAnalyzerDeserializer); + + protected static void setupIndonesianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IrishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IrishAnalyzer.java new file mode 100644 index 000000000..d7305fc8d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IrishAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.IrishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class IrishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private IrishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static IrishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Irish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "irish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IrishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link IrishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IrishAnalyzer build() { + _checkSingleUse(); + + return new IrishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link IrishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + IrishAnalyzer::setupIrishAnalyzerDeserializer); + + protected static void setupIrishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ItalianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ItalianAnalyzer.java new file mode 100644 index 000000000..c6b1f8aa2 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ItalianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ItalianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ItalianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private ItalianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static ItalianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Italian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "italian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ItalianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ItalianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ItalianAnalyzer build() { + _checkSingleUse(); + + return new ItalianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ItalianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ItalianAnalyzer::setupItalianAnalyzerDeserializer); + + protected static void setupItalianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LatvianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LatvianAnalyzer.java new file mode 100644 index 000000000..d9704dc34 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LatvianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.LatvianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class LatvianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private LatvianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static LatvianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Latvian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "latvian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LatvianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link LatvianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LatvianAnalyzer build() { + _checkSingleUse(); + + return new LatvianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LatvianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + LatvianAnalyzer::setupLatvianAnalyzerDeserializer); + + protected static void setupLatvianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LithuanianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LithuanianAnalyzer.java new file mode 100644 index 000000000..945665910 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LithuanianAnalyzer.java @@ -0,0 +1,264 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.LithuanianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class LithuanianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private LithuanianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static LithuanianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Lithuanian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "lithuanian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LithuanianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link LithuanianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LithuanianAnalyzer build() { + _checkSingleUse(); + + return new LithuanianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LithuanianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, LithuanianAnalyzer::setupLithuanianAnalyzerDeserializer); + + protected static void setupLithuanianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NGramTokenizer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NGramTokenizer.java index d7b874c81..a9078eada 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NGramTokenizer.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NGramTokenizer.java @@ -76,7 +76,7 @@ private NGramTokenizer(Builder builder) { this.customTokenChars = builder.customTokenChars; this.maxGram = ApiTypeHelper.requireNonNull(builder.maxGram, this, "maxGram"); this.minGram = ApiTypeHelper.requireNonNull(builder.minGram, this, "minGram"); - this.tokenChars = ApiTypeHelper.unmodifiableRequired(builder.tokenChars, this, "tokenChars"); + this.tokenChars = ApiTypeHelper.unmodifiable(builder.tokenChars); } @@ -115,7 +115,7 @@ public final int minGram() { } /** - * Required - API name: {@code token_chars} + * API name: {@code token_chars} */ public final List tokenChars() { return this.tokenChars; @@ -164,6 +164,7 @@ public static class Builder extends TokenizerBase.AbstractBuilder private Integer minGram; + @Nullable private List tokenChars; /** @@ -191,7 +192,7 @@ public final Builder minGram(int value) { } /** - * Required - API name: {@code token_chars} + * API name: {@code token_chars} *

* Adds all elements of list to tokenChars. */ @@ -201,7 +202,7 @@ public final Builder tokenChars(List list) { } /** - * Required - API name: {@code token_chars} + * API name: {@code token_chars} *

* Adds one or more values to tokenChars. */ diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NorwegianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NorwegianAnalyzer.java new file mode 100644 index 000000000..a769cb153 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NorwegianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.NorwegianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class NorwegianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private NorwegianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static NorwegianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Norwegian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "norwegian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link NorwegianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link NorwegianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public NorwegianAnalyzer build() { + _checkSingleUse(); + + return new NorwegianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link NorwegianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, NorwegianAnalyzer::setupNorwegianAnalyzerDeserializer); + + protected static void setupNorwegianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PersianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PersianAnalyzer.java new file mode 100644 index 000000000..7f6fcfb2f --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PersianAnalyzer.java @@ -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. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.PersianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class PersianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private PersianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static PersianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Persian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "persian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PersianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PersianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PersianAnalyzer build() { + _checkSingleUse(); + + return new PersianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PersianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PersianAnalyzer::setupPersianAnalyzerDeserializer); + + protected static void setupPersianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PhoneticTokenFilter.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PhoneticTokenFilter.java index 508311e3c..019fc839c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PhoneticTokenFilter.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PhoneticTokenFilter.java @@ -66,11 +66,13 @@ public class PhoneticTokenFilter extends TokenFilterBase implements TokenFilterD @Nullable private final Integer maxCodeLen; + @Nullable private final PhoneticNameType nameType; @Nullable private final Boolean replace; + @Nullable private final PhoneticRuleType ruleType; // --------------------------------------------------------------------------------------------- @@ -79,11 +81,11 @@ private PhoneticTokenFilter(Builder builder) { super(builder); this.encoder = ApiTypeHelper.requireNonNull(builder.encoder, this, "encoder"); - this.languageset = ApiTypeHelper.unmodifiableRequired(builder.languageset, this, "languageset"); + this.languageset = ApiTypeHelper.unmodifiable(builder.languageset); this.maxCodeLen = builder.maxCodeLen; - this.nameType = ApiTypeHelper.requireNonNull(builder.nameType, this, "nameType"); + this.nameType = builder.nameType; this.replace = builder.replace; - this.ruleType = ApiTypeHelper.requireNonNull(builder.ruleType, this, "ruleType"); + this.ruleType = builder.ruleType; } @@ -107,7 +109,7 @@ public final PhoneticEncoder encoder() { } /** - * Required - API name: {@code languageset} + * API name: {@code languageset} */ public final List languageset() { return this.languageset; @@ -122,8 +124,9 @@ public final Integer maxCodeLen() { } /** - * Required - API name: {@code name_type} + * API name: {@code name_type} */ + @Nullable public final PhoneticNameType nameType() { return this.nameType; } @@ -137,8 +140,9 @@ public final Boolean replace() { } /** - * Required - API name: {@code rule_type} + * API name: {@code rule_type} */ + @Nullable public final PhoneticRuleType ruleType() { return this.ruleType; } @@ -163,15 +167,19 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.maxCodeLen); } - generator.writeKey("name_type"); - this.nameType.serialize(generator, mapper); + if (this.nameType != null) { + generator.writeKey("name_type"); + this.nameType.serialize(generator, mapper); + } if (this.replace != null) { generator.writeKey("replace"); generator.write(this.replace); } - generator.writeKey("rule_type"); - this.ruleType.serialize(generator, mapper); + if (this.ruleType != null) { + generator.writeKey("rule_type"); + this.ruleType.serialize(generator, mapper); + } } @@ -186,16 +194,19 @@ public static class Builder extends TokenFilterBase.AbstractBuilder ObjectBuilder { private PhoneticEncoder encoder; + @Nullable private List languageset; @Nullable private Integer maxCodeLen; + @Nullable private PhoneticNameType nameType; @Nullable private Boolean replace; + @Nullable private PhoneticRuleType ruleType; /** @@ -207,7 +218,7 @@ public final Builder encoder(PhoneticEncoder value) { } /** - * Required - API name: {@code languageset} + * API name: {@code languageset} *

* Adds all elements of list to languageset. */ @@ -217,7 +228,7 @@ public final Builder languageset(List list) { } /** - * Required - API name: {@code languageset} + * API name: {@code languageset} *

* Adds one or more values to languageset. */ @@ -235,9 +246,9 @@ public final Builder maxCodeLen(@Nullable Integer value) { } /** - * Required - API name: {@code name_type} + * API name: {@code name_type} */ - public final Builder nameType(PhoneticNameType value) { + public final Builder nameType(@Nullable PhoneticNameType value) { this.nameType = value; return this; } @@ -251,9 +262,9 @@ public final Builder replace(@Nullable Boolean value) { } /** - * Required - API name: {@code rule_type} + * API name: {@code rule_type} */ - public final Builder ruleType(PhoneticRuleType value) { + public final Builder ruleType(@Nullable PhoneticRuleType value) { this.ruleType = value; return this; } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PortugueseAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PortugueseAnalyzer.java new file mode 100644 index 000000000..27c85d66a --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PortugueseAnalyzer.java @@ -0,0 +1,264 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.PortugueseAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class PortugueseAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private PortugueseAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static PortugueseAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Portuguese; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "portuguese"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PortugueseAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PortugueseAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PortugueseAnalyzer build() { + _checkSingleUse(); + + return new PortugueseAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PortugueseAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, PortugueseAnalyzer::setupPortugueseAnalyzerDeserializer); + + protected static void setupPortugueseAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RomanianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RomanianAnalyzer.java new file mode 100644 index 000000000..84a074457 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RomanianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.RomanianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class RomanianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private RomanianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static RomanianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Romanian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "romanian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RomanianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link RomanianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RomanianAnalyzer build() { + _checkSingleUse(); + + return new RomanianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RomanianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + RomanianAnalyzer::setupRomanianAnalyzerDeserializer); + + protected static void setupRomanianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RussianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RussianAnalyzer.java new file mode 100644 index 000000000..5e872ec82 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RussianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.RussianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class RussianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private RussianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static RussianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Russian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "russian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RussianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link RussianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RussianAnalyzer build() { + _checkSingleUse(); + + return new RussianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RussianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + RussianAnalyzer::setupRussianAnalyzerDeserializer); + + protected static void setupRussianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SerbianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SerbianAnalyzer.java new file mode 100644 index 000000000..42012a3a5 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SerbianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.SerbianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SerbianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private SerbianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static SerbianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Serbian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "serbian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SerbianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SerbianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SerbianAnalyzer build() { + _checkSingleUse(); + + return new SerbianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SerbianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SerbianAnalyzer::setupSerbianAnalyzerDeserializer); + + protected static void setupSerbianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SimplePatternSplitTokenizer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SimplePatternSplitTokenizer.java new file mode 100644 index 000000000..9543b0395 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SimplePatternSplitTokenizer.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.SimplePatternSplitTokenizer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SimplePatternSplitTokenizer extends TokenizerBase implements TokenizerDefinitionVariant { + @Nullable + private final String pattern; + + // --------------------------------------------------------------------------------------------- + + private SimplePatternSplitTokenizer(Builder builder) { + super(builder); + + this.pattern = builder.pattern; + + } + + public static SimplePatternSplitTokenizer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * TokenizerDefinition variant kind. + */ + @Override + public TokenizerDefinition.Kind _tokenizerDefinitionKind() { + return TokenizerDefinition.Kind.SimplePatternSplit; + } + + /** + * API name: {@code pattern} + */ + @Nullable + public final String pattern() { + return this.pattern; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "simple_pattern_split"); + super.serializeInternal(generator, mapper); + if (this.pattern != null) { + generator.writeKey("pattern"); + generator.write(this.pattern); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SimplePatternSplitTokenizer}. + */ + + public static class Builder extends TokenizerBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private String pattern; + + /** + * API name: {@code pattern} + */ + public final Builder pattern(@Nullable String value) { + this.pattern = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SimplePatternSplitTokenizer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SimplePatternSplitTokenizer build() { + _checkSingleUse(); + + return new SimplePatternSplitTokenizer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SimplePatternSplitTokenizer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SimplePatternSplitTokenizer::setupSimplePatternSplitTokenizerDeserializer); + + protected static void setupSimplePatternSplitTokenizerDeserializer( + ObjectDeserializer op) { + TokenizerBase.setupTokenizerBaseDeserializer(op); + op.add(Builder::pattern, JsonpDeserializer.stringDeserializer(), "pattern"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SimplePatternTokenizer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SimplePatternTokenizer.java new file mode 100644 index 000000000..255e56e08 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SimplePatternTokenizer.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.SimplePatternTokenizer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SimplePatternTokenizer extends TokenizerBase implements TokenizerDefinitionVariant { + @Nullable + private final String pattern; + + // --------------------------------------------------------------------------------------------- + + private SimplePatternTokenizer(Builder builder) { + super(builder); + + this.pattern = builder.pattern; + + } + + public static SimplePatternTokenizer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * TokenizerDefinition variant kind. + */ + @Override + public TokenizerDefinition.Kind _tokenizerDefinitionKind() { + return TokenizerDefinition.Kind.SimplePattern; + } + + /** + * API name: {@code pattern} + */ + @Nullable + public final String pattern() { + return this.pattern; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "simple_pattern"); + super.serializeInternal(generator, mapper); + if (this.pattern != null) { + generator.writeKey("pattern"); + generator.write(this.pattern); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SimplePatternTokenizer}. + */ + + public static class Builder extends TokenizerBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private String pattern; + + /** + * API name: {@code pattern} + */ + public final Builder pattern(@Nullable String value) { + this.pattern = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SimplePatternTokenizer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SimplePatternTokenizer build() { + _checkSingleUse(); + + return new SimplePatternTokenizer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SimplePatternTokenizer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SimplePatternTokenizer::setupSimplePatternTokenizerDeserializer); + + protected static void setupSimplePatternTokenizerDeserializer( + ObjectDeserializer op) { + TokenizerBase.setupTokenizerBaseDeserializer(op); + op.add(Builder::pattern, JsonpDeserializer.stringDeserializer(), "pattern"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SoraniAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SoraniAnalyzer.java new file mode 100644 index 000000000..a56c6f581 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SoraniAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.SoraniAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SoraniAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private SoraniAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static SoraniAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Sorani; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "sorani"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SoraniAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SoraniAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SoraniAnalyzer build() { + _checkSingleUse(); + + return new SoraniAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SoraniAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SoraniAnalyzer::setupSoraniAnalyzerDeserializer); + + protected static void setupSoraniAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SpanishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SpanishAnalyzer.java new file mode 100644 index 000000000..aa3db52d6 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SpanishAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.SpanishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SpanishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private SpanishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static SpanishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Spanish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "spanish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SpanishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SpanishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SpanishAnalyzer build() { + _checkSingleUse(); + + return new SpanishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SpanishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SpanishAnalyzer::setupSpanishAnalyzerDeserializer); + + protected static void setupSpanishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SwedishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SwedishAnalyzer.java new file mode 100644 index 000000000..230c906ae --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SwedishAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.SwedishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SwedishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private SwedishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static SwedishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Swedish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "swedish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SwedishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SwedishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SwedishAnalyzer build() { + _checkSingleUse(); + + return new SwedishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SwedishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SwedishAnalyzer::setupSwedishAnalyzerDeserializer); + + protected static void setupSwedishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ThaiAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ThaiAnalyzer.java new file mode 100644 index 000000000..429fa14aa --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ThaiAnalyzer.java @@ -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. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ThaiAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ThaiAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private ThaiAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static ThaiAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Thai; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "thai"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ThaiAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ThaiAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ThaiAnalyzer build() { + _checkSingleUse(); + + return new ThaiAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ThaiAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ThaiAnalyzer::setupThaiAnalyzerDeserializer); + + protected static void setupThaiAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ThaiTokenizer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ThaiTokenizer.java new file mode 100644 index 000000000..2c7d1ee7a --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ThaiTokenizer.java @@ -0,0 +1,122 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ThaiTokenizer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ThaiTokenizer extends TokenizerBase implements TokenizerDefinitionVariant { + // --------------------------------------------------------------------------------------------- + + private ThaiTokenizer(Builder builder) { + super(builder); + + } + + public static ThaiTokenizer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * TokenizerDefinition variant kind. + */ + @Override + public TokenizerDefinition.Kind _tokenizerDefinitionKind() { + return TokenizerDefinition.Kind.Thai; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "thai"); + super.serializeInternal(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ThaiTokenizer}. + */ + + public static class Builder extends TokenizerBase.AbstractBuilder implements ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ThaiTokenizer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ThaiTokenizer build() { + _checkSingleUse(); + + return new ThaiTokenizer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ThaiTokenizer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ThaiTokenizer::setupThaiTokenizerDeserializer); + + protected static void setupThaiTokenizerDeserializer(ObjectDeserializer op) { + TokenizerBase.setupTokenizerBaseDeserializer(op); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerDefinition.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerDefinition.java index 6c1c9e4cf..7e6258f49 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerDefinition.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerDefinition.java @@ -76,6 +76,8 @@ public class TokenizerDefinition implements OpenTaggedUnion charGroup( return this.charGroup(fn.apply(new CharGroupTokenizer.Builder()).build()); } + public ObjectBuilder classic(ClassicTokenizer v) { + this._kind = Kind.Classic; + this._value = v; + return this; + } + + public ObjectBuilder classic( + Function> fn) { + return this.classic(fn.apply(new ClassicTokenizer.Builder()).build()); + } + public ObjectBuilder edgeNgram(EdgeNGramTokenizer v) { this._kind = Kind.EdgeNgram; this._value = v; @@ -574,6 +662,28 @@ public ObjectBuilder pattern( return this.pattern(fn.apply(new PatternTokenizer.Builder()).build()); } + public ObjectBuilder simplePatternSplit(SimplePatternSplitTokenizer v) { + this._kind = Kind.SimplePatternSplit; + this._value = v; + return this; + } + + public ObjectBuilder simplePatternSplit( + Function> fn) { + return this.simplePatternSplit(fn.apply(new SimplePatternSplitTokenizer.Builder()).build()); + } + + public ObjectBuilder simplePattern(SimplePatternTokenizer v) { + this._kind = Kind.SimplePattern; + this._value = v; + return this; + } + + public ObjectBuilder simplePattern( + Function> fn) { + return this.simplePattern(fn.apply(new SimplePatternTokenizer.Builder()).build()); + } + public ObjectBuilder standard(StandardTokenizer v) { this._kind = Kind.Standard; this._value = v; @@ -585,6 +695,17 @@ public ObjectBuilder standard( return this.standard(fn.apply(new StandardTokenizer.Builder()).build()); } + public ObjectBuilder thai(ThaiTokenizer v) { + this._kind = Kind.Thai; + this._value = v; + return this; + } + + public ObjectBuilder thai( + Function> fn) { + return this.thai(fn.apply(new ThaiTokenizer.Builder()).build()); + } + public ObjectBuilder uaxUrlEmail(UaxEmailUrlTokenizer v) { this._kind = Kind.UaxUrlEmail; this._value = v; @@ -633,6 +754,7 @@ public TokenizerDefinition build() { protected static void setupTokenizerDefinitionDeserializer(ObjectDeserializer op) { op.add(Builder::charGroup, CharGroupTokenizer._DESERIALIZER, "char_group"); + op.add(Builder::classic, ClassicTokenizer._DESERIALIZER, "classic"); op.add(Builder::edgeNgram, EdgeNGramTokenizer._DESERIALIZER, "edge_ngram"); op.add(Builder::icuTokenizer, IcuTokenizer._DESERIALIZER, "icu_tokenizer"); op.add(Builder::keyword, KeywordTokenizer._DESERIALIZER, "keyword"); @@ -643,7 +765,10 @@ protected static void setupTokenizerDefinitionDeserializer(ObjectDeserializer> fn) { + TokenizerDefinition.Builder builder = new TokenizerDefinition.Builder(); + builder.classic(fn.apply(new ClassicTokenizer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link EdgeNGramTokenizer edge_ngram} * {@code TokenizerDefinition} variant. @@ -247,6 +265,44 @@ public static TokenizerDefinition pattern(Function> fn) { + TokenizerDefinition.Builder builder = new TokenizerDefinition.Builder(); + builder.simplePatternSplit(fn.apply(new SimplePatternSplitTokenizer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link SimplePatternTokenizer simple_pattern} + * {@code TokenizerDefinition} variant. + */ + public static SimplePatternTokenizer.Builder simplePattern() { + return new SimplePatternTokenizer.Builder(); + } + + /** + * Creates a TokenizerDefinition of the {@link SimplePatternTokenizer + * simple_pattern} {@code TokenizerDefinition} variant. + */ + public static TokenizerDefinition simplePattern( + Function> fn) { + TokenizerDefinition.Builder builder = new TokenizerDefinition.Builder(); + builder.simplePattern(fn.apply(new SimplePatternTokenizer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link StandardTokenizer standard} * {@code TokenizerDefinition} variant. @@ -266,6 +322,24 @@ public static TokenizerDefinition standard( return builder.build(); } + /** + * Creates a builder for the {@link ThaiTokenizer thai} + * {@code TokenizerDefinition} variant. + */ + public static ThaiTokenizer.Builder thai() { + return new ThaiTokenizer.Builder(); + } + + /** + * Creates a TokenizerDefinition of the {@link ThaiTokenizer thai} + * {@code TokenizerDefinition} variant. + */ + public static TokenizerDefinition thai(Function> fn) { + TokenizerDefinition.Builder builder = new TokenizerDefinition.Builder(); + builder.thai(fn.apply(new ThaiTokenizer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link UaxEmailUrlTokenizer uax_url_email} * {@code TokenizerDefinition} variant. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TurkishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TurkishAnalyzer.java new file mode 100644 index 000000000..64b0832ad --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TurkishAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch._types.analysis; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.TurkishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class TurkishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private TurkishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static TurkishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Turkish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "turkish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link TurkishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link TurkishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public TurkishAnalyzer build() { + _checkSingleUse(); + + return new TurkishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link TurkishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + TurkishAnalyzer::setupTurkishAnalyzerDeserializer); + + protected static void setupTurkishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/CompositeSubField.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/CompositeSubField.java new file mode 100644 index 000000000..d738d1851 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/CompositeSubField.java @@ -0,0 +1,153 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.mapping; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.mapping.CompositeSubField + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CompositeSubField implements JsonpSerializable { + private final RuntimeFieldType type; + + // --------------------------------------------------------------------------------------------- + + private CompositeSubField(Builder builder) { + + this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); + + } + + public static CompositeSubField of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code type} + */ + public final RuntimeFieldType type() { + return this.type; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("type"); + this.type.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CompositeSubField}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private RuntimeFieldType type; + + /** + * Required - API name: {@code type} + */ + public final Builder type(RuntimeFieldType value) { + this.type = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CompositeSubField}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CompositeSubField build() { + _checkSingleUse(); + + return new CompositeSubField(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CompositeSubField} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, CompositeSubField::setupCompositeSubFieldDeserializer); + + protected static void setupCompositeSubFieldDeserializer(ObjectDeserializer op) { + + op.add(Builder::type, RuntimeFieldType._DESERIALIZER, "type"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java index b25057df5..c655332e0 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java @@ -30,6 +30,7 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import java.lang.Float; import java.lang.Integer; import java.lang.String; import java.util.Objects; @@ -63,17 +64,23 @@ public class DenseVectorIndexOptions implements JsonpSerializable { private final String type; - private final int m; + @Nullable + private final Integer m; - private final int efConstruction; + @Nullable + private final Integer efConstruction; + + @Nullable + private final Float confidenceInterval; // --------------------------------------------------------------------------------------------- private DenseVectorIndexOptions(Builder builder) { this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); - this.m = ApiTypeHelper.requireNonNull(builder.m, this, "m"); - this.efConstruction = ApiTypeHelper.requireNonNull(builder.efConstruction, this, "efConstruction"); + this.m = builder.m; + this.efConstruction = builder.efConstruction; + this.confidenceInterval = builder.confidenceInterval; } @@ -89,19 +96,29 @@ public final String type() { } /** - * Required - API name: {@code m} + * API name: {@code m} */ - public final int m() { + @Nullable + public final Integer m() { return this.m; } /** - * Required - API name: {@code ef_construction} + * API name: {@code ef_construction} */ - public final int efConstruction() { + @Nullable + public final Integer efConstruction() { return this.efConstruction; } + /** + * API name: {@code confidence_interval} + */ + @Nullable + public final Float confidenceInterval() { + return this.confidenceInterval; + } + /** * Serialize this object to JSON. */ @@ -116,11 +133,21 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("type"); generator.write(this.type); - generator.writeKey("m"); - generator.write(this.m); + if (this.m != null) { + generator.writeKey("m"); + generator.write(this.m); + + } + if (this.efConstruction != null) { + generator.writeKey("ef_construction"); + generator.write(this.efConstruction); + + } + if (this.confidenceInterval != null) { + generator.writeKey("confidence_interval"); + generator.write(this.confidenceInterval); - generator.writeKey("ef_construction"); - generator.write(this.efConstruction); + } } @@ -140,10 +167,15 @@ public static class Builder extends WithJsonObjectBuilderBase ObjectBuilder { private String type; + @Nullable private Integer m; + @Nullable private Integer efConstruction; + @Nullable + private Float confidenceInterval; + /** * Required - API name: {@code type} */ @@ -153,21 +185,29 @@ public final Builder type(String value) { } /** - * Required - API name: {@code m} + * API name: {@code m} */ - public final Builder m(int value) { + public final Builder m(@Nullable Integer value) { this.m = value; return this; } /** - * Required - API name: {@code ef_construction} + * API name: {@code ef_construction} */ - public final Builder efConstruction(int value) { + public final Builder efConstruction(@Nullable Integer value) { this.efConstruction = value; return this; } + /** + * API name: {@code confidence_interval} + */ + public final Builder confidenceInterval(@Nullable Float value) { + this.confidenceInterval = value; + return this; + } + @Override protected Builder self() { return this; @@ -200,6 +240,7 @@ protected static void setupDenseVectorIndexOptionsDeserializer( op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); op.add(Builder::m, JsonpDeserializer.integerDeserializer(), "m"); op.add(Builder::efConstruction, JsonpDeserializer.integerDeserializer(), "ef_construction"); + op.add(Builder::confidenceInterval, JsonpDeserializer.floatDeserializer(), "confidence_interval"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java index 27c57ea8f..c0016ebe2 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java @@ -33,6 +33,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -61,6 +62,8 @@ */ @JsonpDeserializable public class RuntimeField implements JsonpSerializable { + private final Map fields; + private final List fetchFields; @Nullable @@ -84,6 +87,7 @@ public class RuntimeField implements JsonpSerializable { private RuntimeField(Builder builder) { + this.fields = ApiTypeHelper.unmodifiable(builder.fields); this.fetchFields = ApiTypeHelper.unmodifiable(builder.fetchFields); this.format = builder.format; this.inputField = builder.inputField; @@ -98,6 +102,15 @@ public static RuntimeField of(Function> fn) return fn.apply(new Builder()).build(); } + /** + * For type composite + *

+ * API name: {@code fields} + */ + public final Map fields() { + return this.fields; + } + /** * For type lookup *

@@ -180,6 +193,17 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + if (ApiTypeHelper.isDefined(this.fields)) { + generator.writeKey("fields"); + generator.writeStartObject(); + for (Map.Entry item0 : this.fields.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } if (ApiTypeHelper.isDefined(this.fetchFields)) { generator.writeKey("fetch_fields"); generator.writeStartArray(); @@ -232,6 +256,9 @@ public String toString() { */ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private Map fields; + @Nullable private List fetchFields; @@ -252,6 +279,42 @@ public static class Builder extends WithJsonObjectBuilderBase implement private RuntimeFieldType type; + /** + * For type composite + *

+ * API name: {@code fields} + *

+ * Adds all entries of map to fields. + */ + public final Builder fields(Map map) { + this.fields = _mapPutAll(this.fields, map); + return this; + } + + /** + * For type composite + *

+ * API name: {@code fields} + *

+ * Adds an entry to fields. + */ + public final Builder fields(String key, CompositeSubField value) { + this.fields = _mapPut(this.fields, key, value); + return this; + } + + /** + * For type composite + *

+ * API name: {@code fields} + *

+ * Adds an entry to fields using a builder lambda. + */ + public final Builder fields(String key, + Function> fn) { + return fields(key, fn.apply(new CompositeSubField.Builder()).build()); + } + /** * For type lookup *

@@ -388,6 +451,7 @@ public RuntimeField build() { protected static void setupRuntimeFieldDeserializer(ObjectDeserializer op) { + op.add(Builder::fields, JsonpDeserializer.stringMapDeserializer(CompositeSubField._DESERIALIZER), "fields"); op.add(Builder::fetchFields, JsonpDeserializer.arrayDeserializer(RuntimeFieldFetchFields._DESERIALIZER), "fetch_fields"); op.add(Builder::format, JsonpDeserializer.stringDeserializer(), "format"); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DateRangeQuery.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DateRangeQuery.java index 2b44695d2..28bf08111 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DateRangeQuery.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DateRangeQuery.java @@ -24,6 +24,7 @@ import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.String; @@ -56,6 +57,9 @@ */ @JsonpDeserializable public class DateRangeQuery extends RangeQueryBase implements RangeQueryVariant { + // Single key dictionary + private final String field; + @Nullable private final String format; @@ -66,6 +70,7 @@ public class DateRangeQuery extends RangeQueryBase implements RangeQuery private DateRangeQuery(Builder builder) { super(builder); + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); this.format = builder.format; this.timeZone = builder.timeZone; @@ -84,6 +89,13 @@ public RangeQuery.Kind _rangeQueryKind() { return RangeQuery.Kind.Date; } + /** + * Required - the required field + */ + public final String field() { + return this.field; + } + /** * Date format used to convert date values in the query. *

@@ -106,6 +118,7 @@ public final String timeZone() { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); super.serializeInternal(generator, mapper); if (this.format != null) { @@ -119,6 +132,8 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } + generator.writeEnd(); + } // --------------------------------------------------------------------------------------------- @@ -130,6 +145,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends RangeQueryBase.AbstractBuilder implements ObjectBuilder { + private String field; + + /** + * Required - the required field + */ + public final Builder field(String value) { + this.field = value; + return this; + } + @Nullable private String format; @@ -189,6 +214,8 @@ protected static void setupDateRangeQueryDeserializer(ObjectDeserializer implements RangeQueryVariant { + // Single key dictionary + private final String field; + // --------------------------------------------------------------------------------------------- private NumberRangeQuery(Builder builder) { super(builder); + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); } @@ -73,6 +81,22 @@ public RangeQuery.Kind _rangeQueryKind() { return RangeQuery.Kind.Number; } + /** + * Required - the required field + */ + public final String field() { + return this.field; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); + + super.serializeInternal(generator, mapper); + + generator.writeEnd(); + + } + // --------------------------------------------------------------------------------------------- /** @@ -82,6 +106,16 @@ public RangeQuery.Kind _rangeQueryKind() { public static class Builder extends RangeQueryBase.AbstractBuilder implements ObjectBuilder { + private String field; + + /** + * Required - the required field + */ + public final Builder field(String value) { + this.field = value; + return this; + } + @Override protected Builder self() { return this; @@ -112,6 +146,8 @@ public NumberRangeQuery build() { protected static void setupNumberRangeQueryDeserializer(ObjectDeserializer op) { RangeQueryBase.setupRangeQueryBaseDeserializer(op, JsonpDeserializer.doubleDeserializer()); + op.setKey(Builder::field, JsonpDeserializer.stringDeserializer()); + } } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java index 738b22398..e0625e335 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java @@ -26,11 +26,9 @@ import co.elastic.clients.json.JsonpUtils; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; -import java.lang.String; import java.util.Objects; import javax.annotation.Nullable; @@ -59,9 +57,6 @@ */ public abstract class RangeQueryBase extends QueryBase { - // Single key dictionary - private final String field; - @Nullable private final RangeRelation relation; @@ -90,7 +85,6 @@ public abstract class RangeQueryBase extends QueryBase { protected RangeQueryBase(AbstractBuilder builder) { super(builder); - this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); this.relation = builder.relation; this.gt = builder.gt; @@ -103,13 +97,6 @@ protected RangeQueryBase(AbstractBuilder builder) { } - /** - * Required - the required field - */ - public final String field() { - return this.field; - } - /** * Indicates how the range query matches values for range fields. *

@@ -177,7 +164,6 @@ public final T to() { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(this.field); super.serializeInternal(generator, mapper); if (this.relation != null) { @@ -215,23 +201,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } - generator.writeEnd(); - } public abstract static class AbstractBuilder> extends QueryBase.AbstractBuilder { - private String field; - - /** - * Required - the required field - */ - public final BuilderT field(String value) { - this.field = value; - return self(); - } - @Nullable private RangeRelation relation; @@ -345,8 +319,6 @@ protected static > void setupRa op.add(AbstractBuilder::from, tDeserializer, "from"); op.add(AbstractBuilder::to, tDeserializer, "to"); - op.setKey(AbstractBuilder::field, JsonpDeserializer.stringDeserializer()); - } } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermQuery.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermQuery.java index 1f69488c1..d2399c98a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermQuery.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermQuery.java @@ -269,7 +269,7 @@ protected static void setupTermQueryDeserializer(ObjectDeserializer implements RangeQueryVariant { + // Single key dictionary + private final String field; + // --------------------------------------------------------------------------------------------- private TermRangeQuery(Builder builder) { super(builder); + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); } @@ -73,6 +80,22 @@ public RangeQuery.Kind _rangeQueryKind() { return RangeQuery.Kind.Term; } + /** + * Required - the required field + */ + public final String field() { + return this.field; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); + + super.serializeInternal(generator, mapper); + + generator.writeEnd(); + + } + // --------------------------------------------------------------------------------------------- /** @@ -82,6 +105,16 @@ public RangeQuery.Kind _rangeQueryKind() { public static class Builder extends RangeQueryBase.AbstractBuilder implements ObjectBuilder { + private String field; + + /** + * Required - the required field + */ + public final Builder field(String value) { + this.field = value; + return this; + } + @Override protected Builder self() { return this; @@ -112,6 +145,8 @@ public TermRangeQuery build() { protected static void setupTermRangeQueryDeserializer(ObjectDeserializer op) { RangeQueryBase.setupRangeQueryBaseDeserializer(op, JsonpDeserializer.stringDeserializer()); + op.setKey(Builder::field, JsonpDeserializer.stringDeserializer()); + } } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/UntypedRangeQuery.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/UntypedRangeQuery.java index 69d216052..abdfb9ba8 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/UntypedRangeQuery.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/UntypedRangeQuery.java @@ -25,6 +25,7 @@ import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.String; @@ -57,6 +58,9 @@ */ @JsonpDeserializable public class UntypedRangeQuery extends RangeQueryBase implements RangeQueryVariant { + // Single key dictionary + private final String field; + @Nullable private final String format; @@ -67,6 +71,7 @@ public class UntypedRangeQuery extends RangeQueryBase implements Range private UntypedRangeQuery(Builder builder) { super(builder); + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); this.format = builder.format; this.timeZone = builder.timeZone; @@ -85,6 +90,13 @@ public RangeQuery.Kind _rangeQueryKind() { return RangeQuery.Kind.Untyped; } + /** + * Required - the required field + */ + public final String field() { + return this.field; + } + /** * Date format used to convert date values in the query. *

@@ -107,6 +119,7 @@ public final String timeZone() { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); super.serializeInternal(generator, mapper); if (this.format != null) { @@ -120,6 +133,8 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } + generator.writeEnd(); + } // --------------------------------------------------------------------------------------------- @@ -131,6 +146,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends RangeQueryBase.AbstractBuilder implements ObjectBuilder { + private String field; + + /** + * Required - the required field + */ + public final Builder field(String value) { + this.field = value; + return this; + } + @Nullable private String format; @@ -190,6 +215,8 @@ protected static void setupUntypedRangeQueryDeserializer(ObjectDeserializer + * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java index 4ef3071fb..631a94d7c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java @@ -53,12 +53,13 @@ // typedef: cat.component_templates.Request /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java index 52bf74d58..a1d6203c5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java @@ -56,11 +56,13 @@ // typedef: cat.count.Request /** - * Provides quick access to a document count for a data stream, an index, or an - * entire cluster. NOTE: The document count only includes live documents, not - * deleted documents which have not yet been removed by the merge process. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For + * Get a document count. Provides quick access to a document count for a data + * stream, an index, or an entire cluster. The document count only includes live + * documents, not deleted documents which have not yet been removed by the merge + * process. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java index 3fe1491ca..19f082cd7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java @@ -67,11 +67,12 @@ public ElasticsearchCatAsyncClient withTransportOptions(@Nullable TransportOptio // ----- Endpoint: cat.aliases /** - * Retrieves the cluster’s index aliases, including filter and routing - * information. The API does not return data stream aliases. IMPORTANT: cat APIs - * are only intended for human consumption using the command line or the Kibana - * console. They are not intended for use by applications. For application - * consumption, use the aliases API. + * Get aliases. Retrieves the cluster’s index aliases, including filter and + * routing information. The API does not return data stream aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @see Documentation @@ -86,11 +87,12 @@ public CompletableFuture aliases(AliasesRequest request) { } /** - * Retrieves the cluster’s index aliases, including filter and routing - * information. The API does not return data stream aliases. IMPORTANT: cat APIs - * are only intended for human consumption using the command line or the Kibana - * console. They are not intended for use by applications. For application - * consumption, use the aliases API. + * Get aliases. Retrieves the cluster’s index aliases, including filter and + * routing information. The API does not return data stream aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @param fn * a function that initializes a builder to create the @@ -106,11 +108,12 @@ public final CompletableFuture aliases( } /** - * Retrieves the cluster’s index aliases, including filter and routing - * information. The API does not return data stream aliases. IMPORTANT: cat APIs - * are only intended for human consumption using the command line or the Kibana - * console. They are not intended for use by applications. For application - * consumption, use the aliases API. + * Get aliases. Retrieves the cluster’s index aliases, including filter and + * routing information. The API does not return data stream aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @see Documentation @@ -125,12 +128,13 @@ public CompletableFuture aliases() { // ----- Endpoint: cat.component_templates /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @see Documentation @@ -145,12 +149,13 @@ public CompletableFuture componentTemplates(Componen } /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @param fn * a function that initializes a builder to create the @@ -166,12 +171,13 @@ public final CompletableFuture componentTemplates( } /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @see Documentation @@ -186,11 +192,13 @@ public CompletableFuture componentTemplates() { // ----- Endpoint: cat.count /** - * Provides quick access to a document count for a data stream, an index, or an - * entire cluster. NOTE: The document count only includes live documents, not - * deleted documents which have not yet been removed by the merge process. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For + * Get a document count. Provides quick access to a document count for a data + * stream, an index, or an entire cluster. The document count only includes live + * documents, not deleted documents which have not yet been removed by the merge + * process. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @see count(CountRequest request) { } /** - * Provides quick access to a document count for a data stream, an index, or an - * entire cluster. NOTE: The document count only includes live documents, not - * deleted documents which have not yet been removed by the merge process. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For + * Get a document count. Provides quick access to a document count for a data + * stream, an index, or an entire cluster. The document count only includes live + * documents, not deleted documents which have not yet been removed by the merge + * process. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @param fn @@ -227,11 +237,13 @@ public final CompletableFuture count( } /** - * Provides quick access to a document count for a data stream, an index, or an - * entire cluster. NOTE: The document count only includes live documents, not - * deleted documents which have not yet been removed by the merge process. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For + * Get a document count. Provides quick access to a document count for a data + * stream, an index, or an entire cluster. The document count only includes live + * documents, not deleted documents which have not yet been removed by the merge + * process. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @see count() { // ----- Endpoint: cat.help /** - * Returns help for the Cat APIs. + * Get CAT help. Returns help for the CAT APIs. * * @see Documentation @@ -260,17 +272,27 @@ public CompletableFuture help() { // ----- Endpoint: cat.indices /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @see Documentation @@ -285,17 +307,27 @@ public CompletableFuture indices(IndicesRequest request) { } /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @param fn * a function that initializes a builder to create the @@ -311,17 +343,27 @@ public final CompletableFuture indices( } /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @see Documentation @@ -336,12 +378,12 @@ public CompletableFuture indices() { // ----- Endpoint: cat.ml_data_frame_analytics /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @see Documentation @@ -356,12 +398,12 @@ public CompletableFuture mlDataFrameAnalytics(MlDa } /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @param fn * a function that initializes a builder to create the @@ -377,12 +419,12 @@ public final CompletableFuture mlDataFrameAnalytic } /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @see Documentation @@ -397,15 +439,15 @@ public CompletableFuture mlDataFrameAnalytics() { // ----- Endpoint: cat.ml_datafeeds /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @see Documentation @@ -420,15 +462,15 @@ public CompletableFuture mlDatafeeds(MlDatafeedsRequest req } /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @param fn * a function that initializes a builder to create the @@ -444,15 +486,15 @@ public final CompletableFuture mlDatafeeds( } /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @see Documentation @@ -467,15 +509,15 @@ public CompletableFuture mlDatafeeds() { // ----- Endpoint: cat.ml_jobs /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @see Documentation @@ -490,15 +532,15 @@ public CompletableFuture mlJobs(MlJobsRequest request) { } /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @param fn * a function that initializes a builder to create the @@ -514,15 +556,15 @@ public final CompletableFuture mlJobs( } /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @see Documentation @@ -537,11 +579,12 @@ public CompletableFuture mlJobs() { // ----- Endpoint: cat.ml_trained_models /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @see Documentation @@ -556,11 +599,12 @@ public CompletableFuture mlTrainedModels(MlTrainedModel } /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @param fn * a function that initializes a builder to create the @@ -576,11 +620,12 @@ public final CompletableFuture mlTrainedModels( } /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @see Documentation @@ -595,11 +640,11 @@ public CompletableFuture mlTrainedModels() { // ----- Endpoint: cat.transforms /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @see Documentation @@ -614,11 +659,11 @@ public CompletableFuture transforms(TransformsRequest reques } /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @param fn * a function that initializes a builder to create the @@ -634,11 +679,11 @@ public final CompletableFuture transforms( } /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java index 9483c56ee..112ac3c0f 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java @@ -68,11 +68,12 @@ public ElasticsearchCatClient withTransportOptions(@Nullable TransportOptions tr // ----- Endpoint: cat.aliases /** - * Retrieves the cluster’s index aliases, including filter and routing - * information. The API does not return data stream aliases. IMPORTANT: cat APIs - * are only intended for human consumption using the command line or the Kibana - * console. They are not intended for use by applications. For application - * consumption, use the aliases API. + * Get aliases. Retrieves the cluster’s index aliases, including filter and + * routing information. The API does not return data stream aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @see Documentation @@ -87,11 +88,12 @@ public AliasesResponse aliases(AliasesRequest request) throws IOException, Elast } /** - * Retrieves the cluster’s index aliases, including filter and routing - * information. The API does not return data stream aliases. IMPORTANT: cat APIs - * are only intended for human consumption using the command line or the Kibana - * console. They are not intended for use by applications. For application - * consumption, use the aliases API. + * Get aliases. Retrieves the cluster’s index aliases, including filter and + * routing information. The API does not return data stream aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @param fn * a function that initializes a builder to create the @@ -107,11 +109,12 @@ public final AliasesResponse aliases(Function + * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @see Documentation @@ -126,12 +129,13 @@ public AliasesResponse aliases() throws IOException, ElasticsearchException { // ----- Endpoint: cat.component_templates /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @see Documentation @@ -147,12 +151,13 @@ public ComponentTemplatesResponse componentTemplates(ComponentTemplatesRequest r } /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @param fn * a function that initializes a builder to create the @@ -169,12 +174,13 @@ public final ComponentTemplatesResponse componentTemplates( } /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @see Documentation @@ -189,11 +195,13 @@ public ComponentTemplatesResponse componentTemplates() throws IOException, Elast // ----- Endpoint: cat.count /** - * Provides quick access to a document count for a data stream, an index, or an - * entire cluster. NOTE: The document count only includes live documents, not - * deleted documents which have not yet been removed by the merge process. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For + * Get a document count. Provides quick access to a document count for a data + * stream, an index, or an entire cluster. The document count only includes live + * documents, not deleted documents which have not yet been removed by the merge + * process. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @see + * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @param fn @@ -230,11 +240,13 @@ public final CountResponse count(Function + * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @see Documentation @@ -263,17 +275,27 @@ public HelpResponse help() throws IOException, ElasticsearchException { // ----- Endpoint: cat.indices /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @see Documentation @@ -288,17 +310,27 @@ public IndicesResponse indices(IndicesRequest request) throws IOException, Elast } /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @param fn * a function that initializes a builder to create the @@ -314,17 +346,27 @@ public final IndicesResponse indices(Function

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @see Documentation @@ -339,12 +381,12 @@ public IndicesResponse indices() throws IOException, ElasticsearchException { // ----- Endpoint: cat.ml_data_frame_analytics /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @see Documentation @@ -360,12 +402,12 @@ public MlDataFrameAnalyticsResponse mlDataFrameAnalytics(MlDataFrameAnalyticsReq } /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @param fn * a function that initializes a builder to create the @@ -382,12 +424,12 @@ public final MlDataFrameAnalyticsResponse mlDataFrameAnalytics( } /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @see Documentation @@ -402,15 +444,15 @@ public MlDataFrameAnalyticsResponse mlDataFrameAnalytics() throws IOException, E // ----- Endpoint: cat.ml_datafeeds /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @see Documentation @@ -425,15 +467,15 @@ public MlDatafeedsResponse mlDatafeeds(MlDatafeedsRequest request) throws IOExce } /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @param fn * a function that initializes a builder to create the @@ -450,15 +492,15 @@ public final MlDatafeedsResponse mlDatafeeds( } /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @see Documentation @@ -473,15 +515,15 @@ public MlDatafeedsResponse mlDatafeeds() throws IOException, ElasticsearchExcept // ----- Endpoint: cat.ml_jobs /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @see Documentation @@ -496,15 +538,15 @@ public MlJobsResponse mlJobs(MlJobsRequest request) throws IOException, Elastics } /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @param fn * a function that initializes a builder to create the @@ -520,15 +562,15 @@ public final MlJobsResponse mlJobs(Functionmonitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @see Documentation @@ -543,11 +585,12 @@ public MlJobsResponse mlJobs() throws IOException, ElasticsearchException { // ----- Endpoint: cat.ml_trained_models /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @see Documentation @@ -563,11 +606,12 @@ public MlTrainedModelsResponse mlTrainedModels(MlTrainedModelsRequest request) } /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @param fn * a function that initializes a builder to create the @@ -584,11 +628,12 @@ public final MlTrainedModelsResponse mlTrainedModels( } /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @see Documentation @@ -603,11 +648,11 @@ public MlTrainedModelsResponse mlTrainedModels() throws IOException, Elasticsear // ----- Endpoint: cat.transforms /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @see Documentation @@ -622,11 +667,11 @@ public TransformsResponse transforms(TransformsRequest request) throws IOExcepti } /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @param fn * a function that initializes a builder to create the @@ -642,11 +687,11 @@ public final TransformsResponse transforms(Function - * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java index 31ba6cd91..92567555f 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java @@ -51,7 +51,7 @@ // typedef: cat.help.Request /** - * Returns help for the Cat APIs. + * Get CAT help. Returns help for the CAT APIs. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java index d6850e2cc..af07f14e5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java @@ -61,17 +61,27 @@ // typedef: cat.indices.Request /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java index dd8b956b4..c257917f4 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java @@ -59,12 +59,12 @@ // typedef: cat.ml_data_frame_analytics.Request /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java index 965c5f017..c8972a2aa 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java @@ -58,15 +58,15 @@ // typedef: cat.ml_datafeeds.Request /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java index 9060217ce..d217feb63 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java @@ -59,15 +59,15 @@ // typedef: cat.ml_jobs.Request /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java index c6979c9e6..fe3bc8011 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java @@ -59,11 +59,12 @@ // typedef: cat.ml_trained_models.Request /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java index 57f5590ae..095b25d87 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java @@ -59,11 +59,11 @@ // typedef: cat.transforms.Request /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java index 82fac33f4..533b3b1ee 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java @@ -94,6 +94,9 @@ public class IndicesRecord implements JsonpSerializable { @Nullable private final String priStoreSize; + @Nullable + private final String datasetSize; + @Nullable private final String completionSize; @@ -497,6 +500,7 @@ private IndicesRecord(Builder builder) { this.creationDateString = builder.creationDateString; this.storeSize = builder.storeSize; this.priStoreSize = builder.priStoreSize; + this.datasetSize = builder.datasetSize; this.completionSize = builder.completionSize; this.priCompletionSize = builder.priCompletionSize; this.fielddataMemorySize = builder.fielddataMemorySize; @@ -753,6 +757,16 @@ public final String priStoreSize() { return this.priStoreSize; } + /** + * total size of dataset (including the cache for partially mounted indices) + *

+ * API name: {@code dataset.size} + */ + @Nullable + public final String datasetSize() { + return this.datasetSize; + } + /** * size of completion *

@@ -2115,6 +2129,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("pri.store.size"); generator.write(this.priStoreSize); + } + if (this.datasetSize != null) { + generator.writeKey("dataset.size"); + generator.write(this.datasetSize); + } if (this.completionSize != null) { generator.writeKey("completion.size"); @@ -2812,6 +2831,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private String priStoreSize; + @Nullable + private String datasetSize; + @Nullable private String completionSize; @@ -3319,6 +3341,16 @@ public final Builder priStoreSize(@Nullable String value) { return this; } + /** + * total size of dataset (including the cache for partially mounted indices) + *

+ * API name: {@code dataset.size} + */ + public final Builder datasetSize(@Nullable String value) { + this.datasetSize = value; + return this; + } + /** * size of completion *

@@ -4651,6 +4683,7 @@ protected static void setupIndicesRecordDeserializer(ObjectDeserializerAPI * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java index d20f0ab39..f4a533d34 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java @@ -58,9 +58,9 @@ // typedef: cluster.delete_component_template.Request /** - * Deletes component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. Deletes component templates. Component templates + * are building blocks for constructing index templates that specify index + * mappings, settings, and aliases. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java index b0f39a2b1..a6eba94af 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java @@ -71,9 +71,9 @@ public ElasticsearchClusterAsyncClient withTransportOptions(@Nullable TransportO // ----- Endpoint: cluster.delete_component_template /** - * Deletes component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. Deletes component templates. Component templates + * are building blocks for constructing index templates that specify index + * mappings, settings, and aliases. * * @see Documentation @@ -89,9 +89,9 @@ public CompletableFuture deleteComponentTemplat } /** - * Deletes component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. Deletes component templates. Component templates + * are building blocks for constructing index templates that specify index + * mappings, settings, and aliases. * * @param fn * a function that initializes a builder to create the @@ -109,7 +109,8 @@ public final CompletableFuture deleteComponentT // ----- Endpoint: cluster.exists_component_template /** - * Returns information about whether a particular component template exist + * Check component templates. Returns information about whether a particular + * component template exists. * * @see Documentation @@ -124,7 +125,8 @@ public CompletableFuture existsComponentTemplate(ExistsComponen } /** - * Returns information about whether a particular component template exist + * Check component templates. Returns information about whether a particular + * component template exists. * * @param fn * a function that initializes a builder to create the @@ -142,7 +144,7 @@ public final CompletableFuture existsComponentTemplate( // ----- Endpoint: cluster.get_component_template /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @see Documentation @@ -157,7 +159,7 @@ public CompletableFuture getComponentTemplate(GetC } /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @param fn * a function that initializes a builder to create the @@ -173,7 +175,7 @@ public final CompletableFuture getComponentTemplat } /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @see Documentation @@ -188,7 +190,7 @@ public CompletableFuture getComponentTemplate() { // ----- Endpoint: cluster.info /** - * Returns different information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @see Documentation @@ -203,7 +205,7 @@ public CompletableFuture info(ClusterInfoRequest request) { } /** - * Returns different information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @param fn * a function that initializes a builder to create the @@ -221,9 +223,9 @@ public final CompletableFuture info( // ----- Endpoint: cluster.put_component_template /** - * Creates or updates a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. Creates or updates a component + * template. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. *

* An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s @@ -256,9 +258,9 @@ public CompletableFuture putComponentTemplate(PutC } /** - * Creates or updates a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. Creates or updates a component + * template. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. *

* An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java index 5fb7be1cf..9b1e8b9e1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java @@ -69,9 +69,9 @@ public ElasticsearchClusterClient withTransportOptions(@Nullable TransportOption // ----- Endpoint: cluster.delete_component_template /** - * Deletes component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. Deletes component templates. Component templates + * are building blocks for constructing index templates that specify index + * mappings, settings, and aliases. * * @see Documentation @@ -87,9 +87,9 @@ public DeleteComponentTemplateResponse deleteComponentTemplate(DeleteComponentTe } /** - * Deletes component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. Deletes component templates. Component templates + * are building blocks for constructing index templates that specify index + * mappings, settings, and aliases. * * @param fn * a function that initializes a builder to create the @@ -108,7 +108,8 @@ public final DeleteComponentTemplateResponse deleteComponentTemplate( // ----- Endpoint: cluster.exists_component_template /** - * Returns information about whether a particular component template exist + * Check component templates. Returns information about whether a particular + * component template exists. * * @see Documentation @@ -124,7 +125,8 @@ public BooleanResponse existsComponentTemplate(ExistsComponentTemplateRequest re } /** - * Returns information about whether a particular component template exist + * Check component templates. Returns information about whether a particular + * component template exists. * * @param fn * a function that initializes a builder to create the @@ -143,7 +145,7 @@ public final BooleanResponse existsComponentTemplate( // ----- Endpoint: cluster.get_component_template /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @see Documentation @@ -159,7 +161,7 @@ public GetComponentTemplateResponse getComponentTemplate(GetComponentTemplateReq } /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @param fn * a function that initializes a builder to create the @@ -176,7 +178,7 @@ public final GetComponentTemplateResponse getComponentTemplate( } /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @see Documentation @@ -191,7 +193,7 @@ public GetComponentTemplateResponse getComponentTemplate() throws IOException, E // ----- Endpoint: cluster.info /** - * Returns different information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @see Documentation @@ -206,7 +208,7 @@ public ClusterInfoResponse info(ClusterInfoRequest request) throws IOException, } /** - * Returns different information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @param fn * a function that initializes a builder to create the @@ -224,9 +226,9 @@ public final ClusterInfoResponse info(Function * An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s @@ -260,9 +262,9 @@ public PutComponentTemplateResponse putComponentTemplate(PutComponentTemplateReq } /** - * Creates or updates a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. Creates or updates a component + * template. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. *

* An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java index 9e885e25e..a30c582f5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java @@ -61,7 +61,8 @@ // typedef: cluster.exists_component_template.Request /** - * Returns information about whether a particular component template exist + * Check component templates. Returns information about whether a particular + * component template exists. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java index a79f91f32..e4079755c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java @@ -56,7 +56,7 @@ // typedef: cluster.get_component_template.Request /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java index 1e28d7a92..82983238e 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java @@ -62,9 +62,9 @@ // typedef: cluster.put_component_template.Request /** - * Creates or updates a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. Creates or updates a component + * template. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. *

* An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s @@ -175,8 +175,15 @@ public final Time masterTimeout() { /** * Required - Name of the component template to create. Elasticsearch includes * the following built-in component templates: logs-mappings; - * 'logs-settings; metrics-mappings; metrics-settings;synthetics-mapping; synthetics-settings. Elastic Agent uses these templates to configure backing indices for its data streams. If you use Elastic Agent and want to overwrite one of these templates, set the versionfor your replacement template higher than the current version. If you don’t use Elastic Agent and want to disable all built-in component and index templates, setstack.templates.enabledtofalse` - * using the cluster update settings API. + * logs-settings; metrics-mappings; + * metrics-settings;synthetics-mapping; + * synthetics-settings. Elastic Agent uses these templates to + * configure backing indices for its data streams. If you use Elastic Agent and + * want to overwrite one of these templates, set the version for + * your replacement template higher than the current version. If you don’t use + * Elastic Agent and want to disable all built-in component and index templates, + * set stack.templates.enabled to false using the + * cluster update settings API. *

* API name: {@code name} */ @@ -349,8 +356,15 @@ public final Builder masterTimeout(Function> f /** * Required - Name of the component template to create. Elasticsearch includes * the following built-in component templates: logs-mappings; - * 'logs-settings; metrics-mappings; metrics-settings;synthetics-mapping; synthetics-settings. Elastic Agent uses these templates to configure backing indices for its data streams. If you use Elastic Agent and want to overwrite one of these templates, set the versionfor your replacement template higher than the current version. If you don’t use Elastic Agent and want to disable all built-in component and index templates, setstack.templates.enabledtofalse` - * using the cluster update settings API. + * logs-settings; metrics-mappings; + * metrics-settings;synthetics-mapping; + * synthetics-settings. Elastic Agent uses these templates to + * configure backing indices for its data streams. If you use Elastic Agent and + * want to overwrite one of these templates, set the version for + * your replacement template higher than the current version. If you don’t use + * Elastic Agent and want to disable all built-in component and index templates, + * set stack.templates.enabled to false using the + * cluster update settings API. *

* API name: {@code name} */ diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java new file mode 100644 index 000000000..fc5fa4085 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java @@ -0,0 +1,181 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.check_in.Request + +/** + * Updates the last_seen field in the connector, and sets it to current + * timestamp + * + * @see API + * specification + */ + +public class CheckInRequest extends RequestBase { + private final String connectorId; + + // --------------------------------------------------------------------------------------------- + + private CheckInRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + + } + + public static CheckInRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be checked in + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CheckInRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + private String connectorId; + + /** + * Required - The unique identifier of the connector to be checked in + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CheckInRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CheckInRequest build() { + _checkSingleUse(); + + return new CheckInRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.check_in}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.check_in", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_check_in"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, CheckInResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInResponse.java new file mode 100644 index 000000000..a3ce1a027 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInResponse.java @@ -0,0 +1,153 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.check_in.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CheckInResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private CheckInResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static CheckInResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CheckInResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CheckInResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CheckInResponse build() { + _checkSingleUse(); + + return new CheckInResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CheckInResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CheckInResponse::setupCheckInResponseDeserializer); + + protected static void setupCheckInResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Connector.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Connector.java new file mode 100644 index 000000000..e33d13fa0 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Connector.java @@ -0,0 +1,1089 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.DateTime; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.Connector + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Connector implements JsonpSerializable { + @Nullable + private final String apiKeyId; + + @Nullable + private final String apiKeySecretId; + + private final Map configuration; + + private final Map customScheduling; + + @Nullable + private final String description; + + @Nullable + private final String error; + + @Nullable + private final ConnectorFeatures features; + + private final List filtering; + + @Nullable + private final String id; + + @Nullable + private final String indexName; + + private final boolean isNative; + + @Nullable + private final String language; + + @Nullable + private final String lastAccessControlSyncError; + + @Nullable + private final DateTime lastAccessControlSyncScheduledAt; + + @Nullable + private final SyncStatus lastAccessControlSyncStatus; + + @Nullable + private final Long lastDeletedDocumentCount; + + @Nullable + private final DateTime lastIncrementalSyncScheduledAt; + + @Nullable + private final Long lastIndexedDocumentCount; + + @Nullable + private final DateTime lastSeen; + + @Nullable + private final String lastSyncError; + + @Nullable + private final DateTime lastSyncScheduledAt; + + @Nullable + private final SyncStatus lastSyncStatus; + + @Nullable + private final DateTime lastSynced; + + @Nullable + private final String name; + + @Nullable + private final IngestPipelineParams pipeline; + + private final SchedulingConfiguration scheduling; + + @Nullable + private final String serviceType; + + private final ConnectorStatus status; + + @Nullable + private final JsonData syncCursor; + + private final boolean syncNow; + + // --------------------------------------------------------------------------------------------- + + protected Connector(AbstractBuilder builder) { + + this.apiKeyId = builder.apiKeyId; + this.apiKeySecretId = builder.apiKeySecretId; + this.configuration = ApiTypeHelper.unmodifiableRequired(builder.configuration, this, "configuration"); + this.customScheduling = ApiTypeHelper.unmodifiableRequired(builder.customScheduling, this, "customScheduling"); + this.description = builder.description; + this.error = builder.error; + this.features = builder.features; + this.filtering = ApiTypeHelper.unmodifiableRequired(builder.filtering, this, "filtering"); + this.id = builder.id; + this.indexName = builder.indexName; + this.isNative = ApiTypeHelper.requireNonNull(builder.isNative, this, "isNative"); + this.language = builder.language; + this.lastAccessControlSyncError = builder.lastAccessControlSyncError; + this.lastAccessControlSyncScheduledAt = builder.lastAccessControlSyncScheduledAt; + this.lastAccessControlSyncStatus = builder.lastAccessControlSyncStatus; + this.lastDeletedDocumentCount = builder.lastDeletedDocumentCount; + this.lastIncrementalSyncScheduledAt = builder.lastIncrementalSyncScheduledAt; + this.lastIndexedDocumentCount = builder.lastIndexedDocumentCount; + this.lastSeen = builder.lastSeen; + this.lastSyncError = builder.lastSyncError; + this.lastSyncScheduledAt = builder.lastSyncScheduledAt; + this.lastSyncStatus = builder.lastSyncStatus; + this.lastSynced = builder.lastSynced; + this.name = builder.name; + this.pipeline = builder.pipeline; + this.scheduling = ApiTypeHelper.requireNonNull(builder.scheduling, this, "scheduling"); + this.serviceType = builder.serviceType; + this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); + this.syncCursor = builder.syncCursor; + this.syncNow = ApiTypeHelper.requireNonNull(builder.syncNow, this, "syncNow"); + + } + + public static Connector connectorOf(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code api_key_id} + */ + @Nullable + public final String apiKeyId() { + return this.apiKeyId; + } + + /** + * API name: {@code api_key_secret_id} + */ + @Nullable + public final String apiKeySecretId() { + return this.apiKeySecretId; + } + + /** + * Required - API name: {@code configuration} + */ + public final Map configuration() { + return this.configuration; + } + + /** + * Required - API name: {@code custom_scheduling} + */ + public final Map customScheduling() { + return this.customScheduling; + } + + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * API name: {@code error} + */ + @Nullable + public final String error() { + return this.error; + } + + /** + * API name: {@code features} + */ + @Nullable + public final ConnectorFeatures features() { + return this.features; + } + + /** + * Required - API name: {@code filtering} + */ + public final List filtering() { + return this.filtering; + } + + /** + * API name: {@code id} + */ + @Nullable + public final String id() { + return this.id; + } + + /** + * API name: {@code index_name} + */ + @Nullable + public final String indexName() { + return this.indexName; + } + + /** + * Required - API name: {@code is_native} + */ + public final boolean isNative() { + return this.isNative; + } + + /** + * API name: {@code language} + */ + @Nullable + public final String language() { + return this.language; + } + + /** + * API name: {@code last_access_control_sync_error} + */ + @Nullable + public final String lastAccessControlSyncError() { + return this.lastAccessControlSyncError; + } + + /** + * API name: {@code last_access_control_sync_scheduled_at} + */ + @Nullable + public final DateTime lastAccessControlSyncScheduledAt() { + return this.lastAccessControlSyncScheduledAt; + } + + /** + * API name: {@code last_access_control_sync_status} + */ + @Nullable + public final SyncStatus lastAccessControlSyncStatus() { + return this.lastAccessControlSyncStatus; + } + + /** + * API name: {@code last_deleted_document_count} + */ + @Nullable + public final Long lastDeletedDocumentCount() { + return this.lastDeletedDocumentCount; + } + + /** + * API name: {@code last_incremental_sync_scheduled_at} + */ + @Nullable + public final DateTime lastIncrementalSyncScheduledAt() { + return this.lastIncrementalSyncScheduledAt; + } + + /** + * API name: {@code last_indexed_document_count} + */ + @Nullable + public final Long lastIndexedDocumentCount() { + return this.lastIndexedDocumentCount; + } + + /** + * API name: {@code last_seen} + */ + @Nullable + public final DateTime lastSeen() { + return this.lastSeen; + } + + /** + * API name: {@code last_sync_error} + */ + @Nullable + public final String lastSyncError() { + return this.lastSyncError; + } + + /** + * API name: {@code last_sync_scheduled_at} + */ + @Nullable + public final DateTime lastSyncScheduledAt() { + return this.lastSyncScheduledAt; + } + + /** + * API name: {@code last_sync_status} + */ + @Nullable + public final SyncStatus lastSyncStatus() { + return this.lastSyncStatus; + } + + /** + * API name: {@code last_synced} + */ + @Nullable + public final DateTime lastSynced() { + return this.lastSynced; + } + + /** + * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * API name: {@code pipeline} + */ + @Nullable + public final IngestPipelineParams pipeline() { + return this.pipeline; + } + + /** + * Required - API name: {@code scheduling} + */ + public final SchedulingConfiguration scheduling() { + return this.scheduling; + } + + /** + * API name: {@code service_type} + */ + @Nullable + public final String serviceType() { + return this.serviceType; + } + + /** + * Required - API name: {@code status} + */ + public final ConnectorStatus status() { + return this.status; + } + + /** + * API name: {@code sync_cursor} + */ + @Nullable + public final JsonData syncCursor() { + return this.syncCursor; + } + + /** + * Required - API name: {@code sync_now} + */ + public final boolean syncNow() { + return this.syncNow; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.apiKeyId != null) { + generator.writeKey("api_key_id"); + generator.write(this.apiKeyId); + + } + if (this.apiKeySecretId != null) { + generator.writeKey("api_key_secret_id"); + generator.write(this.apiKeySecretId); + + } + if (ApiTypeHelper.isDefined(this.configuration)) { + generator.writeKey("configuration"); + generator.writeStartObject(); + for (Map.Entry item0 : this.configuration.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.customScheduling)) { + generator.writeKey("custom_scheduling"); + generator.writeStartObject(); + for (Map.Entry item0 : this.customScheduling.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + if (this.error != null) { + generator.writeKey("error"); + generator.write(this.error); + + } + if (this.features != null) { + generator.writeKey("features"); + this.features.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.filtering)) { + generator.writeKey("filtering"); + generator.writeStartArray(); + for (FilteringConfig item0 : this.filtering) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.id != null) { + generator.writeKey("id"); + generator.write(this.id); + + } + if (this.indexName != null) { + generator.writeKey("index_name"); + generator.write(this.indexName); + + } + generator.writeKey("is_native"); + generator.write(this.isNative); + + if (this.language != null) { + generator.writeKey("language"); + generator.write(this.language); + + } + if (this.lastAccessControlSyncError != null) { + generator.writeKey("last_access_control_sync_error"); + generator.write(this.lastAccessControlSyncError); + + } + if (this.lastAccessControlSyncScheduledAt != null) { + generator.writeKey("last_access_control_sync_scheduled_at"); + this.lastAccessControlSyncScheduledAt.serialize(generator, mapper); + } + if (this.lastAccessControlSyncStatus != null) { + generator.writeKey("last_access_control_sync_status"); + this.lastAccessControlSyncStatus.serialize(generator, mapper); + } + if (this.lastDeletedDocumentCount != null) { + generator.writeKey("last_deleted_document_count"); + generator.write(this.lastDeletedDocumentCount); + + } + if (this.lastIncrementalSyncScheduledAt != null) { + generator.writeKey("last_incremental_sync_scheduled_at"); + this.lastIncrementalSyncScheduledAt.serialize(generator, mapper); + } + if (this.lastIndexedDocumentCount != null) { + generator.writeKey("last_indexed_document_count"); + generator.write(this.lastIndexedDocumentCount); + + } + if (this.lastSeen != null) { + generator.writeKey("last_seen"); + this.lastSeen.serialize(generator, mapper); + } + if (this.lastSyncError != null) { + generator.writeKey("last_sync_error"); + generator.write(this.lastSyncError); + + } + if (this.lastSyncScheduledAt != null) { + generator.writeKey("last_sync_scheduled_at"); + this.lastSyncScheduledAt.serialize(generator, mapper); + } + if (this.lastSyncStatus != null) { + generator.writeKey("last_sync_status"); + this.lastSyncStatus.serialize(generator, mapper); + } + if (this.lastSynced != null) { + generator.writeKey("last_synced"); + this.lastSynced.serialize(generator, mapper); + } + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + + } + if (this.pipeline != null) { + generator.writeKey("pipeline"); + this.pipeline.serialize(generator, mapper); + + } + generator.writeKey("scheduling"); + this.scheduling.serialize(generator, mapper); + + if (this.serviceType != null) { + generator.writeKey("service_type"); + generator.write(this.serviceType); + + } + generator.writeKey("status"); + this.status.serialize(generator, mapper); + if (this.syncCursor != null) { + generator.writeKey("sync_cursor"); + this.syncCursor.serialize(generator, mapper); + + } + generator.writeKey("sync_now"); + generator.write(this.syncNow); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Connector}. + */ + + public static class Builder extends Connector.AbstractBuilder implements ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link Connector}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Connector build() { + _checkSingleUse(); + + return new Connector(this); + } + } + + public abstract static class AbstractBuilder> + extends + WithJsonObjectBuilderBase { + @Nullable + private String apiKeyId; + + @Nullable + private String apiKeySecretId; + + private Map configuration; + + private Map customScheduling; + + @Nullable + private String description; + + @Nullable + private String error; + + @Nullable + private ConnectorFeatures features; + + private List filtering; + + @Nullable + private String id; + + @Nullable + private String indexName; + + private Boolean isNative; + + @Nullable + private String language; + + @Nullable + private String lastAccessControlSyncError; + + @Nullable + private DateTime lastAccessControlSyncScheduledAt; + + @Nullable + private SyncStatus lastAccessControlSyncStatus; + + @Nullable + private Long lastDeletedDocumentCount; + + @Nullable + private DateTime lastIncrementalSyncScheduledAt; + + @Nullable + private Long lastIndexedDocumentCount; + + @Nullable + private DateTime lastSeen; + + @Nullable + private String lastSyncError; + + @Nullable + private DateTime lastSyncScheduledAt; + + @Nullable + private SyncStatus lastSyncStatus; + + @Nullable + private DateTime lastSynced; + + @Nullable + private String name; + + @Nullable + private IngestPipelineParams pipeline; + + private SchedulingConfiguration scheduling; + + @Nullable + private String serviceType; + + private ConnectorStatus status; + + @Nullable + private JsonData syncCursor; + + private Boolean syncNow; + + /** + * API name: {@code api_key_id} + */ + public final BuilderT apiKeyId(@Nullable String value) { + this.apiKeyId = value; + return self(); + } + + /** + * API name: {@code api_key_secret_id} + */ + public final BuilderT apiKeySecretId(@Nullable String value) { + this.apiKeySecretId = value; + return self(); + } + + /** + * Required - API name: {@code configuration} + *

+ * Adds all entries of map to configuration. + */ + public final BuilderT configuration(Map map) { + this.configuration = _mapPutAll(this.configuration, map); + return self(); + } + + /** + * Required - API name: {@code configuration} + *

+ * Adds an entry to configuration. + */ + public final BuilderT configuration(String key, ConnectorConfigProperties value) { + this.configuration = _mapPut(this.configuration, key, value); + return self(); + } + + /** + * Required - API name: {@code configuration} + *

+ * Adds an entry to configuration using a builder lambda. + */ + public final BuilderT configuration(String key, + Function> fn) { + return configuration(key, fn.apply(new ConnectorConfigProperties.Builder()).build()); + } + + /** + * Required - API name: {@code custom_scheduling} + *

+ * Adds all entries of map to customScheduling. + */ + public final BuilderT customScheduling(Map map) { + this.customScheduling = _mapPutAll(this.customScheduling, map); + return self(); + } + + /** + * Required - API name: {@code custom_scheduling} + *

+ * Adds an entry to customScheduling. + */ + public final BuilderT customScheduling(String key, CustomScheduling value) { + this.customScheduling = _mapPut(this.customScheduling, key, value); + return self(); + } + + /** + * Required - API name: {@code custom_scheduling} + *

+ * Adds an entry to customScheduling using a builder lambda. + */ + public final BuilderT customScheduling(String key, + Function> fn) { + return customScheduling(key, fn.apply(new CustomScheduling.Builder()).build()); + } + + /** + * API name: {@code description} + */ + public final BuilderT description(@Nullable String value) { + this.description = value; + return self(); + } + + /** + * API name: {@code error} + */ + public final BuilderT error(@Nullable String value) { + this.error = value; + return self(); + } + + /** + * API name: {@code features} + */ + public final BuilderT features(@Nullable ConnectorFeatures value) { + this.features = value; + return self(); + } + + /** + * API name: {@code features} + */ + public final BuilderT features(Function> fn) { + return this.features(fn.apply(new ConnectorFeatures.Builder()).build()); + } + + /** + * Required - API name: {@code filtering} + *

+ * Adds all elements of list to filtering. + */ + public final BuilderT filtering(List list) { + this.filtering = _listAddAll(this.filtering, list); + return self(); + } + + /** + * Required - API name: {@code filtering} + *

+ * Adds one or more values to filtering. + */ + public final BuilderT filtering(FilteringConfig value, FilteringConfig... values) { + this.filtering = _listAdd(this.filtering, value, values); + return self(); + } + + /** + * Required - API name: {@code filtering} + *

+ * Adds a value to filtering using a builder lambda. + */ + public final BuilderT filtering(Function> fn) { + return filtering(fn.apply(new FilteringConfig.Builder()).build()); + } + + /** + * API name: {@code id} + */ + public final BuilderT id(@Nullable String value) { + this.id = value; + return self(); + } + + /** + * API name: {@code index_name} + */ + public final BuilderT indexName(@Nullable String value) { + this.indexName = value; + return self(); + } + + /** + * Required - API name: {@code is_native} + */ + public final BuilderT isNative(boolean value) { + this.isNative = value; + return self(); + } + + /** + * API name: {@code language} + */ + public final BuilderT language(@Nullable String value) { + this.language = value; + return self(); + } + + /** + * API name: {@code last_access_control_sync_error} + */ + public final BuilderT lastAccessControlSyncError(@Nullable String value) { + this.lastAccessControlSyncError = value; + return self(); + } + + /** + * API name: {@code last_access_control_sync_scheduled_at} + */ + public final BuilderT lastAccessControlSyncScheduledAt(@Nullable DateTime value) { + this.lastAccessControlSyncScheduledAt = value; + return self(); + } + + /** + * API name: {@code last_access_control_sync_status} + */ + public final BuilderT lastAccessControlSyncStatus(@Nullable SyncStatus value) { + this.lastAccessControlSyncStatus = value; + return self(); + } + + /** + * API name: {@code last_deleted_document_count} + */ + public final BuilderT lastDeletedDocumentCount(@Nullable Long value) { + this.lastDeletedDocumentCount = value; + return self(); + } + + /** + * API name: {@code last_incremental_sync_scheduled_at} + */ + public final BuilderT lastIncrementalSyncScheduledAt(@Nullable DateTime value) { + this.lastIncrementalSyncScheduledAt = value; + return self(); + } + + /** + * API name: {@code last_indexed_document_count} + */ + public final BuilderT lastIndexedDocumentCount(@Nullable Long value) { + this.lastIndexedDocumentCount = value; + return self(); + } + + /** + * API name: {@code last_seen} + */ + public final BuilderT lastSeen(@Nullable DateTime value) { + this.lastSeen = value; + return self(); + } + + /** + * API name: {@code last_sync_error} + */ + public final BuilderT lastSyncError(@Nullable String value) { + this.lastSyncError = value; + return self(); + } + + /** + * API name: {@code last_sync_scheduled_at} + */ + public final BuilderT lastSyncScheduledAt(@Nullable DateTime value) { + this.lastSyncScheduledAt = value; + return self(); + } + + /** + * API name: {@code last_sync_status} + */ + public final BuilderT lastSyncStatus(@Nullable SyncStatus value) { + this.lastSyncStatus = value; + return self(); + } + + /** + * API name: {@code last_synced} + */ + public final BuilderT lastSynced(@Nullable DateTime value) { + this.lastSynced = value; + return self(); + } + + /** + * API name: {@code name} + */ + public final BuilderT name(@Nullable String value) { + this.name = value; + return self(); + } + + /** + * API name: {@code pipeline} + */ + public final BuilderT pipeline(@Nullable IngestPipelineParams value) { + this.pipeline = value; + return self(); + } + + /** + * API name: {@code pipeline} + */ + public final BuilderT pipeline(Function> fn) { + return this.pipeline(fn.apply(new IngestPipelineParams.Builder()).build()); + } + + /** + * Required - API name: {@code scheduling} + */ + public final BuilderT scheduling(SchedulingConfiguration value) { + this.scheduling = value; + return self(); + } + + /** + * Required - API name: {@code scheduling} + */ + public final BuilderT scheduling( + Function> fn) { + return this.scheduling(fn.apply(new SchedulingConfiguration.Builder()).build()); + } + + /** + * API name: {@code service_type} + */ + public final BuilderT serviceType(@Nullable String value) { + this.serviceType = value; + return self(); + } + + /** + * Required - API name: {@code status} + */ + public final BuilderT status(ConnectorStatus value) { + this.status = value; + return self(); + } + + /** + * API name: {@code sync_cursor} + */ + public final BuilderT syncCursor(@Nullable JsonData value) { + this.syncCursor = value; + return self(); + } + + /** + * Required - API name: {@code sync_now} + */ + public final BuilderT syncNow(boolean value) { + this.syncNow = value; + return self(); + } + + protected abstract BuilderT self(); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Connector} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Connector::setupConnectorDeserializer); + + protected static > void setupConnectorDeserializer( + ObjectDeserializer op) { + + op.add(AbstractBuilder::apiKeyId, JsonpDeserializer.stringDeserializer(), "api_key_id"); + op.add(AbstractBuilder::apiKeySecretId, JsonpDeserializer.stringDeserializer(), "api_key_secret_id"); + op.add(AbstractBuilder::configuration, + JsonpDeserializer.stringMapDeserializer(ConnectorConfigProperties._DESERIALIZER), "configuration"); + op.add(AbstractBuilder::customScheduling, + JsonpDeserializer.stringMapDeserializer(CustomScheduling._DESERIALIZER), "custom_scheduling"); + op.add(AbstractBuilder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(AbstractBuilder::error, JsonpDeserializer.stringDeserializer(), "error"); + op.add(AbstractBuilder::features, ConnectorFeatures._DESERIALIZER, "features"); + op.add(AbstractBuilder::filtering, JsonpDeserializer.arrayDeserializer(FilteringConfig._DESERIALIZER), + "filtering"); + op.add(AbstractBuilder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(AbstractBuilder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); + op.add(AbstractBuilder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); + op.add(AbstractBuilder::language, JsonpDeserializer.stringDeserializer(), "language"); + op.add(AbstractBuilder::lastAccessControlSyncError, JsonpDeserializer.stringDeserializer(), + "last_access_control_sync_error"); + op.add(AbstractBuilder::lastAccessControlSyncScheduledAt, DateTime._DESERIALIZER, + "last_access_control_sync_scheduled_at"); + op.add(AbstractBuilder::lastAccessControlSyncStatus, SyncStatus._DESERIALIZER, + "last_access_control_sync_status"); + op.add(AbstractBuilder::lastDeletedDocumentCount, JsonpDeserializer.longDeserializer(), + "last_deleted_document_count"); + op.add(AbstractBuilder::lastIncrementalSyncScheduledAt, DateTime._DESERIALIZER, + "last_incremental_sync_scheduled_at"); + op.add(AbstractBuilder::lastIndexedDocumentCount, JsonpDeserializer.longDeserializer(), + "last_indexed_document_count"); + op.add(AbstractBuilder::lastSeen, DateTime._DESERIALIZER, "last_seen"); + op.add(AbstractBuilder::lastSyncError, JsonpDeserializer.stringDeserializer(), "last_sync_error"); + op.add(AbstractBuilder::lastSyncScheduledAt, DateTime._DESERIALIZER, "last_sync_scheduled_at"); + op.add(AbstractBuilder::lastSyncStatus, SyncStatus._DESERIALIZER, "last_sync_status"); + op.add(AbstractBuilder::lastSynced, DateTime._DESERIALIZER, "last_synced"); + op.add(AbstractBuilder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(AbstractBuilder::pipeline, IngestPipelineParams._DESERIALIZER, "pipeline"); + op.add(AbstractBuilder::scheduling, SchedulingConfiguration._DESERIALIZER, "scheduling"); + op.add(AbstractBuilder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); + op.add(AbstractBuilder::status, ConnectorStatus._DESERIALIZER, "status"); + op.add(AbstractBuilder::syncCursor, JsonData._DESERIALIZER, "sync_cursor"); + op.add(AbstractBuilder::syncNow, JsonpDeserializer.booleanDeserializer(), "sync_now"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorConfigProperties.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorConfigProperties.java new file mode 100644 index 000000000..5ec7b6386 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorConfigProperties.java @@ -0,0 +1,666 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.FieldValue; +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.ConnectorConfigProperties + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ConnectorConfigProperties implements JsonpSerializable { + @Nullable + private final String category; + + private final FieldValue defaultValue; + + private final List dependsOn; + + private final DisplayType display; + + private final String label; + + private final List options; + + @Nullable + private final Integer order; + + @Nullable + private final String placeholder; + + private final boolean required; + + private final boolean sensitive; + + @Nullable + private final String tooltip; + + @Nullable + private final ConnectorFieldType type; + + private final List uiRestrictions; + + private final List validations; + + private final JsonData value; + + // --------------------------------------------------------------------------------------------- + + private ConnectorConfigProperties(Builder builder) { + + this.category = builder.category; + this.defaultValue = ApiTypeHelper.requireNonNull(builder.defaultValue, this, "defaultValue"); + this.dependsOn = ApiTypeHelper.unmodifiableRequired(builder.dependsOn, this, "dependsOn"); + this.display = ApiTypeHelper.requireNonNull(builder.display, this, "display"); + this.label = ApiTypeHelper.requireNonNull(builder.label, this, "label"); + this.options = ApiTypeHelper.unmodifiableRequired(builder.options, this, "options"); + this.order = builder.order; + this.placeholder = builder.placeholder; + this.required = ApiTypeHelper.requireNonNull(builder.required, this, "required"); + this.sensitive = ApiTypeHelper.requireNonNull(builder.sensitive, this, "sensitive"); + this.tooltip = builder.tooltip; + this.type = builder.type; + this.uiRestrictions = ApiTypeHelper.unmodifiable(builder.uiRestrictions); + this.validations = ApiTypeHelper.unmodifiable(builder.validations); + this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); + + } + + public static ConnectorConfigProperties of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code category} + */ + @Nullable + public final String category() { + return this.category; + } + + /** + * Required - API name: {@code default_value} + */ + public final FieldValue defaultValue() { + return this.defaultValue; + } + + /** + * Required - API name: {@code depends_on} + */ + public final List dependsOn() { + return this.dependsOn; + } + + /** + * Required - API name: {@code display} + */ + public final DisplayType display() { + return this.display; + } + + /** + * Required - API name: {@code label} + */ + public final String label() { + return this.label; + } + + /** + * Required - API name: {@code options} + */ + public final List options() { + return this.options; + } + + /** + * API name: {@code order} + */ + @Nullable + public final Integer order() { + return this.order; + } + + /** + * API name: {@code placeholder} + */ + @Nullable + public final String placeholder() { + return this.placeholder; + } + + /** + * Required - API name: {@code required} + */ + public final boolean required() { + return this.required; + } + + /** + * Required - API name: {@code sensitive} + */ + public final boolean sensitive() { + return this.sensitive; + } + + /** + * API name: {@code tooltip} + */ + @Nullable + public final String tooltip() { + return this.tooltip; + } + + /** + * API name: {@code type} + */ + @Nullable + public final ConnectorFieldType type() { + return this.type; + } + + /** + * API name: {@code ui_restrictions} + */ + public final List uiRestrictions() { + return this.uiRestrictions; + } + + /** + * API name: {@code validations} + */ + public final List validations() { + return this.validations; + } + + /** + * Required - API name: {@code value} + */ + public final JsonData value() { + return this.value; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.category != null) { + generator.writeKey("category"); + generator.write(this.category); + + } + generator.writeKey("default_value"); + this.defaultValue.serialize(generator, mapper); + + if (ApiTypeHelper.isDefined(this.dependsOn)) { + generator.writeKey("depends_on"); + generator.writeStartArray(); + for (Dependency item0 : this.dependsOn) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("display"); + this.display.serialize(generator, mapper); + generator.writeKey("label"); + generator.write(this.label); + + if (ApiTypeHelper.isDefined(this.options)) { + generator.writeKey("options"); + generator.writeStartArray(); + for (SelectOption item0 : this.options) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.order != null) { + generator.writeKey("order"); + generator.write(this.order); + + } + if (this.placeholder != null) { + generator.writeKey("placeholder"); + generator.write(this.placeholder); + + } + generator.writeKey("required"); + generator.write(this.required); + + generator.writeKey("sensitive"); + generator.write(this.sensitive); + + if (this.tooltip != null) { + generator.writeKey("tooltip"); + generator.write(this.tooltip); + + } + if (this.type != null) { + generator.writeKey("type"); + this.type.serialize(generator, mapper); + } + if (ApiTypeHelper.isDefined(this.uiRestrictions)) { + generator.writeKey("ui_restrictions"); + generator.writeStartArray(); + for (String item0 : this.uiRestrictions) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.validations)) { + generator.writeKey("validations"); + generator.writeStartArray(); + for (Validation item0 : this.validations) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("value"); + this.value.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ConnectorConfigProperties}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private String category; + + private FieldValue defaultValue; + + private List dependsOn; + + private DisplayType display; + + private String label; + + private List options; + + @Nullable + private Integer order; + + @Nullable + private String placeholder; + + private Boolean required; + + private Boolean sensitive; + + @Nullable + private String tooltip; + + @Nullable + private ConnectorFieldType type; + + @Nullable + private List uiRestrictions; + + @Nullable + private List validations; + + private JsonData value; + + /** + * API name: {@code category} + */ + public final Builder category(@Nullable String value) { + this.category = value; + return this; + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(FieldValue value) { + this.defaultValue = value; + return this; + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(Function> fn) { + return this.defaultValue(fn.apply(new FieldValue.Builder()).build()); + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(String value) { + this.defaultValue = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(long value) { + this.defaultValue = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(double value) { + this.defaultValue = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(boolean value) { + this.defaultValue = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code depends_on} + *

+ * Adds all elements of list to dependsOn. + */ + public final Builder dependsOn(List list) { + this.dependsOn = _listAddAll(this.dependsOn, list); + return this; + } + + /** + * Required - API name: {@code depends_on} + *

+ * Adds one or more values to dependsOn. + */ + public final Builder dependsOn(Dependency value, Dependency... values) { + this.dependsOn = _listAdd(this.dependsOn, value, values); + return this; + } + + /** + * Required - API name: {@code depends_on} + *

+ * Adds a value to dependsOn using a builder lambda. + */ + public final Builder dependsOn(Function> fn) { + return dependsOn(fn.apply(new Dependency.Builder()).build()); + } + + /** + * Required - API name: {@code display} + */ + public final Builder display(DisplayType value) { + this.display = value; + return this; + } + + /** + * Required - API name: {@code label} + */ + public final Builder label(String value) { + this.label = value; + return this; + } + + /** + * Required - API name: {@code options} + *

+ * Adds all elements of list to options. + */ + public final Builder options(List list) { + this.options = _listAddAll(this.options, list); + return this; + } + + /** + * Required - API name: {@code options} + *

+ * Adds one or more values to options. + */ + public final Builder options(SelectOption value, SelectOption... values) { + this.options = _listAdd(this.options, value, values); + return this; + } + + /** + * Required - API name: {@code options} + *

+ * Adds a value to options using a builder lambda. + */ + public final Builder options(Function> fn) { + return options(fn.apply(new SelectOption.Builder()).build()); + } + + /** + * API name: {@code order} + */ + public final Builder order(@Nullable Integer value) { + this.order = value; + return this; + } + + /** + * API name: {@code placeholder} + */ + public final Builder placeholder(@Nullable String value) { + this.placeholder = value; + return this; + } + + /** + * Required - API name: {@code required} + */ + public final Builder required(boolean value) { + this.required = value; + return this; + } + + /** + * Required - API name: {@code sensitive} + */ + public final Builder sensitive(boolean value) { + this.sensitive = value; + return this; + } + + /** + * API name: {@code tooltip} + */ + public final Builder tooltip(@Nullable String value) { + this.tooltip = value; + return this; + } + + /** + * API name: {@code type} + */ + public final Builder type(@Nullable ConnectorFieldType value) { + this.type = value; + return this; + } + + /** + * API name: {@code ui_restrictions} + *

+ * Adds all elements of list to uiRestrictions. + */ + public final Builder uiRestrictions(List list) { + this.uiRestrictions = _listAddAll(this.uiRestrictions, list); + return this; + } + + /** + * API name: {@code ui_restrictions} + *

+ * Adds one or more values to uiRestrictions. + */ + public final Builder uiRestrictions(String value, String... values) { + this.uiRestrictions = _listAdd(this.uiRestrictions, value, values); + return this; + } + + /** + * API name: {@code validations} + *

+ * Adds all elements of list to validations. + */ + public final Builder validations(List list) { + this.validations = _listAddAll(this.validations, list); + return this; + } + + /** + * API name: {@code validations} + *

+ * Adds one or more values to validations. + */ + public final Builder validations(Validation value, Validation... values) { + this.validations = _listAdd(this.validations, value, values); + return this; + } + + /** + * API name: {@code validations} + *

+ * Adds a value to validations using a builder lambda. + */ + public final Builder validations(Function> fn) { + return validations(fn.apply(new Validation.Builder()).build()); + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(JsonData value) { + this.value = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ConnectorConfigProperties}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ConnectorConfigProperties build() { + _checkSingleUse(); + + return new ConnectorConfigProperties(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ConnectorConfigProperties} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ConnectorConfigProperties::setupConnectorConfigPropertiesDeserializer); + + protected static void setupConnectorConfigPropertiesDeserializer( + ObjectDeserializer op) { + + op.add(Builder::category, JsonpDeserializer.stringDeserializer(), "category"); + op.add(Builder::defaultValue, FieldValue._DESERIALIZER, "default_value"); + op.add(Builder::dependsOn, JsonpDeserializer.arrayDeserializer(Dependency._DESERIALIZER), "depends_on"); + op.add(Builder::display, DisplayType._DESERIALIZER, "display"); + op.add(Builder::label, JsonpDeserializer.stringDeserializer(), "label"); + op.add(Builder::options, JsonpDeserializer.arrayDeserializer(SelectOption._DESERIALIZER), "options"); + op.add(Builder::order, JsonpDeserializer.integerDeserializer(), "order"); + op.add(Builder::placeholder, JsonpDeserializer.stringDeserializer(), "placeholder"); + op.add(Builder::required, JsonpDeserializer.booleanDeserializer(), "required"); + op.add(Builder::sensitive, JsonpDeserializer.booleanDeserializer(), "sensitive"); + op.add(Builder::tooltip, JsonpDeserializer.stringDeserializer(), "tooltip"); + op.add(Builder::type, ConnectorFieldType._DESERIALIZER, "type"); + op.add(Builder::uiRestrictions, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "ui_restrictions"); + op.add(Builder::validations, JsonpDeserializer.arrayDeserializer(Validation._DESERIALIZER), "validations"); + op.add(Builder::value, JsonData._DESERIALIZER, "value"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFeatures.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFeatures.java new file mode 100644 index 000000000..04e6f8ca4 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFeatures.java @@ -0,0 +1,274 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.ConnectorFeatures + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ConnectorFeatures implements JsonpSerializable { + @Nullable + private final FeatureEnabled documentLevelSecurity; + + @Nullable + private final FeatureEnabled incrementalSync; + + @Nullable + private final FeatureEnabled nativeConnectorApiKeys; + + @Nullable + private final SyncRulesFeature syncRules; + + // --------------------------------------------------------------------------------------------- + + private ConnectorFeatures(Builder builder) { + + this.documentLevelSecurity = builder.documentLevelSecurity; + this.incrementalSync = builder.incrementalSync; + this.nativeConnectorApiKeys = builder.nativeConnectorApiKeys; + this.syncRules = builder.syncRules; + + } + + public static ConnectorFeatures of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code document_level_security} + */ + @Nullable + public final FeatureEnabled documentLevelSecurity() { + return this.documentLevelSecurity; + } + + /** + * API name: {@code incremental_sync} + */ + @Nullable + public final FeatureEnabled incrementalSync() { + return this.incrementalSync; + } + + /** + * API name: {@code native_connector_api_keys} + */ + @Nullable + public final FeatureEnabled nativeConnectorApiKeys() { + return this.nativeConnectorApiKeys; + } + + /** + * API name: {@code sync_rules} + */ + @Nullable + public final SyncRulesFeature syncRules() { + return this.syncRules; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.documentLevelSecurity != null) { + generator.writeKey("document_level_security"); + this.documentLevelSecurity.serialize(generator, mapper); + + } + if (this.incrementalSync != null) { + generator.writeKey("incremental_sync"); + this.incrementalSync.serialize(generator, mapper); + + } + if (this.nativeConnectorApiKeys != null) { + generator.writeKey("native_connector_api_keys"); + this.nativeConnectorApiKeys.serialize(generator, mapper); + + } + if (this.syncRules != null) { + generator.writeKey("sync_rules"); + this.syncRules.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ConnectorFeatures}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private FeatureEnabled documentLevelSecurity; + + @Nullable + private FeatureEnabled incrementalSync; + + @Nullable + private FeatureEnabled nativeConnectorApiKeys; + + @Nullable + private SyncRulesFeature syncRules; + + /** + * API name: {@code document_level_security} + */ + public final Builder documentLevelSecurity(@Nullable FeatureEnabled value) { + this.documentLevelSecurity = value; + return this; + } + + /** + * API name: {@code document_level_security} + */ + public final Builder documentLevelSecurity(Function> fn) { + return this.documentLevelSecurity(fn.apply(new FeatureEnabled.Builder()).build()); + } + + /** + * API name: {@code incremental_sync} + */ + public final Builder incrementalSync(@Nullable FeatureEnabled value) { + this.incrementalSync = value; + return this; + } + + /** + * API name: {@code incremental_sync} + */ + public final Builder incrementalSync(Function> fn) { + return this.incrementalSync(fn.apply(new FeatureEnabled.Builder()).build()); + } + + /** + * API name: {@code native_connector_api_keys} + */ + public final Builder nativeConnectorApiKeys(@Nullable FeatureEnabled value) { + this.nativeConnectorApiKeys = value; + return this; + } + + /** + * API name: {@code native_connector_api_keys} + */ + public final Builder nativeConnectorApiKeys( + Function> fn) { + return this.nativeConnectorApiKeys(fn.apply(new FeatureEnabled.Builder()).build()); + } + + /** + * API name: {@code sync_rules} + */ + public final Builder syncRules(@Nullable SyncRulesFeature value) { + this.syncRules = value; + return this; + } + + /** + * API name: {@code sync_rules} + */ + public final Builder syncRules(Function> fn) { + return this.syncRules(fn.apply(new SyncRulesFeature.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ConnectorFeatures}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ConnectorFeatures build() { + _checkSingleUse(); + + return new ConnectorFeatures(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ConnectorFeatures} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ConnectorFeatures::setupConnectorFeaturesDeserializer); + + protected static void setupConnectorFeaturesDeserializer(ObjectDeserializer op) { + + op.add(Builder::documentLevelSecurity, FeatureEnabled._DESERIALIZER, "document_level_security"); + op.add(Builder::incrementalSync, FeatureEnabled._DESERIALIZER, "incremental_sync"); + op.add(Builder::nativeConnectorApiKeys, FeatureEnabled._DESERIALIZER, "native_connector_api_keys"); + op.add(Builder::syncRules, SyncRulesFeature._DESERIALIZER, "sync_rules"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RankBase.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFieldType.java similarity index 70% rename from java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RankBase.java rename to java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFieldType.java index 53880c72a..cbe0abe34 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RankBase.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFieldType.java @@ -17,16 +17,11 @@ * under the License. */ -package co.elastic.clients.elasticsearch._types; +package co.elastic.clients.elasticsearch.connector; +import co.elastic.clients.json.JsonEnum; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; //---------------------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. @@ -43,23 +38,34 @@ // //---------------------------------------------------------------- -// typedef: _types.RankBase - /** * - * @see API + * @see API * specification */ +@JsonpDeserializable +public enum ConnectorFieldType implements JsonEnum { + Str("str"), -public abstract class RankBase { - public RankBase() { - } + Int("int"), + + List("list"), + + Bool("bool"), - public abstract static class AbstractBuilder> - extends - WithJsonObjectBuilderBase { - protected abstract BuilderT self(); + ; + + private final String jsonValue; + + ConnectorFieldType(String jsonValue) { + this.jsonValue = jsonValue; + } + public String jsonValue() { + return this.jsonValue; } + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + ConnectorFieldType.values()); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RrfRank.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorScheduling.java similarity index 55% rename from java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RrfRank.java rename to java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorScheduling.java index bd0153929..005338d47 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RrfRank.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorScheduling.java @@ -17,7 +17,7 @@ * under the License. */ -package co.elastic.clients.elasticsearch._types; +package co.elastic.clients.elasticsearch.connector; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; @@ -26,9 +26,12 @@ import co.elastic.clients.json.JsonpUtils; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; -import java.lang.Long; +import java.lang.Boolean; +import java.lang.String; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -48,61 +51,47 @@ // //---------------------------------------------------------------- -// typedef: _types.RrfRank +// typedef: connector._types.ConnectorScheduling /** * - * @see API + * @see API * specification */ @JsonpDeserializable -public class RrfRank extends RankBase implements RankVariant, JsonpSerializable { - @Nullable - private final Long rankConstant; +public class ConnectorScheduling implements JsonpSerializable { + private final boolean enabled; - @Nullable - private final Long windowSize; + private final String interval; // --------------------------------------------------------------------------------------------- - private RrfRank(Builder builder) { + private ConnectorScheduling(Builder builder) { - this.rankConstant = builder.rankConstant; - this.windowSize = builder.windowSize; + this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled"); + this.interval = ApiTypeHelper.requireNonNull(builder.interval, this, "interval"); } - public static RrfRank of(Function> fn) { + public static ConnectorScheduling of(Function> fn) { return fn.apply(new Builder()).build(); } /** - * Rank variant kind. + * Required - API name: {@code enabled} */ - @Override - public Rank.Kind _rankKind() { - return Rank.Kind.Rrf; - } - - /** - * How much influence documents in individual result sets per query have over - * the final ranked result set - *

- * API name: {@code rank_constant} - */ - @Nullable - public final Long rankConstant() { - return this.rankConstant; + public final boolean enabled() { + return this.enabled; } /** - * Size of the individual result sets per query + * Required - The interval is expressed using the crontab syntax *

- * API name: {@code window_size} + * API name: {@code interval} */ - @Nullable - public final Long windowSize() { - return this.windowSize; + public final String interval() { + return this.interval; } /** @@ -116,16 +105,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - if (this.rankConstant != null) { - generator.writeKey("rank_constant"); - generator.write(this.rankConstant); + generator.writeKey("enabled"); + generator.write(this.enabled); - } - if (this.windowSize != null) { - generator.writeKey("window_size"); - generator.write(this.windowSize); - - } + generator.writeKey("interval"); + generator.write(this.interval); } @@ -137,34 +121,31 @@ public String toString() { // --------------------------------------------------------------------------------------------- /** - * Builder for {@link RrfRank}. + * Builder for {@link ConnectorScheduling}. */ - public static class Builder extends RankBase.AbstractBuilder implements ObjectBuilder { - @Nullable - private Long rankConstant; + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Boolean enabled; - @Nullable - private Long windowSize; + private String interval; /** - * How much influence documents in individual result sets per query have over - * the final ranked result set - *

- * API name: {@code rank_constant} + * Required - API name: {@code enabled} */ - public final Builder rankConstant(@Nullable Long value) { - this.rankConstant = value; + public final Builder enabled(boolean value) { + this.enabled = value; return this; } /** - * Size of the individual result sets per query + * Required - The interval is expressed using the crontab syntax *

- * API name: {@code window_size} + * API name: {@code interval} */ - public final Builder windowSize(@Nullable Long value) { - this.windowSize = value; + public final Builder interval(String value) { + this.interval = value; return this; } @@ -174,30 +155,30 @@ protected Builder self() { } /** - * Builds a {@link RrfRank}. + * Builds a {@link ConnectorScheduling}. * * @throws NullPointerException * if some of the required fields are null. */ - public RrfRank build() { + public ConnectorScheduling build() { _checkSingleUse(); - return new RrfRank(this); + return new ConnectorScheduling(this); } } // --------------------------------------------------------------------------------------------- /** - * Json deserializer for {@link RrfRank} + * Json deserializer for {@link ConnectorScheduling} */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - RrfRank::setupRrfRankDeserializer); + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ConnectorScheduling::setupConnectorSchedulingDeserializer); - protected static void setupRrfRankDeserializer(ObjectDeserializer op) { + protected static void setupConnectorSchedulingDeserializer(ObjectDeserializer op) { - op.add(Builder::rankConstant, JsonpDeserializer.longDeserializer(), "rank_constant"); - op.add(Builder::windowSize, JsonpDeserializer.longDeserializer(), "window_size"); + op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); + op.add(Builder::interval, JsonpDeserializer.stringDeserializer(), "interval"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorStatus.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorStatus.java new file mode 100644 index 000000000..2407d8c10 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorStatus.java @@ -0,0 +1,73 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum ConnectorStatus implements JsonEnum { + Created("created"), + + NeedsConfiguration("needs_configuration"), + + Configured("configured"), + + Connected("connected"), + + Error("error"), + + ; + + private final String jsonValue; + + ConnectorStatus(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + ConnectorStatus.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorSyncJob.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorSyncJob.java new file mode 100644 index 000000000..1b1e0e434 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorSyncJob.java @@ -0,0 +1,634 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.DateTime; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Long; +import java.lang.String; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.ConnectorSyncJob + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ConnectorSyncJob implements JsonpSerializable { + @Nullable + private final DateTime cancelationRequestedAt; + + @Nullable + private final DateTime canceledAt; + + @Nullable + private final DateTime completedAt; + + private final SyncJobConnectorReference connector; + + private final DateTime createdAt; + + private final long deletedDocumentCount; + + @Nullable + private final String error; + + private final String id; + + private final long indexedDocumentCount; + + private final long indexedDocumentVolume; + + private final SyncJobType jobType; + + @Nullable + private final DateTime lastSeen; + + private final Map metadata; + + @Nullable + private final DateTime startedAt; + + private final SyncStatus status; + + private final long totalDocumentCount; + + private final SyncJobTriggerMethod triggerMethod; + + @Nullable + private final String workerHostname; + + // --------------------------------------------------------------------------------------------- + + protected ConnectorSyncJob(AbstractBuilder builder) { + + this.cancelationRequestedAt = builder.cancelationRequestedAt; + this.canceledAt = builder.canceledAt; + this.completedAt = builder.completedAt; + this.connector = ApiTypeHelper.requireNonNull(builder.connector, this, "connector"); + this.createdAt = ApiTypeHelper.requireNonNull(builder.createdAt, this, "createdAt"); + this.deletedDocumentCount = ApiTypeHelper.requireNonNull(builder.deletedDocumentCount, this, + "deletedDocumentCount"); + this.error = builder.error; + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.indexedDocumentCount = ApiTypeHelper.requireNonNull(builder.indexedDocumentCount, this, + "indexedDocumentCount"); + this.indexedDocumentVolume = ApiTypeHelper.requireNonNull(builder.indexedDocumentVolume, this, + "indexedDocumentVolume"); + this.jobType = ApiTypeHelper.requireNonNull(builder.jobType, this, "jobType"); + this.lastSeen = builder.lastSeen; + this.metadata = ApiTypeHelper.unmodifiableRequired(builder.metadata, this, "metadata"); + this.startedAt = builder.startedAt; + this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); + this.totalDocumentCount = ApiTypeHelper.requireNonNull(builder.totalDocumentCount, this, "totalDocumentCount"); + this.triggerMethod = ApiTypeHelper.requireNonNull(builder.triggerMethod, this, "triggerMethod"); + this.workerHostname = builder.workerHostname; + + } + + public static ConnectorSyncJob connectorSyncJobOf(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code cancelation_requested_at} + */ + @Nullable + public final DateTime cancelationRequestedAt() { + return this.cancelationRequestedAt; + } + + /** + * API name: {@code canceled_at} + */ + @Nullable + public final DateTime canceledAt() { + return this.canceledAt; + } + + /** + * API name: {@code completed_at} + */ + @Nullable + public final DateTime completedAt() { + return this.completedAt; + } + + /** + * Required - API name: {@code connector} + */ + public final SyncJobConnectorReference connector() { + return this.connector; + } + + /** + * Required - API name: {@code created_at} + */ + public final DateTime createdAt() { + return this.createdAt; + } + + /** + * Required - API name: {@code deleted_document_count} + */ + public final long deletedDocumentCount() { + return this.deletedDocumentCount; + } + + /** + * API name: {@code error} + */ + @Nullable + public final String error() { + return this.error; + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Required - API name: {@code indexed_document_count} + */ + public final long indexedDocumentCount() { + return this.indexedDocumentCount; + } + + /** + * Required - API name: {@code indexed_document_volume} + */ + public final long indexedDocumentVolume() { + return this.indexedDocumentVolume; + } + + /** + * Required - API name: {@code job_type} + */ + public final SyncJobType jobType() { + return this.jobType; + } + + /** + * API name: {@code last_seen} + */ + @Nullable + public final DateTime lastSeen() { + return this.lastSeen; + } + + /** + * Required - API name: {@code metadata} + */ + public final Map metadata() { + return this.metadata; + } + + /** + * API name: {@code started_at} + */ + @Nullable + public final DateTime startedAt() { + return this.startedAt; + } + + /** + * Required - API name: {@code status} + */ + public final SyncStatus status() { + return this.status; + } + + /** + * Required - API name: {@code total_document_count} + */ + public final long totalDocumentCount() { + return this.totalDocumentCount; + } + + /** + * Required - API name: {@code trigger_method} + */ + public final SyncJobTriggerMethod triggerMethod() { + return this.triggerMethod; + } + + /** + * API name: {@code worker_hostname} + */ + @Nullable + public final String workerHostname() { + return this.workerHostname; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.cancelationRequestedAt != null) { + generator.writeKey("cancelation_requested_at"); + this.cancelationRequestedAt.serialize(generator, mapper); + } + if (this.canceledAt != null) { + generator.writeKey("canceled_at"); + this.canceledAt.serialize(generator, mapper); + } + if (this.completedAt != null) { + generator.writeKey("completed_at"); + this.completedAt.serialize(generator, mapper); + } + generator.writeKey("connector"); + this.connector.serialize(generator, mapper); + + generator.writeKey("created_at"); + this.createdAt.serialize(generator, mapper); + generator.writeKey("deleted_document_count"); + generator.write(this.deletedDocumentCount); + + if (this.error != null) { + generator.writeKey("error"); + generator.write(this.error); + + } + generator.writeKey("id"); + generator.write(this.id); + + generator.writeKey("indexed_document_count"); + generator.write(this.indexedDocumentCount); + + generator.writeKey("indexed_document_volume"); + generator.write(this.indexedDocumentVolume); + + generator.writeKey("job_type"); + this.jobType.serialize(generator, mapper); + if (this.lastSeen != null) { + generator.writeKey("last_seen"); + this.lastSeen.serialize(generator, mapper); + } + if (ApiTypeHelper.isDefined(this.metadata)) { + generator.writeKey("metadata"); + generator.writeStartObject(); + for (Map.Entry item0 : this.metadata.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.startedAt != null) { + generator.writeKey("started_at"); + this.startedAt.serialize(generator, mapper); + } + generator.writeKey("status"); + this.status.serialize(generator, mapper); + generator.writeKey("total_document_count"); + generator.write(this.totalDocumentCount); + + generator.writeKey("trigger_method"); + this.triggerMethod.serialize(generator, mapper); + if (this.workerHostname != null) { + generator.writeKey("worker_hostname"); + generator.write(this.workerHostname); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ConnectorSyncJob}. + */ + + public static class Builder extends ConnectorSyncJob.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ConnectorSyncJob}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ConnectorSyncJob build() { + _checkSingleUse(); + + return new ConnectorSyncJob(this); + } + } + + public abstract static class AbstractBuilder> + extends + WithJsonObjectBuilderBase { + @Nullable + private DateTime cancelationRequestedAt; + + @Nullable + private DateTime canceledAt; + + @Nullable + private DateTime completedAt; + + private SyncJobConnectorReference connector; + + private DateTime createdAt; + + private Long deletedDocumentCount; + + @Nullable + private String error; + + private String id; + + private Long indexedDocumentCount; + + private Long indexedDocumentVolume; + + private SyncJobType jobType; + + @Nullable + private DateTime lastSeen; + + private Map metadata; + + @Nullable + private DateTime startedAt; + + private SyncStatus status; + + private Long totalDocumentCount; + + private SyncJobTriggerMethod triggerMethod; + + @Nullable + private String workerHostname; + + /** + * API name: {@code cancelation_requested_at} + */ + public final BuilderT cancelationRequestedAt(@Nullable DateTime value) { + this.cancelationRequestedAt = value; + return self(); + } + + /** + * API name: {@code canceled_at} + */ + public final BuilderT canceledAt(@Nullable DateTime value) { + this.canceledAt = value; + return self(); + } + + /** + * API name: {@code completed_at} + */ + public final BuilderT completedAt(@Nullable DateTime value) { + this.completedAt = value; + return self(); + } + + /** + * Required - API name: {@code connector} + */ + public final BuilderT connector(SyncJobConnectorReference value) { + this.connector = value; + return self(); + } + + /** + * Required - API name: {@code connector} + */ + public final BuilderT connector( + Function> fn) { + return this.connector(fn.apply(new SyncJobConnectorReference.Builder()).build()); + } + + /** + * Required - API name: {@code created_at} + */ + public final BuilderT createdAt(DateTime value) { + this.createdAt = value; + return self(); + } + + /** + * Required - API name: {@code deleted_document_count} + */ + public final BuilderT deletedDocumentCount(long value) { + this.deletedDocumentCount = value; + return self(); + } + + /** + * API name: {@code error} + */ + public final BuilderT error(@Nullable String value) { + this.error = value; + return self(); + } + + /** + * Required - API name: {@code id} + */ + public final BuilderT id(String value) { + this.id = value; + return self(); + } + + /** + * Required - API name: {@code indexed_document_count} + */ + public final BuilderT indexedDocumentCount(long value) { + this.indexedDocumentCount = value; + return self(); + } + + /** + * Required - API name: {@code indexed_document_volume} + */ + public final BuilderT indexedDocumentVolume(long value) { + this.indexedDocumentVolume = value; + return self(); + } + + /** + * Required - API name: {@code job_type} + */ + public final BuilderT jobType(SyncJobType value) { + this.jobType = value; + return self(); + } + + /** + * API name: {@code last_seen} + */ + public final BuilderT lastSeen(@Nullable DateTime value) { + this.lastSeen = value; + return self(); + } + + /** + * Required - API name: {@code metadata} + *

+ * Adds all entries of map to metadata. + */ + public final BuilderT metadata(Map map) { + this.metadata = _mapPutAll(this.metadata, map); + return self(); + } + + /** + * Required - API name: {@code metadata} + *

+ * Adds an entry to metadata. + */ + public final BuilderT metadata(String key, JsonData value) { + this.metadata = _mapPut(this.metadata, key, value); + return self(); + } + + /** + * API name: {@code started_at} + */ + public final BuilderT startedAt(@Nullable DateTime value) { + this.startedAt = value; + return self(); + } + + /** + * Required - API name: {@code status} + */ + public final BuilderT status(SyncStatus value) { + this.status = value; + return self(); + } + + /** + * Required - API name: {@code total_document_count} + */ + public final BuilderT totalDocumentCount(long value) { + this.totalDocumentCount = value; + return self(); + } + + /** + * Required - API name: {@code trigger_method} + */ + public final BuilderT triggerMethod(SyncJobTriggerMethod value) { + this.triggerMethod = value; + return self(); + } + + /** + * API name: {@code worker_hostname} + */ + public final BuilderT workerHostname(@Nullable String value) { + this.workerHostname = value; + return self(); + } + + protected abstract BuilderT self(); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ConnectorSyncJob} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ConnectorSyncJob::setupConnectorSyncJobDeserializer); + + protected static > void setupConnectorSyncJobDeserializer( + ObjectDeserializer op) { + + op.add(AbstractBuilder::cancelationRequestedAt, DateTime._DESERIALIZER, "cancelation_requested_at"); + op.add(AbstractBuilder::canceledAt, DateTime._DESERIALIZER, "canceled_at"); + op.add(AbstractBuilder::completedAt, DateTime._DESERIALIZER, "completed_at"); + op.add(AbstractBuilder::connector, SyncJobConnectorReference._DESERIALIZER, "connector"); + op.add(AbstractBuilder::createdAt, DateTime._DESERIALIZER, "created_at"); + op.add(AbstractBuilder::deletedDocumentCount, JsonpDeserializer.longDeserializer(), "deleted_document_count"); + op.add(AbstractBuilder::error, JsonpDeserializer.stringDeserializer(), "error"); + op.add(AbstractBuilder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(AbstractBuilder::indexedDocumentCount, JsonpDeserializer.longDeserializer(), "indexed_document_count"); + op.add(AbstractBuilder::indexedDocumentVolume, JsonpDeserializer.longDeserializer(), "indexed_document_volume"); + op.add(AbstractBuilder::jobType, SyncJobType._DESERIALIZER, "job_type"); + op.add(AbstractBuilder::lastSeen, DateTime._DESERIALIZER, "last_seen"); + op.add(AbstractBuilder::metadata, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "metadata"); + op.add(AbstractBuilder::startedAt, DateTime._DESERIALIZER, "started_at"); + op.add(AbstractBuilder::status, SyncStatus._DESERIALIZER, "status"); + op.add(AbstractBuilder::totalDocumentCount, JsonpDeserializer.longDeserializer(), "total_document_count"); + op.add(AbstractBuilder::triggerMethod, SyncJobTriggerMethod._DESERIALIZER, "trigger_method"); + op.add(AbstractBuilder::workerHostname, JsonpDeserializer.stringDeserializer(), "worker_hostname"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomScheduling.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomScheduling.java new file mode 100644 index 000000000..302a7d46f --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomScheduling.java @@ -0,0 +1,266 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.DateTime; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.CustomScheduling + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CustomScheduling implements JsonpSerializable { + private final CustomSchedulingConfigurationOverrides configurationOverrides; + + private final boolean enabled; + + private final String interval; + + @Nullable + private final DateTime lastSynced; + + private final String name; + + // --------------------------------------------------------------------------------------------- + + private CustomScheduling(Builder builder) { + + this.configurationOverrides = ApiTypeHelper.requireNonNull(builder.configurationOverrides, this, + "configurationOverrides"); + this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled"); + this.interval = ApiTypeHelper.requireNonNull(builder.interval, this, "interval"); + this.lastSynced = builder.lastSynced; + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + + } + + public static CustomScheduling of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code configuration_overrides} + */ + public final CustomSchedulingConfigurationOverrides configurationOverrides() { + return this.configurationOverrides; + } + + /** + * Required - API name: {@code enabled} + */ + public final boolean enabled() { + return this.enabled; + } + + /** + * Required - API name: {@code interval} + */ + public final String interval() { + return this.interval; + } + + /** + * API name: {@code last_synced} + */ + @Nullable + public final DateTime lastSynced() { + return this.lastSynced; + } + + /** + * Required - API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("configuration_overrides"); + this.configurationOverrides.serialize(generator, mapper); + + generator.writeKey("enabled"); + generator.write(this.enabled); + + generator.writeKey("interval"); + generator.write(this.interval); + + if (this.lastSynced != null) { + generator.writeKey("last_synced"); + this.lastSynced.serialize(generator, mapper); + } + generator.writeKey("name"); + generator.write(this.name); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CustomScheduling}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private CustomSchedulingConfigurationOverrides configurationOverrides; + + private Boolean enabled; + + private String interval; + + @Nullable + private DateTime lastSynced; + + private String name; + + /** + * Required - API name: {@code configuration_overrides} + */ + public final Builder configurationOverrides(CustomSchedulingConfigurationOverrides value) { + this.configurationOverrides = value; + return this; + } + + /** + * Required - API name: {@code configuration_overrides} + */ + public final Builder configurationOverrides( + Function> fn) { + return this.configurationOverrides(fn.apply(new CustomSchedulingConfigurationOverrides.Builder()).build()); + } + + /** + * Required - API name: {@code enabled} + */ + public final Builder enabled(boolean value) { + this.enabled = value; + return this; + } + + /** + * Required - API name: {@code interval} + */ + public final Builder interval(String value) { + this.interval = value; + return this; + } + + /** + * API name: {@code last_synced} + */ + public final Builder lastSynced(@Nullable DateTime value) { + this.lastSynced = value; + return this; + } + + /** + * Required - API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CustomScheduling}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CustomScheduling build() { + _checkSingleUse(); + + return new CustomScheduling(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CustomScheduling} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CustomScheduling::setupCustomSchedulingDeserializer); + + protected static void setupCustomSchedulingDeserializer(ObjectDeserializer op) { + + op.add(Builder::configurationOverrides, CustomSchedulingConfigurationOverrides._DESERIALIZER, + "configuration_overrides"); + op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); + op.add(Builder::interval, JsonpDeserializer.stringDeserializer(), "interval"); + op.add(Builder::lastSynced, DateTime._DESERIALIZER, "last_synced"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomSchedulingConfigurationOverrides.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomSchedulingConfigurationOverrides.java new file mode 100644 index 000000000..11d919a0b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomSchedulingConfigurationOverrides.java @@ -0,0 +1,333 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.CustomSchedulingConfigurationOverrides + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CustomSchedulingConfigurationOverrides implements JsonpSerializable { + @Nullable + private final Integer maxCrawlDepth; + + @Nullable + private final Boolean sitemapDiscoveryDisabled; + + private final List domainAllowlist; + + private final List sitemapUrls; + + private final List seedUrls; + + // --------------------------------------------------------------------------------------------- + + private CustomSchedulingConfigurationOverrides(Builder builder) { + + this.maxCrawlDepth = builder.maxCrawlDepth; + this.sitemapDiscoveryDisabled = builder.sitemapDiscoveryDisabled; + this.domainAllowlist = ApiTypeHelper.unmodifiable(builder.domainAllowlist); + this.sitemapUrls = ApiTypeHelper.unmodifiable(builder.sitemapUrls); + this.seedUrls = ApiTypeHelper.unmodifiable(builder.seedUrls); + + } + + public static CustomSchedulingConfigurationOverrides of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code max_crawl_depth} + */ + @Nullable + public final Integer maxCrawlDepth() { + return this.maxCrawlDepth; + } + + /** + * API name: {@code sitemap_discovery_disabled} + */ + @Nullable + public final Boolean sitemapDiscoveryDisabled() { + return this.sitemapDiscoveryDisabled; + } + + /** + * API name: {@code domain_allowlist} + */ + public final List domainAllowlist() { + return this.domainAllowlist; + } + + /** + * API name: {@code sitemap_urls} + */ + public final List sitemapUrls() { + return this.sitemapUrls; + } + + /** + * API name: {@code seed_urls} + */ + public final List seedUrls() { + return this.seedUrls; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.maxCrawlDepth != null) { + generator.writeKey("max_crawl_depth"); + generator.write(this.maxCrawlDepth); + + } + if (this.sitemapDiscoveryDisabled != null) { + generator.writeKey("sitemap_discovery_disabled"); + generator.write(this.sitemapDiscoveryDisabled); + + } + if (ApiTypeHelper.isDefined(this.domainAllowlist)) { + generator.writeKey("domain_allowlist"); + generator.writeStartArray(); + for (String item0 : this.domainAllowlist) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.sitemapUrls)) { + generator.writeKey("sitemap_urls"); + generator.writeStartArray(); + for (String item0 : this.sitemapUrls) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.seedUrls)) { + generator.writeKey("seed_urls"); + generator.writeStartArray(); + for (String item0 : this.seedUrls) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CustomSchedulingConfigurationOverrides}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private Integer maxCrawlDepth; + + @Nullable + private Boolean sitemapDiscoveryDisabled; + + @Nullable + private List domainAllowlist; + + @Nullable + private List sitemapUrls; + + @Nullable + private List seedUrls; + + /** + * API name: {@code max_crawl_depth} + */ + public final Builder maxCrawlDepth(@Nullable Integer value) { + this.maxCrawlDepth = value; + return this; + } + + /** + * API name: {@code sitemap_discovery_disabled} + */ + public final Builder sitemapDiscoveryDisabled(@Nullable Boolean value) { + this.sitemapDiscoveryDisabled = value; + return this; + } + + /** + * API name: {@code domain_allowlist} + *

+ * Adds all elements of list to domainAllowlist. + */ + public final Builder domainAllowlist(List list) { + this.domainAllowlist = _listAddAll(this.domainAllowlist, list); + return this; + } + + /** + * API name: {@code domain_allowlist} + *

+ * Adds one or more values to domainAllowlist. + */ + public final Builder domainAllowlist(String value, String... values) { + this.domainAllowlist = _listAdd(this.domainAllowlist, value, values); + return this; + } + + /** + * API name: {@code sitemap_urls} + *

+ * Adds all elements of list to sitemapUrls. + */ + public final Builder sitemapUrls(List list) { + this.sitemapUrls = _listAddAll(this.sitemapUrls, list); + return this; + } + + /** + * API name: {@code sitemap_urls} + *

+ * Adds one or more values to sitemapUrls. + */ + public final Builder sitemapUrls(String value, String... values) { + this.sitemapUrls = _listAdd(this.sitemapUrls, value, values); + return this; + } + + /** + * API name: {@code seed_urls} + *

+ * Adds all elements of list to seedUrls. + */ + public final Builder seedUrls(List list) { + this.seedUrls = _listAddAll(this.seedUrls, list); + return this; + } + + /** + * API name: {@code seed_urls} + *

+ * Adds one or more values to seedUrls. + */ + public final Builder seedUrls(String value, String... values) { + this.seedUrls = _listAdd(this.seedUrls, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CustomSchedulingConfigurationOverrides}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CustomSchedulingConfigurationOverrides build() { + _checkSingleUse(); + + return new CustomSchedulingConfigurationOverrides(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CustomSchedulingConfigurationOverrides} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, + CustomSchedulingConfigurationOverrides::setupCustomSchedulingConfigurationOverridesDeserializer); + + protected static void setupCustomSchedulingConfigurationOverridesDeserializer( + ObjectDeserializer op) { + + op.add(Builder::maxCrawlDepth, JsonpDeserializer.integerDeserializer(), "max_crawl_depth"); + op.add(Builder::sitemapDiscoveryDisabled, JsonpDeserializer.booleanDeserializer(), + "sitemap_discovery_disabled"); + op.add(Builder::domainAllowlist, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "domain_allowlist"); + op.add(Builder::sitemapUrls, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "sitemap_urls"); + op.add(Builder::seedUrls, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "seed_urls"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java new file mode 100644 index 000000000..9cb231331 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java @@ -0,0 +1,214 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.delete.Request + +/** + * Deletes a connector. + * + * @see API + * specification + */ + +public class DeleteConnectorRequest extends RequestBase { + private final String connectorId; + + @Nullable + private final Boolean deleteSyncJobs; + + // --------------------------------------------------------------------------------------------- + + private DeleteConnectorRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.deleteSyncJobs = builder.deleteSyncJobs; + + } + + public static DeleteConnectorRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be deleted + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * A flag indicating if associated sync jobs should be also removed. Defaults to + * false. + *

+ * API name: {@code delete_sync_jobs} + */ + @Nullable + public final Boolean deleteSyncJobs() { + return this.deleteSyncJobs; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteConnectorRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + @Nullable + private Boolean deleteSyncJobs; + + /** + * Required - The unique identifier of the connector to be deleted + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * A flag indicating if associated sync jobs should be also removed. Defaults to + * false. + *

+ * API name: {@code delete_sync_jobs} + */ + public final Builder deleteSyncJobs(@Nullable Boolean value) { + this.deleteSyncJobs = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DeleteConnectorRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DeleteConnectorRequest build() { + _checkSingleUse(); + + return new DeleteConnectorRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.delete}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.delete", + + // Request method + request -> { + return "DELETE"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (request.deleteSyncJobs != null) { + params.put("delete_sync_jobs", String.valueOf(request.deleteSyncJobs)); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, DeleteConnectorResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorResponse.java new file mode 100644 index 000000000..801c81a34 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorResponse.java @@ -0,0 +1,108 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.AcknowledgedResponseBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.delete.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class DeleteConnectorResponse extends AcknowledgedResponseBase { + // --------------------------------------------------------------------------------------------- + + private DeleteConnectorResponse(Builder builder) { + super(builder); + + } + + public static DeleteConnectorResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteConnectorResponse}. + */ + + public static class Builder extends AcknowledgedResponseBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DeleteConnectorResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DeleteConnectorResponse build() { + _checkSingleUse(); + + return new DeleteConnectorResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DeleteConnectorResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, DeleteConnectorResponse::setupDeleteConnectorResponseDeserializer); + + protected static void setupDeleteConnectorResponseDeserializer( + ObjectDeserializer op) { + AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Dependency.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Dependency.java new file mode 100644 index 000000000..2934cefe4 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Dependency.java @@ -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. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.FieldValue; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.Dependency + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Dependency implements JsonpSerializable { + private final String field; + + private final FieldValue value; + + // --------------------------------------------------------------------------------------------- + + private Dependency(Builder builder) { + + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); + + } + + public static Dependency of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code field} + */ + public final String field() { + return this.field; + } + + /** + * Required - API name: {@code value} + */ + public final FieldValue value() { + return this.value; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("field"); + generator.write(this.field); + + generator.writeKey("value"); + this.value.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Dependency}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private String field; + + private FieldValue value; + + /** + * Required - API name: {@code field} + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(FieldValue value) { + this.value = value; + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(Function> fn) { + return this.value(fn.apply(new FieldValue.Builder()).build()); + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(String value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(long value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(double value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(boolean value) { + this.value = FieldValue.of(value); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link Dependency}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Dependency build() { + _checkSingleUse(); + + return new Dependency(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Dependency} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Dependency::setupDependencyDeserializer); + + protected static void setupDependencyDeserializer(ObjectDeserializer op) { + + op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + op.add(Builder::value, FieldValue._DESERIALIZER, "value"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DisplayType.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DisplayType.java new file mode 100644 index 000000000..93fcd3569 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DisplayType.java @@ -0,0 +1,72 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum DisplayType implements JsonEnum { + Textbox("textbox"), + + Textarea("textarea"), + + Numeric("numeric"), + + Toggle("toggle"), + + Dropdown("dropdown"), + + ; + + private final String jsonValue; + + DisplayType(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + DisplayType.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java new file mode 100644 index 000000000..5c5f4cabe --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java @@ -0,0 +1,915 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.ApiClient; +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.transport.ElasticsearchTransport; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.JsonEndpoint; +import co.elastic.clients.transport.Transport; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.util.ObjectBuilder; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Client for the connector namespace. + */ +public class ElasticsearchConnectorAsyncClient + extends + ApiClient { + + public ElasticsearchConnectorAsyncClient(ElasticsearchTransport transport) { + super(transport, null); + } + + public ElasticsearchConnectorAsyncClient(ElasticsearchTransport transport, + @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public ElasticsearchConnectorAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new ElasticsearchConnectorAsyncClient(this.transport, transportOptions); + } + + // ----- Endpoint: connector.check_in + + /** + * Updates the last_seen field in the connector, and sets it to current + * timestamp + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture checkIn(CheckInRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CheckInRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the last_seen field in the connector, and sets it to current + * timestamp + * + * @param fn + * a function that initializes a builder to create the + * {@link CheckInRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture checkIn( + Function> fn) { + return checkIn(fn.apply(new CheckInRequest.Builder()).build()); + } + + // ----- Endpoint: connector.delete + + /** + * Deletes a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture delete(DeleteConnectorRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) DeleteConnectorRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Deletes a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteConnectorRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture delete( + Function> fn) { + return delete(fn.apply(new DeleteConnectorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.get + + /** + * Retrieves a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture get(GetConnectorRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) GetConnectorRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Retrieves a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetConnectorRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture get( + Function> fn) { + return get(fn.apply(new GetConnectorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.list + + /** + * Returns existing connectors. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture list(ListRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) ListRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns existing connectors. + * + * @param fn + * a function that initializes a builder to create the + * {@link ListRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture list(Function> fn) { + return list(fn.apply(new ListRequest.Builder()).build()); + } + + /** + * Returns existing connectors. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture list() { + return this.transport.performRequestAsync(new ListRequest.Builder().build(), ListRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.post + + /** + * Creates a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture post(PostRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PostRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Creates a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link PostRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture post(Function> fn) { + return post(fn.apply(new PostRequest.Builder()).build()); + } + + /** + * Creates a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture post() { + return this.transport.performRequestAsync(new PostRequest.Builder().build(), PostRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.put + + /** + * Creates or updates a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture put(PutRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PutRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Creates or updates a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link PutRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture put(Function> fn) { + return put(fn.apply(new PutRequest.Builder()).build()); + } + + /** + * Creates or updates a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture put() { + return this.transport.performRequestAsync(new PutRequest.Builder().build(), PutRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.sync_job_cancel + + /** + * Cancels a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobCancel(SyncJobCancelRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobCancelRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Cancels a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobCancelRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture syncJobCancel( + Function> fn) { + return syncJobCancel(fn.apply(new SyncJobCancelRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_delete + + /** + * Deletes a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobDelete(SyncJobDeleteRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobDeleteRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Deletes a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobDeleteRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture syncJobDelete( + Function> fn) { + return syncJobDelete(fn.apply(new SyncJobDeleteRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_get + + /** + * Retrieves a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobGet(SyncJobGetRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobGetRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Retrieves a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobGetRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture syncJobGet( + Function> fn) { + return syncJobGet(fn.apply(new SyncJobGetRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_list + + /** + * Lists connector sync jobs. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobList(SyncJobListRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobListRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Lists connector sync jobs. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobListRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture syncJobList( + Function> fn) { + return syncJobList(fn.apply(new SyncJobListRequest.Builder()).build()); + } + + /** + * Lists connector sync jobs. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobList() { + return this.transport.performRequestAsync(new SyncJobListRequest.Builder().build(), + SyncJobListRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: connector.sync_job_post + + /** + * Creates a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobPost(SyncJobPostRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobPostRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Creates a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobPostRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture syncJobPost( + Function> fn) { + return syncJobPost(fn.apply(new SyncJobPostRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_active_filtering + + /** + * Activates the valid draft filtering for a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateActiveFiltering( + UpdateActiveFilteringRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateActiveFilteringRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Activates the valid draft filtering for a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateActiveFilteringRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateActiveFiltering( + Function> fn) { + return updateActiveFiltering(fn.apply(new UpdateActiveFilteringRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_api_key_id + + /** + * Updates the API key id in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateApiKeyId(UpdateApiKeyIdRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateApiKeyIdRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the API key id in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateApiKeyIdRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateApiKeyId( + Function> fn) { + return updateApiKeyId(fn.apply(new UpdateApiKeyIdRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_configuration + + /** + * Updates the configuration field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateConfiguration(UpdateConfigurationRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateConfigurationRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the configuration field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateConfigurationRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateConfiguration( + Function> fn) { + return updateConfiguration(fn.apply(new UpdateConfigurationRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_error + + /** + * Updates the filtering field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateError(UpdateErrorRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateErrorRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the filtering field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateErrorRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateError( + Function> fn) { + return updateError(fn.apply(new UpdateErrorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_filtering + + /** + * Updates the filtering field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateFiltering(UpdateFilteringRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the filtering field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateFilteringRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateFiltering( + Function> fn) { + return updateFiltering(fn.apply(new UpdateFilteringRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_filtering_validation + + /** + * Updates the draft filtering validation info for a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateFilteringValidation( + UpdateFilteringValidationRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringValidationRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the draft filtering validation info for a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateFilteringValidationRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateFilteringValidation( + Function> fn) { + return updateFilteringValidation(fn.apply(new UpdateFilteringValidationRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_index_name + + /** + * Updates the index_name in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateIndexName(UpdateIndexNameRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateIndexNameRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the index_name in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateIndexNameRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateIndexName( + Function> fn) { + return updateIndexName(fn.apply(new UpdateIndexNameRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_name + + /** + * Updates the name and description fields in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateName(UpdateNameRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateNameRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the name and description fields in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateNameRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateName( + Function> fn) { + return updateName(fn.apply(new UpdateNameRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_native + + /** + * Updates the is_native flag in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateNative(UpdateNativeRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateNativeRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the is_native flag in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateNativeRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateNative( + Function> fn) { + return updateNative(fn.apply(new UpdateNativeRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_pipeline + + /** + * Updates the pipeline field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updatePipeline(UpdatePipelineRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdatePipelineRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the pipeline field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdatePipelineRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updatePipeline( + Function> fn) { + return updatePipeline(fn.apply(new UpdatePipelineRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_scheduling + + /** + * Updates the scheduling field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateScheduling(UpdateSchedulingRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateSchedulingRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the scheduling field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateSchedulingRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateScheduling( + Function> fn) { + return updateScheduling(fn.apply(new UpdateSchedulingRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_service_type + + /** + * Updates the service type of the connector + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateServiceType(UpdateServiceTypeRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateServiceTypeRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the service type of the connector + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateServiceTypeRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateServiceType( + Function> fn) { + return updateServiceType(fn.apply(new UpdateServiceTypeRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_status + + /** + * Updates the status of the connector + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateStatus(UpdateStatusRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateStatusRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the status of the connector + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateStatusRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateStatus( + Function> fn) { + return updateStatus(fn.apply(new UpdateStatusRequest.Builder()).build()); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java new file mode 100644 index 000000000..f21235230 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java @@ -0,0 +1,942 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.ApiClient; +import co.elastic.clients.elasticsearch._types.ElasticsearchException; +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.transport.ElasticsearchTransport; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.JsonEndpoint; +import co.elastic.clients.transport.Transport; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.util.ObjectBuilder; +import java.io.IOException; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Client for the connector namespace. + */ +public class ElasticsearchConnectorClient extends ApiClient { + + public ElasticsearchConnectorClient(ElasticsearchTransport transport) { + super(transport, null); + } + + public ElasticsearchConnectorClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public ElasticsearchConnectorClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new ElasticsearchConnectorClient(this.transport, transportOptions); + } + + // ----- Endpoint: connector.check_in + + /** + * Updates the last_seen field in the connector, and sets it to current + * timestamp + * + * @see Documentation + * on elastic.co + */ + + public CheckInResponse checkIn(CheckInRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CheckInRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the last_seen field in the connector, and sets it to current + * timestamp + * + * @param fn + * a function that initializes a builder to create the + * {@link CheckInRequest} + * @see Documentation + * on elastic.co + */ + + public final CheckInResponse checkIn(Function> fn) + throws IOException, ElasticsearchException { + return checkIn(fn.apply(new CheckInRequest.Builder()).build()); + } + + // ----- Endpoint: connector.delete + + /** + * Deletes a connector. + * + * @see Documentation + * on elastic.co + */ + + public DeleteConnectorResponse delete(DeleteConnectorRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) DeleteConnectorRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Deletes a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteConnectorRequest} + * @see Documentation + * on elastic.co + */ + + public final DeleteConnectorResponse delete( + Function> fn) + throws IOException, ElasticsearchException { + return delete(fn.apply(new DeleteConnectorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.get + + /** + * Retrieves a connector. + * + * @see Documentation + * on elastic.co + */ + + public GetConnectorResponse get(GetConnectorRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) GetConnectorRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Retrieves a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetConnectorRequest} + * @see Documentation + * on elastic.co + */ + + public final GetConnectorResponse get(Function> fn) + throws IOException, ElasticsearchException { + return get(fn.apply(new GetConnectorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.list + + /** + * Returns existing connectors. + * + * @see Documentation + * on elastic.co + */ + + public ListResponse list(ListRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) ListRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns existing connectors. + * + * @param fn + * a function that initializes a builder to create the + * {@link ListRequest} + * @see Documentation + * on elastic.co + */ + + public final ListResponse list(Function> fn) + throws IOException, ElasticsearchException { + return list(fn.apply(new ListRequest.Builder()).build()); + } + + /** + * Returns existing connectors. + * + * @see Documentation + * on elastic.co + */ + + public ListResponse list() throws IOException, ElasticsearchException { + return this.transport.performRequest(new ListRequest.Builder().build(), ListRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.post + + /** + * Creates a connector. + * + * @see Documentation + * on elastic.co + */ + + public PostResponse post(PostRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PostRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Creates a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link PostRequest} + * @see Documentation + * on elastic.co + */ + + public final PostResponse post(Function> fn) + throws IOException, ElasticsearchException { + return post(fn.apply(new PostRequest.Builder()).build()); + } + + /** + * Creates a connector. + * + * @see Documentation + * on elastic.co + */ + + public PostResponse post() throws IOException, ElasticsearchException { + return this.transport.performRequest(new PostRequest.Builder().build(), PostRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.put + + /** + * Creates or updates a connector. + * + * @see Documentation + * on elastic.co + */ + + public PutResponse put(PutRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PutRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Creates or updates a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link PutRequest} + * @see Documentation + * on elastic.co + */ + + public final PutResponse put(Function> fn) + throws IOException, ElasticsearchException { + return put(fn.apply(new PutRequest.Builder()).build()); + } + + /** + * Creates or updates a connector. + * + * @see Documentation + * on elastic.co + */ + + public PutResponse put() throws IOException, ElasticsearchException { + return this.transport.performRequest(new PutRequest.Builder().build(), PutRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.sync_job_cancel + + /** + * Cancels a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobCancelResponse syncJobCancel(SyncJobCancelRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobCancelRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Cancels a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobCancelRequest} + * @see Documentation + * on elastic.co + */ + + public final SyncJobCancelResponse syncJobCancel( + Function> fn) + throws IOException, ElasticsearchException { + return syncJobCancel(fn.apply(new SyncJobCancelRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_delete + + /** + * Deletes a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobDeleteResponse syncJobDelete(SyncJobDeleteRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobDeleteRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Deletes a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobDeleteRequest} + * @see Documentation + * on elastic.co + */ + + public final SyncJobDeleteResponse syncJobDelete( + Function> fn) + throws IOException, ElasticsearchException { + return syncJobDelete(fn.apply(new SyncJobDeleteRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_get + + /** + * Retrieves a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobGetResponse syncJobGet(SyncJobGetRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobGetRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Retrieves a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobGetRequest} + * @see Documentation + * on elastic.co + */ + + public final SyncJobGetResponse syncJobGet(Function> fn) + throws IOException, ElasticsearchException { + return syncJobGet(fn.apply(new SyncJobGetRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_list + + /** + * Lists connector sync jobs. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobListResponse syncJobList(SyncJobListRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobListRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Lists connector sync jobs. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobListRequest} + * @see Documentation + * on elastic.co + */ + + public final SyncJobListResponse syncJobList( + Function> fn) + throws IOException, ElasticsearchException { + return syncJobList(fn.apply(new SyncJobListRequest.Builder()).build()); + } + + /** + * Lists connector sync jobs. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobListResponse syncJobList() throws IOException, ElasticsearchException { + return this.transport.performRequest(new SyncJobListRequest.Builder().build(), SyncJobListRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.sync_job_post + + /** + * Creates a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobPostResponse syncJobPost(SyncJobPostRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobPostRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Creates a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobPostRequest} + * @see Documentation + * on elastic.co + */ + + public final SyncJobPostResponse syncJobPost( + Function> fn) + throws IOException, ElasticsearchException { + return syncJobPost(fn.apply(new SyncJobPostRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_active_filtering + + /** + * Activates the valid draft filtering for a connector. + * + * @see Documentation + * on elastic.co + */ + + public UpdateActiveFilteringResponse updateActiveFiltering(UpdateActiveFilteringRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateActiveFilteringRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Activates the valid draft filtering for a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateActiveFilteringRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateActiveFilteringResponse updateActiveFiltering( + Function> fn) + throws IOException, ElasticsearchException { + return updateActiveFiltering(fn.apply(new UpdateActiveFilteringRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_api_key_id + + /** + * Updates the API key id in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateApiKeyIdResponse updateApiKeyId(UpdateApiKeyIdRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateApiKeyIdRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the API key id in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateApiKeyIdRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateApiKeyIdResponse updateApiKeyId( + Function> fn) + throws IOException, ElasticsearchException { + return updateApiKeyId(fn.apply(new UpdateApiKeyIdRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_configuration + + /** + * Updates the configuration field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateConfigurationResponse updateConfiguration(UpdateConfigurationRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateConfigurationRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the configuration field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateConfigurationRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateConfigurationResponse updateConfiguration( + Function> fn) + throws IOException, ElasticsearchException { + return updateConfiguration(fn.apply(new UpdateConfigurationRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_error + + /** + * Updates the filtering field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateErrorResponse updateError(UpdateErrorRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateErrorRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the filtering field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateErrorRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateErrorResponse updateError( + Function> fn) + throws IOException, ElasticsearchException { + return updateError(fn.apply(new UpdateErrorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_filtering + + /** + * Updates the filtering field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateFilteringResponse updateFiltering(UpdateFilteringRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the filtering field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateFilteringRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateFilteringResponse updateFiltering( + Function> fn) + throws IOException, ElasticsearchException { + return updateFiltering(fn.apply(new UpdateFilteringRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_filtering_validation + + /** + * Updates the draft filtering validation info for a connector. + * + * @see Documentation + * on elastic.co + */ + + public UpdateFilteringValidationResponse updateFilteringValidation(UpdateFilteringValidationRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringValidationRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the draft filtering validation info for a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateFilteringValidationRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateFilteringValidationResponse updateFilteringValidation( + Function> fn) + throws IOException, ElasticsearchException { + return updateFilteringValidation(fn.apply(new UpdateFilteringValidationRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_index_name + + /** + * Updates the index_name in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateIndexNameResponse updateIndexName(UpdateIndexNameRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateIndexNameRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the index_name in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateIndexNameRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateIndexNameResponse updateIndexName( + Function> fn) + throws IOException, ElasticsearchException { + return updateIndexName(fn.apply(new UpdateIndexNameRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_name + + /** + * Updates the name and description fields in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateNameResponse updateName(UpdateNameRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateNameRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the name and description fields in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateNameRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateNameResponse updateName(Function> fn) + throws IOException, ElasticsearchException { + return updateName(fn.apply(new UpdateNameRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_native + + /** + * Updates the is_native flag in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateNativeResponse updateNative(UpdateNativeRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateNativeRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the is_native flag in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateNativeRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateNativeResponse updateNative( + Function> fn) + throws IOException, ElasticsearchException { + return updateNative(fn.apply(new UpdateNativeRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_pipeline + + /** + * Updates the pipeline field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdatePipelineResponse updatePipeline(UpdatePipelineRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdatePipelineRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the pipeline field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdatePipelineRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdatePipelineResponse updatePipeline( + Function> fn) + throws IOException, ElasticsearchException { + return updatePipeline(fn.apply(new UpdatePipelineRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_scheduling + + /** + * Updates the scheduling field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateSchedulingResponse updateScheduling(UpdateSchedulingRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateSchedulingRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the scheduling field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateSchedulingRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateSchedulingResponse updateScheduling( + Function> fn) + throws IOException, ElasticsearchException { + return updateScheduling(fn.apply(new UpdateSchedulingRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_service_type + + /** + * Updates the service type of the connector + * + * @see Documentation + * on elastic.co + */ + + public UpdateServiceTypeResponse updateServiceType(UpdateServiceTypeRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateServiceTypeRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the service type of the connector + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateServiceTypeRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateServiceTypeResponse updateServiceType( + Function> fn) + throws IOException, ElasticsearchException { + return updateServiceType(fn.apply(new UpdateServiceTypeRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_status + + /** + * Updates the status of the connector + * + * @see Documentation + * on elastic.co + */ + + public UpdateStatusResponse updateStatus(UpdateStatusRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateStatusRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the status of the connector + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateStatusRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateStatusResponse updateStatus( + Function> fn) + throws IOException, ElasticsearchException { + return updateStatus(fn.apply(new UpdateStatusRequest.Builder()).build()); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FeatureEnabled.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FeatureEnabled.java new file mode 100644 index 000000000..13d2c8ad6 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FeatureEnabled.java @@ -0,0 +1,152 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FeatureEnabled + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FeatureEnabled implements JsonpSerializable { + private final boolean enabled; + + // --------------------------------------------------------------------------------------------- + + private FeatureEnabled(Builder builder) { + + this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled"); + + } + + public static FeatureEnabled of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code enabled} + */ + public final boolean enabled() { + return this.enabled; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("enabled"); + generator.write(this.enabled); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FeatureEnabled}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Boolean enabled; + + /** + * Required - API name: {@code enabled} + */ + public final Builder enabled(boolean value) { + this.enabled = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FeatureEnabled}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FeatureEnabled build() { + _checkSingleUse(); + + return new FeatureEnabled(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FeatureEnabled} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FeatureEnabled::setupFeatureEnabledDeserializer); + + protected static void setupFeatureEnabledDeserializer(ObjectDeserializer op) { + + op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java new file mode 100644 index 000000000..a36839618 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java @@ -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. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.DateTime; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringAdvancedSnippet + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringAdvancedSnippet implements JsonpSerializable { + @Nullable + private final DateTime createdAt; + + @Nullable + private final DateTime updatedAt; + + private final Map value; + + // --------------------------------------------------------------------------------------------- + + private FilteringAdvancedSnippet(Builder builder) { + + this.createdAt = builder.createdAt; + this.updatedAt = builder.updatedAt; + this.value = ApiTypeHelper.unmodifiableRequired(builder.value, this, "value"); + + } + + public static FilteringAdvancedSnippet of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code created_at} + */ + @Nullable + public final DateTime createdAt() { + return this.createdAt; + } + + /** + * API name: {@code updated_at} + */ + @Nullable + public final DateTime updatedAt() { + return this.updatedAt; + } + + /** + * Required - API name: {@code value} + */ + public final Map value() { + return this.value; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.createdAt != null) { + generator.writeKey("created_at"); + this.createdAt.serialize(generator, mapper); + } + if (this.updatedAt != null) { + generator.writeKey("updated_at"); + this.updatedAt.serialize(generator, mapper); + } + if (ApiTypeHelper.isDefined(this.value)) { + generator.writeKey("value"); + generator.writeStartObject(); + for (Map.Entry item0 : this.value.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringAdvancedSnippet}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private DateTime createdAt; + + @Nullable + private DateTime updatedAt; + + private Map value; + + /** + * API name: {@code created_at} + */ + public final Builder createdAt(@Nullable DateTime value) { + this.createdAt = value; + return this; + } + + /** + * API name: {@code updated_at} + */ + public final Builder updatedAt(@Nullable DateTime value) { + this.updatedAt = value; + return this; + } + + /** + * Required - API name: {@code value} + *

+ * Adds all entries of map to value. + */ + public final Builder value(Map map) { + this.value = _mapPutAll(this.value, map); + return this; + } + + /** + * Required - API name: {@code value} + *

+ * Adds an entry to value. + */ + public final Builder value(String key, JsonData value) { + this.value = _mapPut(this.value, key, value); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringAdvancedSnippet}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringAdvancedSnippet build() { + _checkSingleUse(); + + return new FilteringAdvancedSnippet(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringAdvancedSnippet} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, FilteringAdvancedSnippet::setupFilteringAdvancedSnippetDeserializer); + + protected static void setupFilteringAdvancedSnippetDeserializer( + ObjectDeserializer op) { + + op.add(Builder::createdAt, DateTime._DESERIALIZER, "created_at"); + op.add(Builder::updatedAt, DateTime._DESERIALIZER, "updated_at"); + op.add(Builder::value, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "value"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringConfig.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringConfig.java new file mode 100644 index 000000000..0473fda66 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringConfig.java @@ -0,0 +1,221 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringConfig + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringConfig implements JsonpSerializable { + private final FilteringRules active; + + @Nullable + private final String domain; + + private final FilteringRules draft; + + // --------------------------------------------------------------------------------------------- + + private FilteringConfig(Builder builder) { + + this.active = ApiTypeHelper.requireNonNull(builder.active, this, "active"); + this.domain = builder.domain; + this.draft = ApiTypeHelper.requireNonNull(builder.draft, this, "draft"); + + } + + public static FilteringConfig of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code active} + */ + public final FilteringRules active() { + return this.active; + } + + /** + * API name: {@code domain} + */ + @Nullable + public final String domain() { + return this.domain; + } + + /** + * Required - API name: {@code draft} + */ + public final FilteringRules draft() { + return this.draft; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("active"); + this.active.serialize(generator, mapper); + + if (this.domain != null) { + generator.writeKey("domain"); + generator.write(this.domain); + + } + generator.writeKey("draft"); + this.draft.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringConfig}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private FilteringRules active; + + @Nullable + private String domain; + + private FilteringRules draft; + + /** + * Required - API name: {@code active} + */ + public final Builder active(FilteringRules value) { + this.active = value; + return this; + } + + /** + * Required - API name: {@code active} + */ + public final Builder active(Function> fn) { + return this.active(fn.apply(new FilteringRules.Builder()).build()); + } + + /** + * API name: {@code domain} + */ + public final Builder domain(@Nullable String value) { + this.domain = value; + return this; + } + + /** + * Required - API name: {@code draft} + */ + public final Builder draft(FilteringRules value) { + this.draft = value; + return this; + } + + /** + * Required - API name: {@code draft} + */ + public final Builder draft(Function> fn) { + return this.draft(fn.apply(new FilteringRules.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringConfig}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringConfig build() { + _checkSingleUse(); + + return new FilteringConfig(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringConfig} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FilteringConfig::setupFilteringConfigDeserializer); + + protected static void setupFilteringConfigDeserializer(ObjectDeserializer op) { + + op.add(Builder::active, FilteringRules._DESERIALIZER, "active"); + op.add(Builder::domain, JsonpDeserializer.stringDeserializer(), "domain"); + op.add(Builder::draft, FilteringRules._DESERIALIZER, "draft"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringPolicy.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringPolicy.java new file mode 100644 index 000000000..e6c3c5d5f --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringPolicy.java @@ -0,0 +1,67 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum FilteringPolicy implements JsonEnum { + Exclude("exclude"), + + Include("include"), + + ; + + private final String jsonValue; + + FilteringPolicy(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + FilteringPolicy.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRule.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRule.java new file mode 100644 index 000000000..5b7431337 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRule.java @@ -0,0 +1,329 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.DateTime; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringRule + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringRule implements JsonpSerializable { + @Nullable + private final DateTime createdAt; + + private final String field; + + private final String id; + + private final int order; + + private final FilteringPolicy policy; + + private final FilteringRuleRule rule; + + @Nullable + private final DateTime updatedAt; + + private final String value; + + // --------------------------------------------------------------------------------------------- + + private FilteringRule(Builder builder) { + + this.createdAt = builder.createdAt; + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.order = ApiTypeHelper.requireNonNull(builder.order, this, "order"); + this.policy = ApiTypeHelper.requireNonNull(builder.policy, this, "policy"); + this.rule = ApiTypeHelper.requireNonNull(builder.rule, this, "rule"); + this.updatedAt = builder.updatedAt; + this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); + + } + + public static FilteringRule of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code created_at} + */ + @Nullable + public final DateTime createdAt() { + return this.createdAt; + } + + /** + * Required - API name: {@code field} + */ + public final String field() { + return this.field; + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Required - API name: {@code order} + */ + public final int order() { + return this.order; + } + + /** + * Required - API name: {@code policy} + */ + public final FilteringPolicy policy() { + return this.policy; + } + + /** + * Required - API name: {@code rule} + */ + public final FilteringRuleRule rule() { + return this.rule; + } + + /** + * API name: {@code updated_at} + */ + @Nullable + public final DateTime updatedAt() { + return this.updatedAt; + } + + /** + * Required - API name: {@code value} + */ + public final String value() { + return this.value; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.createdAt != null) { + generator.writeKey("created_at"); + this.createdAt.serialize(generator, mapper); + } + generator.writeKey("field"); + generator.write(this.field); + + generator.writeKey("id"); + generator.write(this.id); + + generator.writeKey("order"); + generator.write(this.order); + + generator.writeKey("policy"); + this.policy.serialize(generator, mapper); + generator.writeKey("rule"); + this.rule.serialize(generator, mapper); + if (this.updatedAt != null) { + generator.writeKey("updated_at"); + this.updatedAt.serialize(generator, mapper); + } + generator.writeKey("value"); + generator.write(this.value); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringRule}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private DateTime createdAt; + + private String field; + + private String id; + + private Integer order; + + private FilteringPolicy policy; + + private FilteringRuleRule rule; + + @Nullable + private DateTime updatedAt; + + private String value; + + /** + * API name: {@code created_at} + */ + public final Builder createdAt(@Nullable DateTime value) { + this.createdAt = value; + return this; + } + + /** + * Required - API name: {@code field} + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * Required - API name: {@code order} + */ + public final Builder order(int value) { + this.order = value; + return this; + } + + /** + * Required - API name: {@code policy} + */ + public final Builder policy(FilteringPolicy value) { + this.policy = value; + return this; + } + + /** + * Required - API name: {@code rule} + */ + public final Builder rule(FilteringRuleRule value) { + this.rule = value; + return this; + } + + /** + * API name: {@code updated_at} + */ + public final Builder updatedAt(@Nullable DateTime value) { + this.updatedAt = value; + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(String value) { + this.value = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringRule}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringRule build() { + _checkSingleUse(); + + return new FilteringRule(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringRule} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FilteringRule::setupFilteringRuleDeserializer); + + protected static void setupFilteringRuleDeserializer(ObjectDeserializer op) { + + op.add(Builder::createdAt, DateTime._DESERIALIZER, "created_at"); + op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::order, JsonpDeserializer.integerDeserializer(), "order"); + op.add(Builder::policy, FilteringPolicy._DESERIALIZER, "policy"); + op.add(Builder::rule, FilteringRuleRule._DESERIALIZER, "rule"); + op.add(Builder::updatedAt, DateTime._DESERIALIZER, "updated_at"); + op.add(Builder::value, JsonpDeserializer.stringDeserializer(), "value"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRuleRule.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRuleRule.java new file mode 100644 index 000000000..fe34e7223 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRuleRule.java @@ -0,0 +1,77 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum FilteringRuleRule implements JsonEnum { + Contains("contains"), + + EndsWith("ends_with"), + + Equals("equals"), + + Regex("regex"), + + StartsWith("starts_with"), + + GreaterThan(">"), + + LessThan("<"), + + ; + + private final String jsonValue; + + FilteringRuleRule(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + FilteringRuleRule.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRules.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRules.java new file mode 100644 index 000000000..577602f7c --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRules.java @@ -0,0 +1,245 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringRules + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringRules implements JsonpSerializable { + private final FilteringAdvancedSnippet advancedSnippet; + + private final List rules; + + private final FilteringRulesValidation validation; + + // --------------------------------------------------------------------------------------------- + + private FilteringRules(Builder builder) { + + this.advancedSnippet = ApiTypeHelper.requireNonNull(builder.advancedSnippet, this, "advancedSnippet"); + this.rules = ApiTypeHelper.unmodifiableRequired(builder.rules, this, "rules"); + this.validation = ApiTypeHelper.requireNonNull(builder.validation, this, "validation"); + + } + + public static FilteringRules of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code advanced_snippet} + */ + public final FilteringAdvancedSnippet advancedSnippet() { + return this.advancedSnippet; + } + + /** + * Required - API name: {@code rules} + */ + public final List rules() { + return this.rules; + } + + /** + * Required - API name: {@code validation} + */ + public final FilteringRulesValidation validation() { + return this.validation; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("advanced_snippet"); + this.advancedSnippet.serialize(generator, mapper); + + if (ApiTypeHelper.isDefined(this.rules)) { + generator.writeKey("rules"); + generator.writeStartArray(); + for (FilteringRule item0 : this.rules) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("validation"); + this.validation.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringRules}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private FilteringAdvancedSnippet advancedSnippet; + + private List rules; + + private FilteringRulesValidation validation; + + /** + * Required - API name: {@code advanced_snippet} + */ + public final Builder advancedSnippet(FilteringAdvancedSnippet value) { + this.advancedSnippet = value; + return this; + } + + /** + * Required - API name: {@code advanced_snippet} + */ + public final Builder advancedSnippet( + Function> fn) { + return this.advancedSnippet(fn.apply(new FilteringAdvancedSnippet.Builder()).build()); + } + + /** + * Required - API name: {@code rules} + *

+ * Adds all elements of list to rules. + */ + public final Builder rules(List list) { + this.rules = _listAddAll(this.rules, list); + return this; + } + + /** + * Required - API name: {@code rules} + *

+ * Adds one or more values to rules. + */ + public final Builder rules(FilteringRule value, FilteringRule... values) { + this.rules = _listAdd(this.rules, value, values); + return this; + } + + /** + * Required - API name: {@code rules} + *

+ * Adds a value to rules using a builder lambda. + */ + public final Builder rules(Function> fn) { + return rules(fn.apply(new FilteringRule.Builder()).build()); + } + + /** + * Required - API name: {@code validation} + */ + public final Builder validation(FilteringRulesValidation value) { + this.validation = value; + return this; + } + + /** + * Required - API name: {@code validation} + */ + public final Builder validation( + Function> fn) { + return this.validation(fn.apply(new FilteringRulesValidation.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringRules}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringRules build() { + _checkSingleUse(); + + return new FilteringRules(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringRules} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FilteringRules::setupFilteringRulesDeserializer); + + protected static void setupFilteringRulesDeserializer(ObjectDeserializer op) { + + op.add(Builder::advancedSnippet, FilteringAdvancedSnippet._DESERIALIZER, "advanced_snippet"); + op.add(Builder::rules, JsonpDeserializer.arrayDeserializer(FilteringRule._DESERIALIZER), "rules"); + op.add(Builder::validation, FilteringRulesValidation._DESERIALIZER, "validation"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRulesValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRulesValidation.java new file mode 100644 index 000000000..ca7c7f02f --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRulesValidation.java @@ -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. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringRulesValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringRulesValidation implements JsonpSerializable { + private final List errors; + + private final FilteringValidationState state; + + // --------------------------------------------------------------------------------------------- + + private FilteringRulesValidation(Builder builder) { + + this.errors = ApiTypeHelper.unmodifiableRequired(builder.errors, this, "errors"); + this.state = ApiTypeHelper.requireNonNull(builder.state, this, "state"); + + } + + public static FilteringRulesValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code errors} + */ + public final List errors() { + return this.errors; + } + + /** + * Required - API name: {@code state} + */ + public final FilteringValidationState state() { + return this.state; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.errors)) { + generator.writeKey("errors"); + generator.writeStartArray(); + for (FilteringValidation item0 : this.errors) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("state"); + this.state.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringRulesValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private List errors; + + private FilteringValidationState state; + + /** + * Required - API name: {@code errors} + *

+ * Adds all elements of list to errors. + */ + public final Builder errors(List list) { + this.errors = _listAddAll(this.errors, list); + return this; + } + + /** + * Required - API name: {@code errors} + *

+ * Adds one or more values to errors. + */ + public final Builder errors(FilteringValidation value, FilteringValidation... values) { + this.errors = _listAdd(this.errors, value, values); + return this; + } + + /** + * Required - API name: {@code errors} + *

+ * Adds a value to errors using a builder lambda. + */ + public final Builder errors(Function> fn) { + return errors(fn.apply(new FilteringValidation.Builder()).build()); + } + + /** + * Required - API name: {@code state} + */ + public final Builder state(FilteringValidationState value) { + this.state = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringRulesValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringRulesValidation build() { + _checkSingleUse(); + + return new FilteringRulesValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringRulesValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, FilteringRulesValidation::setupFilteringRulesValidationDeserializer); + + protected static void setupFilteringRulesValidationDeserializer( + ObjectDeserializer op) { + + op.add(Builder::errors, JsonpDeserializer.arrayDeserializer(FilteringValidation._DESERIALIZER), "errors"); + op.add(Builder::state, FilteringValidationState._DESERIALIZER, "state"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidation.java new file mode 100644 index 000000000..b97f661e2 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidation.java @@ -0,0 +1,221 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringValidation implements JsonpSerializable { + private final List ids; + + private final List messages; + + // --------------------------------------------------------------------------------------------- + + private FilteringValidation(Builder builder) { + + this.ids = ApiTypeHelper.unmodifiableRequired(builder.ids, this, "ids"); + this.messages = ApiTypeHelper.unmodifiableRequired(builder.messages, this, "messages"); + + } + + public static FilteringValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code ids} + */ + public final List ids() { + return this.ids; + } + + /** + * Required - API name: {@code messages} + */ + public final List messages() { + return this.messages; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.ids)) { + generator.writeKey("ids"); + generator.writeStartArray(); + for (String item0 : this.ids) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.messages)) { + generator.writeKey("messages"); + generator.writeStartArray(); + for (String item0 : this.messages) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private List ids; + + private List messages; + + /** + * Required - API name: {@code ids} + *

+ * Adds all elements of list to ids. + */ + public final Builder ids(List list) { + this.ids = _listAddAll(this.ids, list); + return this; + } + + /** + * Required - API name: {@code ids} + *

+ * Adds one or more values to ids. + */ + public final Builder ids(String value, String... values) { + this.ids = _listAdd(this.ids, value, values); + return this; + } + + /** + * Required - API name: {@code messages} + *

+ * Adds all elements of list to messages. + */ + public final Builder messages(List list) { + this.messages = _listAddAll(this.messages, list); + return this; + } + + /** + * Required - API name: {@code messages} + *

+ * Adds one or more values to messages. + */ + public final Builder messages(String value, String... values) { + this.messages = _listAdd(this.messages, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringValidation build() { + _checkSingleUse(); + + return new FilteringValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, FilteringValidation::setupFilteringValidationDeserializer); + + protected static void setupFilteringValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::ids, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "ids"); + op.add(Builder::messages, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "messages"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidationState.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidationState.java new file mode 100644 index 000000000..1111f24d1 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidationState.java @@ -0,0 +1,69 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum FilteringValidationState implements JsonEnum { + Edited("edited"), + + Invalid("invalid"), + + Valid("valid"), + + ; + + private final String jsonValue; + + FilteringValidationState(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + FilteringValidationState.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java new file mode 100644 index 000000000..9d9cd9328 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java @@ -0,0 +1,181 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.get.Request + +/** + * Retrieves a connector. + * + * @see API + * specification + */ + +public class GetConnectorRequest extends RequestBase { + private final String connectorId; + + // --------------------------------------------------------------------------------------------- + + private GetConnectorRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + + } + + public static GetConnectorRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GetConnectorRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + /** + * Required - The unique identifier of the connector + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GetConnectorRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GetConnectorRequest build() { + _checkSingleUse(); + + return new GetConnectorRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.get}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.get", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, GetConnectorResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorResponse.java new file mode 100644 index 000000000..d4b9fc44a --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorResponse.java @@ -0,0 +1,106 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.get.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GetConnectorResponse extends Connector { + // --------------------------------------------------------------------------------------------- + + private GetConnectorResponse(Builder builder) { + super(builder); + + } + + public static GetConnectorResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GetConnectorResponse}. + */ + + public static class Builder extends Connector.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GetConnectorResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GetConnectorResponse build() { + _checkSingleUse(); + + return new GetConnectorResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GetConnectorResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, GetConnectorResponse::setupGetConnectorResponseDeserializer); + + protected static void setupGetConnectorResponseDeserializer(ObjectDeserializer op) { + Connector.setupConnectorDeserializer(op); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GreaterThanValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GreaterThanValidation.java new file mode 100644 index 000000000..44e5bb722 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GreaterThanValidation.java @@ -0,0 +1,166 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Double; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.GreaterThanValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GreaterThanValidation implements ValidationVariant, JsonpSerializable { + private final double constraint; + + // --------------------------------------------------------------------------------------------- + + private GreaterThanValidation(Builder builder) { + + this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); + + } + + public static GreaterThanValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Validation variant kind. + */ + @Override + public Validation.Kind _validationKind() { + return Validation.Kind.GreaterThan; + } + + /** + * Required - API name: {@code constraint} + */ + public final double constraint() { + return this.constraint; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "greater_than"); + + generator.writeKey("constraint"); + generator.write(this.constraint); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GreaterThanValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Double constraint; + + /** + * Required - API name: {@code constraint} + */ + public final Builder constraint(double value) { + this.constraint = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GreaterThanValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GreaterThanValidation build() { + _checkSingleUse(); + + return new GreaterThanValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GreaterThanValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, GreaterThanValidation::setupGreaterThanValidationDeserializer); + + protected static void setupGreaterThanValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::constraint, JsonpDeserializer.doubleDeserializer(), "constraint"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IncludedInValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IncludedInValidation.java new file mode 100644 index 000000000..2046e5d48 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IncludedInValidation.java @@ -0,0 +1,197 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.FieldValue; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.IncludedInValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class IncludedInValidation implements ValidationVariant, JsonpSerializable { + private final List constraint; + + // --------------------------------------------------------------------------------------------- + + private IncludedInValidation(Builder builder) { + + this.constraint = ApiTypeHelper.unmodifiableRequired(builder.constraint, this, "constraint"); + + } + + public static IncludedInValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Validation variant kind. + */ + @Override + public Validation.Kind _validationKind() { + return Validation.Kind.IncludedIn; + } + + /** + * Required - API name: {@code constraint} + */ + public final List constraint() { + return this.constraint; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "included_in"); + + if (ApiTypeHelper.isDefined(this.constraint)) { + generator.writeKey("constraint"); + generator.writeStartArray(); + for (FieldValue item0 : this.constraint) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IncludedInValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private List constraint; + + /** + * Required - API name: {@code constraint} + *

+ * Adds all elements of list to constraint. + */ + public final Builder constraint(List list) { + this.constraint = _listAddAll(this.constraint, list); + return this; + } + + /** + * Required - API name: {@code constraint} + *

+ * Adds one or more values to constraint. + */ + public final Builder constraint(FieldValue value, FieldValue... values) { + this.constraint = _listAdd(this.constraint, value, values); + return this; + } + + /** + * Required - API name: {@code constraint} + *

+ * Adds a value to constraint using a builder lambda. + */ + public final Builder constraint(Function> fn) { + return constraint(fn.apply(new FieldValue.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link IncludedInValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IncludedInValidation build() { + _checkSingleUse(); + + return new IncludedInValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link IncludedInValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, IncludedInValidation::setupIncludedInValidationDeserializer); + + protected static void setupIncludedInValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::constraint, JsonpDeserializer.arrayDeserializer(FieldValue._DESERIALIZER), "constraint"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IngestPipelineParams.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IngestPipelineParams.java new file mode 100644 index 000000000..d6ae02a2b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IngestPipelineParams.java @@ -0,0 +1,230 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.IngestPipelineParams + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class IngestPipelineParams implements JsonpSerializable { + private final boolean extractBinaryContent; + + private final String name; + + private final boolean reduceWhitespace; + + private final boolean runMlInference; + + // --------------------------------------------------------------------------------------------- + + private IngestPipelineParams(Builder builder) { + + this.extractBinaryContent = ApiTypeHelper.requireNonNull(builder.extractBinaryContent, this, + "extractBinaryContent"); + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.reduceWhitespace = ApiTypeHelper.requireNonNull(builder.reduceWhitespace, this, "reduceWhitespace"); + this.runMlInference = ApiTypeHelper.requireNonNull(builder.runMlInference, this, "runMlInference"); + + } + + public static IngestPipelineParams of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code extract_binary_content} + */ + public final boolean extractBinaryContent() { + return this.extractBinaryContent; + } + + /** + * Required - API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * Required - API name: {@code reduce_whitespace} + */ + public final boolean reduceWhitespace() { + return this.reduceWhitespace; + } + + /** + * Required - API name: {@code run_ml_inference} + */ + public final boolean runMlInference() { + return this.runMlInference; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("extract_binary_content"); + generator.write(this.extractBinaryContent); + + generator.writeKey("name"); + generator.write(this.name); + + generator.writeKey("reduce_whitespace"); + generator.write(this.reduceWhitespace); + + generator.writeKey("run_ml_inference"); + generator.write(this.runMlInference); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IngestPipelineParams}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Boolean extractBinaryContent; + + private String name; + + private Boolean reduceWhitespace; + + private Boolean runMlInference; + + /** + * Required - API name: {@code extract_binary_content} + */ + public final Builder extractBinaryContent(boolean value) { + this.extractBinaryContent = value; + return this; + } + + /** + * Required - API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + /** + * Required - API name: {@code reduce_whitespace} + */ + public final Builder reduceWhitespace(boolean value) { + this.reduceWhitespace = value; + return this; + } + + /** + * Required - API name: {@code run_ml_inference} + */ + public final Builder runMlInference(boolean value) { + this.runMlInference = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link IngestPipelineParams}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IngestPipelineParams build() { + _checkSingleUse(); + + return new IngestPipelineParams(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link IngestPipelineParams} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, IngestPipelineParams::setupIngestPipelineParamsDeserializer); + + protected static void setupIngestPipelineParamsDeserializer(ObjectDeserializer op) { + + op.add(Builder::extractBinaryContent, JsonpDeserializer.booleanDeserializer(), "extract_binary_content"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::reduceWhitespace, JsonpDeserializer.booleanDeserializer(), "reduce_whitespace"); + op.add(Builder::runMlInference, JsonpDeserializer.booleanDeserializer(), "run_ml_inference"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/LessThanValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/LessThanValidation.java new file mode 100644 index 000000000..8ea89d561 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/LessThanValidation.java @@ -0,0 +1,166 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Double; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.LessThanValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class LessThanValidation implements ValidationVariant, JsonpSerializable { + private final double constraint; + + // --------------------------------------------------------------------------------------------- + + private LessThanValidation(Builder builder) { + + this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); + + } + + public static LessThanValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Validation variant kind. + */ + @Override + public Validation.Kind _validationKind() { + return Validation.Kind.LessThan; + } + + /** + * Required - API name: {@code constraint} + */ + public final double constraint() { + return this.constraint; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "less_than"); + + generator.writeKey("constraint"); + generator.write(this.constraint); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LessThanValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Double constraint; + + /** + * Required - API name: {@code constraint} + */ + public final Builder constraint(double value) { + this.constraint = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link LessThanValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LessThanValidation build() { + _checkSingleUse(); + + return new LessThanValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LessThanValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, LessThanValidation::setupLessThanValidationDeserializer); + + protected static void setupLessThanValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::constraint, JsonpDeserializer.doubleDeserializer(), "constraint"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java new file mode 100644 index 000000000..c290e19f7 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java @@ -0,0 +1,362 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Integer; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.list.Request + +/** + * Returns existing connectors. + * + * @see API + * specification + */ + +public class ListRequest extends RequestBase { + private final List connectorName; + + @Nullable + private final Integer from; + + private final List indexName; + + @Nullable + private final String query; + + private final List serviceType; + + @Nullable + private final Integer size; + + // --------------------------------------------------------------------------------------------- + + private ListRequest(Builder builder) { + + this.connectorName = ApiTypeHelper.unmodifiable(builder.connectorName); + this.from = builder.from; + this.indexName = ApiTypeHelper.unmodifiable(builder.indexName); + this.query = builder.query; + this.serviceType = ApiTypeHelper.unmodifiable(builder.serviceType); + this.size = builder.size; + + } + + public static ListRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * A comma-separated list of connector names to fetch connector documents for + *

+ * API name: {@code connector_name} + */ + public final List connectorName() { + return this.connectorName; + } + + /** + * Starting offset (default: 0) + *

+ * API name: {@code from} + */ + @Nullable + public final Integer from() { + return this.from; + } + + /** + * A comma-separated list of connector index names to fetch connector documents + * for + *

+ * API name: {@code index_name} + */ + public final List indexName() { + return this.indexName; + } + + /** + * A wildcard query string that filters connectors with matching name, + * description or index name + *

+ * API name: {@code query} + */ + @Nullable + public final String query() { + return this.query; + } + + /** + * A comma-separated list of connector service types to fetch connector + * documents for + *

+ * API name: {@code service_type} + */ + public final List serviceType() { + return this.serviceType; + } + + /** + * Specifies a max number of results to get + *

+ * API name: {@code size} + */ + @Nullable + public final Integer size() { + return this.size; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ListRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private List connectorName; + + @Nullable + private Integer from; + + @Nullable + private List indexName; + + @Nullable + private String query; + + @Nullable + private List serviceType; + + @Nullable + private Integer size; + + /** + * A comma-separated list of connector names to fetch connector documents for + *

+ * API name: {@code connector_name} + *

+ * Adds all elements of list to connectorName. + */ + public final Builder connectorName(List list) { + this.connectorName = _listAddAll(this.connectorName, list); + return this; + } + + /** + * A comma-separated list of connector names to fetch connector documents for + *

+ * API name: {@code connector_name} + *

+ * Adds one or more values to connectorName. + */ + public final Builder connectorName(String value, String... values) { + this.connectorName = _listAdd(this.connectorName, value, values); + return this; + } + + /** + * Starting offset (default: 0) + *

+ * API name: {@code from} + */ + public final Builder from(@Nullable Integer value) { + this.from = value; + return this; + } + + /** + * A comma-separated list of connector index names to fetch connector documents + * for + *

+ * API name: {@code index_name} + *

+ * Adds all elements of list to indexName. + */ + public final Builder indexName(List list) { + this.indexName = _listAddAll(this.indexName, list); + return this; + } + + /** + * A comma-separated list of connector index names to fetch connector documents + * for + *

+ * API name: {@code index_name} + *

+ * Adds one or more values to indexName. + */ + public final Builder indexName(String value, String... values) { + this.indexName = _listAdd(this.indexName, value, values); + return this; + } + + /** + * A wildcard query string that filters connectors with matching name, + * description or index name + *

+ * API name: {@code query} + */ + public final Builder query(@Nullable String value) { + this.query = value; + return this; + } + + /** + * A comma-separated list of connector service types to fetch connector + * documents for + *

+ * API name: {@code service_type} + *

+ * Adds all elements of list to serviceType. + */ + public final Builder serviceType(List list) { + this.serviceType = _listAddAll(this.serviceType, list); + return this; + } + + /** + * A comma-separated list of connector service types to fetch connector + * documents for + *

+ * API name: {@code service_type} + *

+ * Adds one or more values to serviceType. + */ + public final Builder serviceType(String value, String... values) { + this.serviceType = _listAdd(this.serviceType, value, values); + return this; + } + + /** + * Specifies a max number of results to get + *

+ * API name: {@code size} + */ + public final Builder size(@Nullable Integer value) { + this.size = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ListRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ListRequest build() { + _checkSingleUse(); + + return new ListRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.list}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.list", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + return "/_connector"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (ApiTypeHelper.isDefined(request.serviceType)) { + params.put("service_type", + request.serviceType.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (request.size != null) { + params.put("size", String.valueOf(request.size)); + } + if (request.query != null) { + params.put("query", request.query); + } + if (request.from != null) { + params.put("from", String.valueOf(request.from)); + } + if (ApiTypeHelper.isDefined(request.connectorName)) { + params.put("connector_name", + request.connectorName.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (ApiTypeHelper.isDefined(request.indexName)) { + params.put("index_name", request.indexName.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, ListResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListResponse.java new file mode 100644 index 000000000..fab2f74c1 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListResponse.java @@ -0,0 +1,207 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Long; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.list.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ListResponse implements JsonpSerializable { + private final long count; + + private final List results; + + // --------------------------------------------------------------------------------------------- + + private ListResponse(Builder builder) { + + this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count"); + this.results = ApiTypeHelper.unmodifiableRequired(builder.results, this, "results"); + + } + + public static ListResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code count} + */ + public final long count() { + return this.count; + } + + /** + * Required - API name: {@code results} + */ + public final List results() { + return this.results; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("count"); + generator.write(this.count); + + if (ApiTypeHelper.isDefined(this.results)) { + generator.writeKey("results"); + generator.writeStartArray(); + for (Connector item0 : this.results) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ListResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Long count; + + private List results; + + /** + * Required - API name: {@code count} + */ + public final Builder count(long value) { + this.count = value; + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds all elements of list to results. + */ + public final Builder results(List list) { + this.results = _listAddAll(this.results, list); + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds one or more values to results. + */ + public final Builder results(Connector value, Connector... values) { + this.results = _listAdd(this.results, value, values); + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds a value to results using a builder lambda. + */ + public final Builder results(Function> fn) { + return results(fn.apply(new Connector.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ListResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ListResponse build() { + _checkSingleUse(); + + return new ListResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ListResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ListResponse::setupListResponseDeserializer); + + protected static void setupListResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::count, JsonpDeserializer.longDeserializer(), "count"); + op.add(Builder::results, JsonpDeserializer.arrayDeserializer(Connector._DESERIALIZER), "results"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/Rank.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListTypeValidation.java similarity index 50% rename from java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/Rank.java rename to java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListTypeValidation.java index b1dbca7c3..96b0cbfb6 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/Rank.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListTypeValidation.java @@ -17,9 +17,8 @@ * under the License. */ -package co.elastic.clients.elasticsearch._types; +package co.elastic.clients.elasticsearch.connector; -import co.elastic.clients.json.JsonEnum; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -29,11 +28,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.TaggedUnion; -import co.elastic.clients.util.TaggedUnionUtils; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; -import java.lang.Object; +import java.lang.String; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -53,100 +50,60 @@ // //---------------------------------------------------------------- -// typedef: _types.RankContainer +// typedef: connector._types.ListTypeValidation /** * - * @see API + * @see API * specification */ @JsonpDeserializable -public class Rank implements TaggedUnion, JsonpSerializable { +public class ListTypeValidation implements ValidationVariant, JsonpSerializable { + private final String constraint; - /** - * {@link Rank} variant kinds. - * - * @see API - * specification - */ - - public enum Kind implements JsonEnum { - Rrf("rrf"), - - ; + // --------------------------------------------------------------------------------------------- - private final String jsonValue; + private ListTypeValidation(Builder builder) { - Kind(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String jsonValue() { - return this.jsonValue; - } + this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); } - private final Kind _kind; - private final Object _value; - - @Override - public final Kind _kind() { - return _kind; - } - - @Override - public final Object _get() { - return _value; - } - - public Rank(RankVariant value) { - - this._kind = ApiTypeHelper.requireNonNull(value._rankKind(), this, ""); - this._value = ApiTypeHelper.requireNonNull(value, this, ""); - - } - - private Rank(Builder builder) { - - this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); - this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); - - } - - public static Rank of(Function> fn) { + public static ListTypeValidation of(Function> fn) { return fn.apply(new Builder()).build(); } /** - * Is this variant instance of kind {@code rrf}? + * Validation variant kind. */ - public boolean isRrf() { - return _kind == Kind.Rrf; + @Override + public Validation.Kind _validationKind() { + return Validation.Kind.ListType; } /** - * Get the {@code rrf} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code rrf} kind. + * Required - API name: {@code constraint} */ - public RrfRank rrf() { - return TaggedUnionUtils.get(this, Kind.Rrf); + public final String constraint() { + return this.constraint; } - @Override - @SuppressWarnings("unchecked") + /** + * Serialize this object to JSON. + */ public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } - generator.writeKey(_kind.jsonValue()); - if (_value instanceof JsonpSerializable) { - ((JsonpSerializable) _value).serialize(generator, mapper); - } + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeEnd(); + generator.write("type", "list_type"); + + generator.writeKey("constraint"); + generator.write(this.constraint); } @@ -155,37 +112,56 @@ public String toString() { return JsonpUtils.toString(this); } - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private Kind _kind; - private Object _value; + // --------------------------------------------------------------------------------------------- - @Override - protected Builder self() { - return this; - } - public ObjectBuilder rrf(RrfRank v) { - this._kind = Kind.Rrf; - this._value = v; + /** + * Builder for {@link ListTypeValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private String constraint; + + /** + * Required - API name: {@code constraint} + */ + public final Builder constraint(String value) { + this.constraint = value; return this; } - public ObjectBuilder rrf(Function> fn) { - return this.rrf(fn.apply(new RrfRank.Builder()).build()); + @Override + protected Builder self() { + return this; } - public Rank build() { + /** + * Builds a {@link ListTypeValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ListTypeValidation build() { _checkSingleUse(); - return new Rank(this); - } + return new ListTypeValidation(this); + } } - protected static void setupRankDeserializer(ObjectDeserializer op) { + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ListTypeValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ListTypeValidation::setupListTypeValidationDeserializer); + + protected static void setupListTypeValidationDeserializer(ObjectDeserializer op) { - op.add(Builder::rrf, RrfRank._DESERIALIZER, "rrf"); + op.add(Builder::constraint, JsonpDeserializer.stringDeserializer(), "constraint"); + op.ignore("type"); } - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - Rank::setupRankDeserializer, Builder::build); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java new file mode 100644 index 000000000..2f34ed80d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java @@ -0,0 +1,333 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Collections; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.post.Request + +/** + * Creates a connector. + * + * @see API + * specification + */ +@JsonpDeserializable +public class PostRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final String description; + + @Nullable + private final String indexName; + + @Nullable + private final Boolean isNative; + + @Nullable + private final String language; + + @Nullable + private final String name; + + @Nullable + private final String serviceType; + + // --------------------------------------------------------------------------------------------- + + private PostRequest(Builder builder) { + + this.description = builder.description; + this.indexName = builder.indexName; + this.isNative = builder.isNative; + this.language = builder.language; + this.name = builder.name; + this.serviceType = builder.serviceType; + + } + + public static PostRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * API name: {@code index_name} + */ + @Nullable + public final String indexName() { + return this.indexName; + } + + /** + * API name: {@code is_native} + */ + @Nullable + public final Boolean isNative() { + return this.isNative; + } + + /** + * API name: {@code language} + */ + @Nullable + public final String language() { + return this.language; + } + + /** + * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * API name: {@code service_type} + */ + @Nullable + public final String serviceType() { + return this.serviceType; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + if (this.indexName != null) { + generator.writeKey("index_name"); + generator.write(this.indexName); + + } + if (this.isNative != null) { + generator.writeKey("is_native"); + generator.write(this.isNative); + + } + if (this.language != null) { + generator.writeKey("language"); + generator.write(this.language); + + } + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + + } + if (this.serviceType != null) { + generator.writeKey("service_type"); + generator.write(this.serviceType); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PostRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private String description; + + @Nullable + private String indexName; + + @Nullable + private Boolean isNative; + + @Nullable + private String language; + + @Nullable + private String name; + + @Nullable + private String serviceType; + + /** + * API name: {@code description} + */ + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * API name: {@code index_name} + */ + public final Builder indexName(@Nullable String value) { + this.indexName = value; + return this; + } + + /** + * API name: {@code is_native} + */ + public final Builder isNative(@Nullable Boolean value) { + this.isNative = value; + return this; + } + + /** + * API name: {@code language} + */ + public final Builder language(@Nullable String value) { + this.language = value; + return this; + } + + /** + * API name: {@code name} + */ + public final Builder name(@Nullable String value) { + this.name = value; + return this; + } + + /** + * API name: {@code service_type} + */ + public final Builder serviceType(@Nullable String value) { + this.serviceType = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PostRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PostRequest build() { + _checkSingleUse(); + + return new PostRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PostRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PostRequest::setupPostRequestDeserializer); + + protected static void setupPostRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); + op.add(Builder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); + op.add(Builder::language, JsonpDeserializer.stringDeserializer(), "language"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.post}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.post", + + // Request method + request -> { + return "POST"; + + }, + + // Request path + request -> { + return "/_connector"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, PostResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostResponse.java new file mode 100644 index 000000000..bbd2ca0e8 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostResponse.java @@ -0,0 +1,177 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.post.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class PostResponse implements JsonpSerializable { + private final Result result; + + private final String id; + + // --------------------------------------------------------------------------------------------- + + private PostResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + + } + + public static PostResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + generator.writeKey("id"); + generator.write(this.id); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PostResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Result result; + + private String id; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PostResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PostResponse build() { + _checkSingleUse(); + + return new PostResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PostResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PostResponse::setupPostResponseDeserializer); + + protected static void setupPostResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java new file mode 100644 index 000000000..49ca6b6b2 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java @@ -0,0 +1,396 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.put.Request + +/** + * Creates or updates a connector. + * + * @see API + * specification + */ +@JsonpDeserializable +public class PutRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final String connectorId; + + @Nullable + private final String description; + + @Nullable + private final String indexName; + + @Nullable + private final Boolean isNative; + + @Nullable + private final String language; + + @Nullable + private final String name; + + @Nullable + private final String serviceType; + + // --------------------------------------------------------------------------------------------- + + private PutRequest(Builder builder) { + + this.connectorId = builder.connectorId; + this.description = builder.description; + this.indexName = builder.indexName; + this.isNative = builder.isNative; + this.language = builder.language; + this.name = builder.name; + this.serviceType = builder.serviceType; + + } + + public static PutRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * The unique identifier of the connector to be created or updated. ID is + * auto-generated if not provided. + *

+ * API name: {@code connector_id} + */ + @Nullable + public final String connectorId() { + return this.connectorId; + } + + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * API name: {@code index_name} + */ + @Nullable + public final String indexName() { + return this.indexName; + } + + /** + * API name: {@code is_native} + */ + @Nullable + public final Boolean isNative() { + return this.isNative; + } + + /** + * API name: {@code language} + */ + @Nullable + public final String language() { + return this.language; + } + + /** + * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * API name: {@code service_type} + */ + @Nullable + public final String serviceType() { + return this.serviceType; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + if (this.indexName != null) { + generator.writeKey("index_name"); + generator.write(this.indexName); + + } + if (this.isNative != null) { + generator.writeKey("is_native"); + generator.write(this.isNative); + + } + if (this.language != null) { + generator.writeKey("language"); + generator.write(this.language); + + } + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + + } + if (this.serviceType != null) { + generator.writeKey("service_type"); + generator.write(this.serviceType); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PutRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private String connectorId; + + @Nullable + private String description; + + @Nullable + private String indexName; + + @Nullable + private Boolean isNative; + + @Nullable + private String language; + + @Nullable + private String name; + + @Nullable + private String serviceType; + + /** + * The unique identifier of the connector to be created or updated. ID is + * auto-generated if not provided. + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(@Nullable String value) { + this.connectorId = value; + return this; + } + + /** + * API name: {@code description} + */ + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * API name: {@code index_name} + */ + public final Builder indexName(@Nullable String value) { + this.indexName = value; + return this; + } + + /** + * API name: {@code is_native} + */ + public final Builder isNative(@Nullable Boolean value) { + this.isNative = value; + return this; + } + + /** + * API name: {@code language} + */ + public final Builder language(@Nullable String value) { + this.language = value; + return this; + } + + /** + * API name: {@code name} + */ + public final Builder name(@Nullable String value) { + this.name = value; + return this; + } + + /** + * API name: {@code service_type} + */ + public final Builder serviceType(@Nullable String value) { + this.serviceType = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PutRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PutRequest build() { + _checkSingleUse(); + + return new PutRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PutRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PutRequest::setupPutRequestDeserializer); + + protected static void setupPutRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); + op.add(Builder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); + op.add(Builder::language, JsonpDeserializer.stringDeserializer(), "language"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.put}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.put", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + if (request.connectorId() != null) + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + return buf.toString(); + } + if (propsSet == 0) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + if (request.connectorId() != null) + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + if (propsSet == 0) { + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, PutResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutResponse.java new file mode 100644 index 000000000..ddc5ee768 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutResponse.java @@ -0,0 +1,177 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.put.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class PutResponse implements JsonpSerializable { + private final Result result; + + private final String id; + + // --------------------------------------------------------------------------------------------- + + private PutResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + + } + + public static PutResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + generator.writeKey("id"); + generator.write(this.id); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PutResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Result result; + + private String id; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PutResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PutResponse build() { + _checkSingleUse(); + + return new PutResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PutResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PutResponse::setupPutResponseDeserializer); + + protected static void setupPutResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/RegexValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/RegexValidation.java new file mode 100644 index 000000000..ac3f410ba --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/RegexValidation.java @@ -0,0 +1,165 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.RegexValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class RegexValidation implements ValidationVariant, JsonpSerializable { + private final String constraint; + + // --------------------------------------------------------------------------------------------- + + private RegexValidation(Builder builder) { + + this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); + + } + + public static RegexValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Validation variant kind. + */ + @Override + public Validation.Kind _validationKind() { + return Validation.Kind.Regex; + } + + /** + * Required - API name: {@code constraint} + */ + public final String constraint() { + return this.constraint; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "regex"); + + generator.writeKey("constraint"); + generator.write(this.constraint); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RegexValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private String constraint; + + /** + * Required - API name: {@code constraint} + */ + public final Builder constraint(String value) { + this.constraint = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link RegexValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RegexValidation build() { + _checkSingleUse(); + + return new RegexValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RegexValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + RegexValidation::setupRegexValidationDeserializer); + + protected static void setupRegexValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::constraint, JsonpDeserializer.stringDeserializer(), "constraint"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SchedulingConfiguration.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SchedulingConfiguration.java new file mode 100644 index 000000000..8de91e1b3 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SchedulingConfiguration.java @@ -0,0 +1,241 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.SchedulingConfiguration + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SchedulingConfiguration implements JsonpSerializable { + @Nullable + private final ConnectorScheduling accessControl; + + @Nullable + private final ConnectorScheduling full; + + @Nullable + private final ConnectorScheduling incremental; + + // --------------------------------------------------------------------------------------------- + + private SchedulingConfiguration(Builder builder) { + + this.accessControl = builder.accessControl; + this.full = builder.full; + this.incremental = builder.incremental; + + } + + public static SchedulingConfiguration of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code access_control} + */ + @Nullable + public final ConnectorScheduling accessControl() { + return this.accessControl; + } + + /** + * API name: {@code full} + */ + @Nullable + public final ConnectorScheduling full() { + return this.full; + } + + /** + * API name: {@code incremental} + */ + @Nullable + public final ConnectorScheduling incremental() { + return this.incremental; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.accessControl != null) { + generator.writeKey("access_control"); + this.accessControl.serialize(generator, mapper); + + } + if (this.full != null) { + generator.writeKey("full"); + this.full.serialize(generator, mapper); + + } + if (this.incremental != null) { + generator.writeKey("incremental"); + this.incremental.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SchedulingConfiguration}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private ConnectorScheduling accessControl; + + @Nullable + private ConnectorScheduling full; + + @Nullable + private ConnectorScheduling incremental; + + /** + * API name: {@code access_control} + */ + public final Builder accessControl(@Nullable ConnectorScheduling value) { + this.accessControl = value; + return this; + } + + /** + * API name: {@code access_control} + */ + public final Builder accessControl( + Function> fn) { + return this.accessControl(fn.apply(new ConnectorScheduling.Builder()).build()); + } + + /** + * API name: {@code full} + */ + public final Builder full(@Nullable ConnectorScheduling value) { + this.full = value; + return this; + } + + /** + * API name: {@code full} + */ + public final Builder full(Function> fn) { + return this.full(fn.apply(new ConnectorScheduling.Builder()).build()); + } + + /** + * API name: {@code incremental} + */ + public final Builder incremental(@Nullable ConnectorScheduling value) { + this.incremental = value; + return this; + } + + /** + * API name: {@code incremental} + */ + public final Builder incremental(Function> fn) { + return this.incremental(fn.apply(new ConnectorScheduling.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SchedulingConfiguration}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SchedulingConfiguration build() { + _checkSingleUse(); + + return new SchedulingConfiguration(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SchedulingConfiguration} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SchedulingConfiguration::setupSchedulingConfigurationDeserializer); + + protected static void setupSchedulingConfigurationDeserializer( + ObjectDeserializer op) { + + op.add(Builder::accessControl, ConnectorScheduling._DESERIALIZER, "access_control"); + op.add(Builder::full, ConnectorScheduling._DESERIALIZER, "full"); + op.add(Builder::incremental, ConnectorScheduling._DESERIALIZER, "incremental"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SelectOption.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SelectOption.java new file mode 100644 index 000000000..18b2c3e1d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SelectOption.java @@ -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. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.FieldValue; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.SelectOption + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SelectOption implements JsonpSerializable { + private final String label; + + private final FieldValue value; + + // --------------------------------------------------------------------------------------------- + + private SelectOption(Builder builder) { + + this.label = ApiTypeHelper.requireNonNull(builder.label, this, "label"); + this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); + + } + + public static SelectOption of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code label} + */ + public final String label() { + return this.label; + } + + /** + * Required - API name: {@code value} + */ + public final FieldValue value() { + return this.value; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("label"); + generator.write(this.label); + + generator.writeKey("value"); + this.value.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SelectOption}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private String label; + + private FieldValue value; + + /** + * Required - API name: {@code label} + */ + public final Builder label(String value) { + this.label = value; + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(FieldValue value) { + this.value = value; + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(Function> fn) { + return this.value(fn.apply(new FieldValue.Builder()).build()); + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(String value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(long value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(double value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(boolean value) { + this.value = FieldValue.of(value); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SelectOption}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SelectOption build() { + _checkSingleUse(); + + return new SelectOption(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SelectOption} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SelectOption::setupSelectOptionDeserializer); + + protected static void setupSelectOptionDeserializer(ObjectDeserializer op) { + + op.add(Builder::label, JsonpDeserializer.stringDeserializer(), "label"); + op.add(Builder::value, FieldValue._DESERIALIZER, "value"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java new file mode 100644 index 000000000..d87926d47 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java @@ -0,0 +1,184 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_cancel.Request + +/** + * Cancels a connector sync job. + * + * @see API + * specification + */ + +public class SyncJobCancelRequest extends RequestBase { + private final String connectorSyncJobId; + + // --------------------------------------------------------------------------------------------- + + private SyncJobCancelRequest(Builder builder) { + + this.connectorSyncJobId = ApiTypeHelper.requireNonNull(builder.connectorSyncJobId, this, "connectorSyncJobId"); + + } + + public static SyncJobCancelRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector sync job + *

+ * API name: {@code connector_sync_job_id} + */ + public final String connectorSyncJobId() { + return this.connectorSyncJobId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobCancelRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorSyncJobId; + + /** + * Required - The unique identifier of the connector sync job + *

+ * API name: {@code connector_sync_job_id} + */ + public final Builder connectorSyncJobId(String value) { + this.connectorSyncJobId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobCancelRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobCancelRequest build() { + _checkSingleUse(); + + return new SyncJobCancelRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.sync_job_cancel}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.sync_job_cancel", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/_sync_job"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorSyncJobId, buf); + buf.append("/_cancel"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + params.put("connectorSyncJobId", request.connectorSyncJobId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, SyncJobCancelResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelResponse.java new file mode 100644 index 000000000..d3a36d231 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelResponse.java @@ -0,0 +1,156 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_cancel.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobCancelResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private SyncJobCancelResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static SyncJobCancelResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobCancelResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobCancelResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobCancelResponse build() { + _checkSingleUse(); + + return new SyncJobCancelResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobCancelResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobCancelResponse::setupSyncJobCancelResponseDeserializer); + + protected static void setupSyncJobCancelResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobConnectorReference.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobConnectorReference.java new file mode 100644 index 000000000..63da62e44 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobConnectorReference.java @@ -0,0 +1,388 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.SyncJobConnectorReference + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobConnectorReference implements JsonpSerializable { + private final Map configuration; + + private final FilteringRules filtering; + + private final String id; + + private final String indexName; + + @Nullable + private final String language; + + @Nullable + private final IngestPipelineParams pipeline; + + private final String serviceType; + + @Nullable + private final JsonData syncCursor; + + // --------------------------------------------------------------------------------------------- + + private SyncJobConnectorReference(Builder builder) { + + this.configuration = ApiTypeHelper.unmodifiableRequired(builder.configuration, this, "configuration"); + this.filtering = ApiTypeHelper.requireNonNull(builder.filtering, this, "filtering"); + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.indexName = ApiTypeHelper.requireNonNull(builder.indexName, this, "indexName"); + this.language = builder.language; + this.pipeline = builder.pipeline; + this.serviceType = ApiTypeHelper.requireNonNull(builder.serviceType, this, "serviceType"); + this.syncCursor = builder.syncCursor; + + } + + public static SyncJobConnectorReference of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code configuration} + */ + public final Map configuration() { + return this.configuration; + } + + /** + * Required - API name: {@code filtering} + */ + public final FilteringRules filtering() { + return this.filtering; + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Required - API name: {@code index_name} + */ + public final String indexName() { + return this.indexName; + } + + /** + * API name: {@code language} + */ + @Nullable + public final String language() { + return this.language; + } + + /** + * API name: {@code pipeline} + */ + @Nullable + public final IngestPipelineParams pipeline() { + return this.pipeline; + } + + /** + * Required - API name: {@code service_type} + */ + public final String serviceType() { + return this.serviceType; + } + + /** + * API name: {@code sync_cursor} + */ + @Nullable + public final JsonData syncCursor() { + return this.syncCursor; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.configuration)) { + generator.writeKey("configuration"); + generator.writeStartObject(); + for (Map.Entry item0 : this.configuration.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("filtering"); + this.filtering.serialize(generator, mapper); + + generator.writeKey("id"); + generator.write(this.id); + + generator.writeKey("index_name"); + generator.write(this.indexName); + + if (this.language != null) { + generator.writeKey("language"); + generator.write(this.language); + + } + if (this.pipeline != null) { + generator.writeKey("pipeline"); + this.pipeline.serialize(generator, mapper); + + } + generator.writeKey("service_type"); + generator.write(this.serviceType); + + if (this.syncCursor != null) { + generator.writeKey("sync_cursor"); + this.syncCursor.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobConnectorReference}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Map configuration; + + private FilteringRules filtering; + + private String id; + + private String indexName; + + @Nullable + private String language; + + @Nullable + private IngestPipelineParams pipeline; + + private String serviceType; + + @Nullable + private JsonData syncCursor; + + /** + * Required - API name: {@code configuration} + *

+ * Adds all entries of map to configuration. + */ + public final Builder configuration(Map map) { + this.configuration = _mapPutAll(this.configuration, map); + return this; + } + + /** + * Required - API name: {@code configuration} + *

+ * Adds an entry to configuration. + */ + public final Builder configuration(String key, ConnectorConfigProperties value) { + this.configuration = _mapPut(this.configuration, key, value); + return this; + } + + /** + * Required - API name: {@code configuration} + *

+ * Adds an entry to configuration using a builder lambda. + */ + public final Builder configuration(String key, + Function> fn) { + return configuration(key, fn.apply(new ConnectorConfigProperties.Builder()).build()); + } + + /** + * Required - API name: {@code filtering} + */ + public final Builder filtering(FilteringRules value) { + this.filtering = value; + return this; + } + + /** + * Required - API name: {@code filtering} + */ + public final Builder filtering(Function> fn) { + return this.filtering(fn.apply(new FilteringRules.Builder()).build()); + } + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * Required - API name: {@code index_name} + */ + public final Builder indexName(String value) { + this.indexName = value; + return this; + } + + /** + * API name: {@code language} + */ + public final Builder language(@Nullable String value) { + this.language = value; + return this; + } + + /** + * API name: {@code pipeline} + */ + public final Builder pipeline(@Nullable IngestPipelineParams value) { + this.pipeline = value; + return this; + } + + /** + * API name: {@code pipeline} + */ + public final Builder pipeline(Function> fn) { + return this.pipeline(fn.apply(new IngestPipelineParams.Builder()).build()); + } + + /** + * Required - API name: {@code service_type} + */ + public final Builder serviceType(String value) { + this.serviceType = value; + return this; + } + + /** + * API name: {@code sync_cursor} + */ + public final Builder syncCursor(@Nullable JsonData value) { + this.syncCursor = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobConnectorReference}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobConnectorReference build() { + _checkSingleUse(); + + return new SyncJobConnectorReference(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobConnectorReference} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobConnectorReference::setupSyncJobConnectorReferenceDeserializer); + + protected static void setupSyncJobConnectorReferenceDeserializer( + ObjectDeserializer op) { + + op.add(Builder::configuration, JsonpDeserializer.stringMapDeserializer(ConnectorConfigProperties._DESERIALIZER), + "configuration"); + op.add(Builder::filtering, FilteringRules._DESERIALIZER, "filtering"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); + op.add(Builder::language, JsonpDeserializer.stringDeserializer(), "language"); + op.add(Builder::pipeline, IngestPipelineParams._DESERIALIZER, "pipeline"); + op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); + op.add(Builder::syncCursor, JsonData._DESERIALIZER, "sync_cursor"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java new file mode 100644 index 000000000..7fabf48c1 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java @@ -0,0 +1,183 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_delete.Request + +/** + * Deletes a connector sync job. + * + * @see API + * specification + */ + +public class SyncJobDeleteRequest extends RequestBase { + private final String connectorSyncJobId; + + // --------------------------------------------------------------------------------------------- + + private SyncJobDeleteRequest(Builder builder) { + + this.connectorSyncJobId = ApiTypeHelper.requireNonNull(builder.connectorSyncJobId, this, "connectorSyncJobId"); + + } + + public static SyncJobDeleteRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector sync job to be deleted + *

+ * API name: {@code connector_sync_job_id} + */ + public final String connectorSyncJobId() { + return this.connectorSyncJobId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobDeleteRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorSyncJobId; + + /** + * Required - The unique identifier of the connector sync job to be deleted + *

+ * API name: {@code connector_sync_job_id} + */ + public final Builder connectorSyncJobId(String value) { + this.connectorSyncJobId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobDeleteRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobDeleteRequest build() { + _checkSingleUse(); + + return new SyncJobDeleteRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.sync_job_delete}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.sync_job_delete", + + // Request method + request -> { + return "DELETE"; + + }, + + // Request path + request -> { + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/_sync_job"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorSyncJobId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + params.put("connectorSyncJobId", request.connectorSyncJobId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, SyncJobDeleteResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteResponse.java new file mode 100644 index 000000000..95b7a101b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteResponse.java @@ -0,0 +1,108 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.AcknowledgedResponseBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_delete.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobDeleteResponse extends AcknowledgedResponseBase { + // --------------------------------------------------------------------------------------------- + + private SyncJobDeleteResponse(Builder builder) { + super(builder); + + } + + public static SyncJobDeleteResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobDeleteResponse}. + */ + + public static class Builder extends AcknowledgedResponseBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobDeleteResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobDeleteResponse build() { + _checkSingleUse(); + + return new SyncJobDeleteResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobDeleteResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobDeleteResponse::setupSyncJobDeleteResponseDeserializer); + + protected static void setupSyncJobDeleteResponseDeserializer(ObjectDeserializer op) { + AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java new file mode 100644 index 000000000..16bb24995 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java @@ -0,0 +1,182 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_get.Request + +/** + * Retrieves a connector sync job. + * + * @see API + * specification + */ + +public class SyncJobGetRequest extends RequestBase { + private final String connectorSyncJobId; + + // --------------------------------------------------------------------------------------------- + + private SyncJobGetRequest(Builder builder) { + + this.connectorSyncJobId = ApiTypeHelper.requireNonNull(builder.connectorSyncJobId, this, "connectorSyncJobId"); + + } + + public static SyncJobGetRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector sync job + *

+ * API name: {@code connector_sync_job_id} + */ + public final String connectorSyncJobId() { + return this.connectorSyncJobId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobGetRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorSyncJobId; + + /** + * Required - The unique identifier of the connector sync job + *

+ * API name: {@code connector_sync_job_id} + */ + public final Builder connectorSyncJobId(String value) { + this.connectorSyncJobId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobGetRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobGetRequest build() { + _checkSingleUse(); + + return new SyncJobGetRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.sync_job_get}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.sync_job_get", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/_sync_job"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorSyncJobId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + params.put("connectorSyncJobId", request.connectorSyncJobId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, SyncJobGetResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetResponse.java new file mode 100644 index 000000000..510cc6257 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetResponse.java @@ -0,0 +1,106 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_get.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobGetResponse extends ConnectorSyncJob { + // --------------------------------------------------------------------------------------------- + + private SyncJobGetResponse(Builder builder) { + super(builder); + + } + + public static SyncJobGetResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobGetResponse}. + */ + + public static class Builder extends ConnectorSyncJob.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobGetResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobGetResponse build() { + _checkSingleUse(); + + return new SyncJobGetResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobGetResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobGetResponse::setupSyncJobGetResponseDeserializer); + + protected static void setupSyncJobGetResponseDeserializer(ObjectDeserializer op) { + ConnectorSyncJob.setupConnectorSyncJobDeserializer(op); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java new file mode 100644 index 000000000..884e96a94 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java @@ -0,0 +1,301 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Integer; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_list.Request + +/** + * Lists connector sync jobs. + * + * @see API + * specification + */ + +public class SyncJobListRequest extends RequestBase { + @Nullable + private final String connectorId; + + @Nullable + private final Integer from; + + private final List jobType; + + @Nullable + private final Integer size; + + @Nullable + private final SyncStatus status; + + // --------------------------------------------------------------------------------------------- + + private SyncJobListRequest(Builder builder) { + + this.connectorId = builder.connectorId; + this.from = builder.from; + this.jobType = ApiTypeHelper.unmodifiable(builder.jobType); + this.size = builder.size; + this.status = builder.status; + + } + + public static SyncJobListRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * A connector id to fetch connector sync jobs for + *

+ * API name: {@code connector_id} + */ + @Nullable + public final String connectorId() { + return this.connectorId; + } + + /** + * Starting offset (default: 0) + *

+ * API name: {@code from} + */ + @Nullable + public final Integer from() { + return this.from; + } + + /** + * A comma-separated list of job types to fetch the sync jobs for + *

+ * API name: {@code job_type} + */ + public final List jobType() { + return this.jobType; + } + + /** + * Specifies a max number of results to get + *

+ * API name: {@code size} + */ + @Nullable + public final Integer size() { + return this.size; + } + + /** + * A sync job status to fetch connector sync jobs for + *

+ * API name: {@code status} + */ + @Nullable + public final SyncStatus status() { + return this.status; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobListRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private String connectorId; + + @Nullable + private Integer from; + + @Nullable + private List jobType; + + @Nullable + private Integer size; + + @Nullable + private SyncStatus status; + + /** + * A connector id to fetch connector sync jobs for + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(@Nullable String value) { + this.connectorId = value; + return this; + } + + /** + * Starting offset (default: 0) + *

+ * API name: {@code from} + */ + public final Builder from(@Nullable Integer value) { + this.from = value; + return this; + } + + /** + * A comma-separated list of job types to fetch the sync jobs for + *

+ * API name: {@code job_type} + *

+ * Adds all elements of list to jobType. + */ + public final Builder jobType(List list) { + this.jobType = _listAddAll(this.jobType, list); + return this; + } + + /** + * A comma-separated list of job types to fetch the sync jobs for + *

+ * API name: {@code job_type} + *

+ * Adds one or more values to jobType. + */ + public final Builder jobType(SyncJobType value, SyncJobType... values) { + this.jobType = _listAdd(this.jobType, value, values); + return this; + } + + /** + * Specifies a max number of results to get + *

+ * API name: {@code size} + */ + public final Builder size(@Nullable Integer value) { + this.size = value; + return this; + } + + /** + * A sync job status to fetch connector sync jobs for + *

+ * API name: {@code status} + */ + public final Builder status(@Nullable SyncStatus value) { + this.status = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobListRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobListRequest build() { + _checkSingleUse(); + + return new SyncJobListRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.sync_job_list}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.sync_job_list", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + return "/_connector/_sync_job"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (ApiTypeHelper.isDefined(request.jobType)) { + params.put("job_type", + request.jobType.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); + } + if (request.size != null) { + params.put("size", String.valueOf(request.size)); + } + if (request.connectorId != null) { + params.put("connector_id", request.connectorId); + } + if (request.from != null) { + params.put("from", String.valueOf(request.from)); + } + if (request.status != null) { + params.put("status", request.status.jsonValue()); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, SyncJobListResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListResponse.java new file mode 100644 index 000000000..210545d41 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListResponse.java @@ -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. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Long; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_list.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobListResponse implements JsonpSerializable { + private final long count; + + private final List results; + + // --------------------------------------------------------------------------------------------- + + private SyncJobListResponse(Builder builder) { + + this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count"); + this.results = ApiTypeHelper.unmodifiableRequired(builder.results, this, "results"); + + } + + public static SyncJobListResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code count} + */ + public final long count() { + return this.count; + } + + /** + * Required - API name: {@code results} + */ + public final List results() { + return this.results; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("count"); + generator.write(this.count); + + if (ApiTypeHelper.isDefined(this.results)) { + generator.writeKey("results"); + generator.writeStartArray(); + for (ConnectorSyncJob item0 : this.results) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobListResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Long count; + + private List results; + + /** + * Required - API name: {@code count} + */ + public final Builder count(long value) { + this.count = value; + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds all elements of list to results. + */ + public final Builder results(List list) { + this.results = _listAddAll(this.results, list); + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds one or more values to results. + */ + public final Builder results(ConnectorSyncJob value, ConnectorSyncJob... values) { + this.results = _listAdd(this.results, value, values); + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds a value to results using a builder lambda. + */ + public final Builder results(Function> fn) { + return results(fn.apply(new ConnectorSyncJob.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobListResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobListResponse build() { + _checkSingleUse(); + + return new SyncJobListResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobListResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobListResponse::setupSyncJobListResponseDeserializer); + + protected static void setupSyncJobListResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::count, JsonpDeserializer.longDeserializer(), "count"); + op.add(Builder::results, JsonpDeserializer.arrayDeserializer(ConnectorSyncJob._DESERIALIZER), "results"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java new file mode 100644 index 000000000..88290cfea --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java @@ -0,0 +1,245 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_post.Request + +/** + * Creates a connector sync job. + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobPostRequest extends RequestBase implements JsonpSerializable { + private final String id; + + @Nullable + private final SyncJobType jobType; + + @Nullable + private final SyncJobTriggerMethod triggerMethod; + + // --------------------------------------------------------------------------------------------- + + private SyncJobPostRequest(Builder builder) { + + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.jobType = builder.jobType; + this.triggerMethod = builder.triggerMethod; + + } + + public static SyncJobPostRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The id of the associated connector + *

+ * API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * API name: {@code job_type} + */ + @Nullable + public final SyncJobType jobType() { + return this.jobType; + } + + /** + * API name: {@code trigger_method} + */ + @Nullable + public final SyncJobTriggerMethod triggerMethod() { + return this.triggerMethod; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("id"); + generator.write(this.id); + + if (this.jobType != null) { + generator.writeKey("job_type"); + this.jobType.serialize(generator, mapper); + } + if (this.triggerMethod != null) { + generator.writeKey("trigger_method"); + this.triggerMethod.serialize(generator, mapper); + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobPostRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String id; + + @Nullable + private SyncJobType jobType; + + @Nullable + private SyncJobTriggerMethod triggerMethod; + + /** + * Required - The id of the associated connector + *

+ * API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * API name: {@code job_type} + */ + public final Builder jobType(@Nullable SyncJobType value) { + this.jobType = value; + return this; + } + + /** + * API name: {@code trigger_method} + */ + public final Builder triggerMethod(@Nullable SyncJobTriggerMethod value) { + this.triggerMethod = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobPostRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobPostRequest build() { + _checkSingleUse(); + + return new SyncJobPostRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobPostRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobPostRequest::setupSyncJobPostRequestDeserializer); + + protected static void setupSyncJobPostRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::jobType, SyncJobType._DESERIALIZER, "job_type"); + op.add(Builder::triggerMethod, SyncJobTriggerMethod._DESERIALIZER, "trigger_method"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.sync_job_post}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.sync_job_post", + + // Request method + request -> { + return "POST"; + + }, + + // Request path + request -> { + return "/_connector/_sync_job"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, SyncJobPostResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostResponse.java new file mode 100644 index 000000000..cb55d6e6b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostResponse.java @@ -0,0 +1,156 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_post.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobPostResponse implements JsonpSerializable { + private final String id; + + // --------------------------------------------------------------------------------------------- + + private SyncJobPostResponse(Builder builder) { + + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + + } + + public static SyncJobPostResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("id"); + generator.write(this.id); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobPostResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private String id; + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobPostResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobPostResponse build() { + _checkSingleUse(); + + return new SyncJobPostResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobPostResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobPostResponse::setupSyncJobPostResponseDeserializer); + + protected static void setupSyncJobPostResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobTriggerMethod.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobTriggerMethod.java new file mode 100644 index 000000000..d9ece5d16 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobTriggerMethod.java @@ -0,0 +1,67 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum SyncJobTriggerMethod implements JsonEnum { + OnDemand("on_demand"), + + Scheduled("scheduled"), + + ; + + private final String jsonValue; + + SyncJobTriggerMethod(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + SyncJobTriggerMethod.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobType.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobType.java new file mode 100644 index 000000000..f83282d4b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobType.java @@ -0,0 +1,68 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum SyncJobType implements JsonEnum { + Full("full"), + + Incremental("incremental"), + + AccessControl("access_control"), + + ; + + private final String jsonValue; + + SyncJobType(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + SyncJobType.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncRulesFeature.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncRulesFeature.java new file mode 100644 index 000000000..68fa4f46a --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncRulesFeature.java @@ -0,0 +1,201 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.SyncRulesFeature + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncRulesFeature implements JsonpSerializable { + @Nullable + private final FeatureEnabled advanced; + + @Nullable + private final FeatureEnabled basic; + + // --------------------------------------------------------------------------------------------- + + private SyncRulesFeature(Builder builder) { + + this.advanced = builder.advanced; + this.basic = builder.basic; + + } + + public static SyncRulesFeature of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code advanced} + */ + @Nullable + public final FeatureEnabled advanced() { + return this.advanced; + } + + /** + * API name: {@code basic} + */ + @Nullable + public final FeatureEnabled basic() { + return this.basic; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.advanced != null) { + generator.writeKey("advanced"); + this.advanced.serialize(generator, mapper); + + } + if (this.basic != null) { + generator.writeKey("basic"); + this.basic.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncRulesFeature}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private FeatureEnabled advanced; + + @Nullable + private FeatureEnabled basic; + + /** + * API name: {@code advanced} + */ + public final Builder advanced(@Nullable FeatureEnabled value) { + this.advanced = value; + return this; + } + + /** + * API name: {@code advanced} + */ + public final Builder advanced(Function> fn) { + return this.advanced(fn.apply(new FeatureEnabled.Builder()).build()); + } + + /** + * API name: {@code basic} + */ + public final Builder basic(@Nullable FeatureEnabled value) { + this.basic = value; + return this; + } + + /** + * API name: {@code basic} + */ + public final Builder basic(Function> fn) { + return this.basic(fn.apply(new FeatureEnabled.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncRulesFeature}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncRulesFeature build() { + _checkSingleUse(); + + return new SyncRulesFeature(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncRulesFeature} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SyncRulesFeature::setupSyncRulesFeatureDeserializer); + + protected static void setupSyncRulesFeatureDeserializer(ObjectDeserializer op) { + + op.add(Builder::advanced, FeatureEnabled._DESERIALIZER, "advanced"); + op.add(Builder::basic, FeatureEnabled._DESERIALIZER, "basic"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncStatus.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncStatus.java new file mode 100644 index 000000000..80514495b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncStatus.java @@ -0,0 +1,76 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum SyncStatus implements JsonEnum { + Canceling("canceling"), + + Canceled("canceled"), + + Completed("completed"), + + Error("error"), + + InProgress("in_progress"), + + Pending("pending"), + + Suspended("suspended"), + + ; + + private final String jsonValue; + + SyncStatus(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + SyncStatus.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java new file mode 100644 index 000000000..518494566 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java @@ -0,0 +1,184 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_active_filtering.Request + +/** + * Activates the valid draft filtering for a connector. + * + * @see API + * specification + */ + +public class UpdateActiveFilteringRequest extends RequestBase { + private final String connectorId; + + // --------------------------------------------------------------------------------------------- + + private UpdateActiveFilteringRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + + } + + public static UpdateActiveFilteringRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateActiveFilteringRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateActiveFilteringRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateActiveFilteringRequest build() { + _checkSingleUse(); + + return new UpdateActiveFilteringRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_active_filtering}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_active_filtering", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_filtering"); + buf.append("/_activate"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, UpdateActiveFilteringResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringResponse.java new file mode 100644 index 000000000..42011066e --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_active_filtering.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateActiveFilteringResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateActiveFilteringResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateActiveFilteringResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateActiveFilteringResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateActiveFilteringResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateActiveFilteringResponse build() { + _checkSingleUse(); + + return new UpdateActiveFilteringResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateActiveFilteringResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateActiveFilteringResponse::setupUpdateActiveFilteringResponseDeserializer); + + protected static void setupUpdateActiveFilteringResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdRequest.java new file mode 100644 index 000000000..ec1beb3a5 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdRequest.java @@ -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. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_api_key_id.Request + +/** + * Updates the API key id in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateApiKeyIdRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final String apiKeyId; + + @Nullable + private final String apiKeySecretId; + + private final String connectorId; + + // --------------------------------------------------------------------------------------------- + + private UpdateApiKeyIdRequest(Builder builder) { + + this.apiKeyId = builder.apiKeyId; + this.apiKeySecretId = builder.apiKeySecretId; + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + + } + + public static UpdateApiKeyIdRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code api_key_id} + */ + @Nullable + public final String apiKeyId() { + return this.apiKeyId; + } + + /** + * API name: {@code api_key_secret_id} + */ + @Nullable + public final String apiKeySecretId() { + return this.apiKeySecretId; + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.apiKeyId != null) { + generator.writeKey("api_key_id"); + generator.write(this.apiKeyId); + + } + if (this.apiKeySecretId != null) { + generator.writeKey("api_key_secret_id"); + generator.write(this.apiKeySecretId); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateApiKeyIdRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private String apiKeyId; + + @Nullable + private String apiKeySecretId; + + private String connectorId; + + /** + * API name: {@code api_key_id} + */ + public final Builder apiKeyId(@Nullable String value) { + this.apiKeyId = value; + return this; + } + + /** + * API name: {@code api_key_secret_id} + */ + public final Builder apiKeySecretId(@Nullable String value) { + this.apiKeySecretId = value; + return this; + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateApiKeyIdRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateApiKeyIdRequest build() { + _checkSingleUse(); + + return new UpdateApiKeyIdRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateApiKeyIdRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateApiKeyIdRequest::setupUpdateApiKeyIdRequestDeserializer); + + protected static void setupUpdateApiKeyIdRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::apiKeyId, JsonpDeserializer.stringDeserializer(), "api_key_id"); + op.add(Builder::apiKeySecretId, JsonpDeserializer.stringDeserializer(), "api_key_secret_id"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_api_key_id}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_api_key_id", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_api_key_id"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateApiKeyIdResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdResponse.java new file mode 100644 index 000000000..1bd4736e6 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_api_key_id.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateApiKeyIdResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateApiKeyIdResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateApiKeyIdResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateApiKeyIdResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateApiKeyIdResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateApiKeyIdResponse build() { + _checkSingleUse(); + + return new UpdateApiKeyIdResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateApiKeyIdResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateApiKeyIdResponse::setupUpdateApiKeyIdResponseDeserializer); + + protected static void setupUpdateApiKeyIdResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java new file mode 100644 index 000000000..0c5965cae --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java @@ -0,0 +1,315 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_configuration.Request + +/** + * Updates the configuration field in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateConfigurationRequest extends RequestBase implements JsonpSerializable { + private final Map configuration; + + private final String connectorId; + + private final Map values; + + // --------------------------------------------------------------------------------------------- + + private UpdateConfigurationRequest(Builder builder) { + + this.configuration = ApiTypeHelper.unmodifiable(builder.configuration); + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.values = ApiTypeHelper.unmodifiable(builder.values); + + } + + public static UpdateConfigurationRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code configuration} + */ + public final Map configuration() { + return this.configuration; + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * API name: {@code values} + */ + public final Map values() { + return this.values; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.configuration)) { + generator.writeKey("configuration"); + generator.writeStartObject(); + for (Map.Entry item0 : this.configuration.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.values)) { + generator.writeKey("values"); + generator.writeStartObject(); + for (Map.Entry item0 : this.values.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateConfigurationRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Map configuration; + + private String connectorId; + + @Nullable + private Map values; + + /** + * API name: {@code configuration} + *

+ * Adds all entries of map to configuration. + */ + public final Builder configuration(Map map) { + this.configuration = _mapPutAll(this.configuration, map); + return this; + } + + /** + * API name: {@code configuration} + *

+ * Adds an entry to configuration. + */ + public final Builder configuration(String key, ConnectorConfigProperties value) { + this.configuration = _mapPut(this.configuration, key, value); + return this; + } + + /** + * API name: {@code configuration} + *

+ * Adds an entry to configuration using a builder lambda. + */ + public final Builder configuration(String key, + Function> fn) { + return configuration(key, fn.apply(new ConnectorConfigProperties.Builder()).build()); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * API name: {@code values} + *

+ * Adds all entries of map to values. + */ + public final Builder values(Map map) { + this.values = _mapPutAll(this.values, map); + return this; + } + + /** + * API name: {@code values} + *

+ * Adds an entry to values. + */ + public final Builder values(String key, JsonData value) { + this.values = _mapPut(this.values, key, value); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateConfigurationRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateConfigurationRequest build() { + _checkSingleUse(); + + return new UpdateConfigurationRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateConfigurationRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateConfigurationRequest::setupUpdateConfigurationRequestDeserializer); + + protected static void setupUpdateConfigurationRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::configuration, JsonpDeserializer.stringMapDeserializer(ConnectorConfigProperties._DESERIALIZER), + "configuration"); + op.add(Builder::values, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "values"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_configuration}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_configuration", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_configuration"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateConfigurationResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationResponse.java new file mode 100644 index 000000000..d690482c8 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_configuration.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateConfigurationResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateConfigurationResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateConfigurationResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateConfigurationResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateConfigurationResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateConfigurationResponse build() { + _checkSingleUse(); + + return new UpdateConfigurationResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateConfigurationResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateConfigurationResponse::setupUpdateConfigurationResponseDeserializer); + + protected static void setupUpdateConfigurationResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java new file mode 100644 index 000000000..f4d02d753 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java @@ -0,0 +1,259 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.JsonValue; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_error.Request + +/** + * Updates the filtering field in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateErrorRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final String error; + + private final boolean isExpNullError; + + // --------------------------------------------------------------------------------------------- + + private UpdateErrorRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.error = builder.error; + this.isExpNullError = builder.isExpNullError; + + } + + public static UpdateErrorRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code error} + */ + public final String error() { + return this.error; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (!isExpNullError) { + generator.writeKey("error"); + generator.write(this.error); + + } + + else if (isExpNullError) { + generator.writeKey("error"); + generator.write(JsonValue.NULL); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateErrorRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private String error; + + private boolean isExpNullError; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code error} + */ + public final Builder error(String value) { + this.error = value; + this.isExpNullError = false; + return this; + } + + /** + * Required - API name: {@code error} + */ + public final Builder errorWithNull() { + this.isExpNullError = true; + this.error = null; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateErrorRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateErrorRequest build() { + _checkSingleUse(); + + return new UpdateErrorRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateErrorRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateErrorRequest::setupUpdateErrorRequestDeserializer); + + protected static void setupUpdateErrorRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::error, JsonpDeserializer.stringDeserializer(), "error"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_error}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_error", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_error"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateErrorResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorResponse.java new file mode 100644 index 000000000..f5247a227 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorResponse.java @@ -0,0 +1,155 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_error.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateErrorResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateErrorResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateErrorResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateErrorResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateErrorResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateErrorResponse build() { + _checkSingleUse(); + + return new UpdateErrorResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateErrorResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateErrorResponse::setupUpdateErrorResponseDeserializer); + + protected static void setupUpdateErrorResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java new file mode 100644 index 000000000..a3d636dae --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java @@ -0,0 +1,357 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_filtering.Request + +/** + * Updates the filtering field in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateFilteringRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final FilteringAdvancedSnippet advancedSnippet; + + private final String connectorId; + + private final List filtering; + + private final List rules; + + // --------------------------------------------------------------------------------------------- + + private UpdateFilteringRequest(Builder builder) { + + this.advancedSnippet = builder.advancedSnippet; + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.filtering = ApiTypeHelper.unmodifiable(builder.filtering); + this.rules = ApiTypeHelper.unmodifiable(builder.rules); + + } + + public static UpdateFilteringRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code advanced_snippet} + */ + @Nullable + public final FilteringAdvancedSnippet advancedSnippet() { + return this.advancedSnippet; + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * API name: {@code filtering} + */ + public final List filtering() { + return this.filtering; + } + + /** + * API name: {@code rules} + */ + public final List rules() { + return this.rules; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.advancedSnippet != null) { + generator.writeKey("advanced_snippet"); + this.advancedSnippet.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.filtering)) { + generator.writeKey("filtering"); + generator.writeStartArray(); + for (FilteringConfig item0 : this.filtering) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.rules)) { + generator.writeKey("rules"); + generator.writeStartArray(); + for (FilteringRule item0 : this.rules) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateFilteringRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private FilteringAdvancedSnippet advancedSnippet; + + private String connectorId; + + @Nullable + private List filtering; + + @Nullable + private List rules; + + /** + * API name: {@code advanced_snippet} + */ + public final Builder advancedSnippet(@Nullable FilteringAdvancedSnippet value) { + this.advancedSnippet = value; + return this; + } + + /** + * API name: {@code advanced_snippet} + */ + public final Builder advancedSnippet( + Function> fn) { + return this.advancedSnippet(fn.apply(new FilteringAdvancedSnippet.Builder()).build()); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * API name: {@code filtering} + *

+ * Adds all elements of list to filtering. + */ + public final Builder filtering(List list) { + this.filtering = _listAddAll(this.filtering, list); + return this; + } + + /** + * API name: {@code filtering} + *

+ * Adds one or more values to filtering. + */ + public final Builder filtering(FilteringConfig value, FilteringConfig... values) { + this.filtering = _listAdd(this.filtering, value, values); + return this; + } + + /** + * API name: {@code filtering} + *

+ * Adds a value to filtering using a builder lambda. + */ + public final Builder filtering(Function> fn) { + return filtering(fn.apply(new FilteringConfig.Builder()).build()); + } + + /** + * API name: {@code rules} + *

+ * Adds all elements of list to rules. + */ + public final Builder rules(List list) { + this.rules = _listAddAll(this.rules, list); + return this; + } + + /** + * API name: {@code rules} + *

+ * Adds one or more values to rules. + */ + public final Builder rules(FilteringRule value, FilteringRule... values) { + this.rules = _listAdd(this.rules, value, values); + return this; + } + + /** + * API name: {@code rules} + *

+ * Adds a value to rules using a builder lambda. + */ + public final Builder rules(Function> fn) { + return rules(fn.apply(new FilteringRule.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateFilteringRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateFilteringRequest build() { + _checkSingleUse(); + + return new UpdateFilteringRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateFilteringRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateFilteringRequest::setupUpdateFilteringRequestDeserializer); + + protected static void setupUpdateFilteringRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::advancedSnippet, FilteringAdvancedSnippet._DESERIALIZER, "advanced_snippet"); + op.add(Builder::filtering, JsonpDeserializer.arrayDeserializer(FilteringConfig._DESERIALIZER), "filtering"); + op.add(Builder::rules, JsonpDeserializer.arrayDeserializer(FilteringRule._DESERIALIZER), "rules"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_filtering}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_filtering", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_filtering"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateFilteringResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringResponse.java new file mode 100644 index 000000000..f95fbf72c --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_filtering.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateFilteringResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateFilteringResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateFilteringResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateFilteringResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateFilteringResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateFilteringResponse build() { + _checkSingleUse(); + + return new UpdateFilteringResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateFilteringResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateFilteringResponse::setupUpdateFilteringResponseDeserializer); + + protected static void setupUpdateFilteringResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java new file mode 100644 index 000000000..4c204e883 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java @@ -0,0 +1,246 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_filtering_validation.Request + +/** + * Updates the draft filtering validation info for a connector. + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateFilteringValidationRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final FilteringRulesValidation validation; + + // --------------------------------------------------------------------------------------------- + + private UpdateFilteringValidationRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.validation = ApiTypeHelper.requireNonNull(builder.validation, this, "validation"); + + } + + public static UpdateFilteringValidationRequest of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code validation} + */ + public final FilteringRulesValidation validation() { + return this.validation; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("validation"); + this.validation.serialize(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateFilteringValidationRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private FilteringRulesValidation validation; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code validation} + */ + public final Builder validation(FilteringRulesValidation value) { + this.validation = value; + return this; + } + + /** + * Required - API name: {@code validation} + */ + public final Builder validation( + Function> fn) { + return this.validation(fn.apply(new FilteringRulesValidation.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateFilteringValidationRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateFilteringValidationRequest build() { + _checkSingleUse(); + + return new UpdateFilteringValidationRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateFilteringValidationRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateFilteringValidationRequest::setupUpdateFilteringValidationRequestDeserializer); + + protected static void setupUpdateFilteringValidationRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::validation, FilteringRulesValidation._DESERIALIZER, "validation"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_filtering_validation}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_filtering_validation", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_filtering"); + buf.append("/_validation"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateFilteringValidationResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationResponse.java new file mode 100644 index 000000000..f152d7774 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationResponse.java @@ -0,0 +1,158 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_filtering_validation.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateFilteringValidationResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateFilteringValidationResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateFilteringValidationResponse of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateFilteringValidationResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateFilteringValidationResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateFilteringValidationResponse build() { + _checkSingleUse(); + + return new UpdateFilteringValidationResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateFilteringValidationResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateFilteringValidationResponse::setupUpdateFilteringValidationResponseDeserializer); + + protected static void setupUpdateFilteringValidationResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java new file mode 100644 index 000000000..42cd58058 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java @@ -0,0 +1,261 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.JsonValue; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_index_name.Request + +/** + * Updates the index_name in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateIndexNameRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final String indexName; + + private final boolean isExpNullIndexName; + + // --------------------------------------------------------------------------------------------- + + private UpdateIndexNameRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.indexName = builder.indexName; + this.isExpNullIndexName = builder.isExpNullIndexName; + + } + + public static UpdateIndexNameRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code index_name} + */ + public final String indexName() { + return this.indexName; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (!isExpNullIndexName) { + generator.writeKey("index_name"); + generator.write(this.indexName); + + } + + else if (isExpNullIndexName) { + generator.writeKey("index_name"); + generator.write(JsonValue.NULL); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateIndexNameRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private String indexName; + + private boolean isExpNullIndexName; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code index_name} + */ + public final Builder indexName(String value) { + this.indexName = value; + this.isExpNullIndexName = false; + return this; + } + + /** + * Required - API name: {@code index_name} + */ + public final Builder indexNameWithNull() { + this.isExpNullIndexName = true; + this.indexName = null; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateIndexNameRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateIndexNameRequest build() { + _checkSingleUse(); + + return new UpdateIndexNameRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateIndexNameRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateIndexNameRequest::setupUpdateIndexNameRequestDeserializer); + + protected static void setupUpdateIndexNameRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_index_name}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_index_name", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_index_name"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateIndexNameResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameResponse.java new file mode 100644 index 000000000..d762a6935 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_index_name.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateIndexNameResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateIndexNameResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateIndexNameResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateIndexNameResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateIndexNameResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateIndexNameResponse build() { + _checkSingleUse(); + + return new UpdateIndexNameResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateIndexNameResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateIndexNameResponse::setupUpdateIndexNameResponseDeserializer); + + protected static void setupUpdateIndexNameResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java new file mode 100644 index 000000000..12c5bf4dd --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java @@ -0,0 +1,269 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_name.Request + +/** + * Updates the name and description fields in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateNameRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + @Nullable + private final String description; + + @Nullable + private final String name; + + // --------------------------------------------------------------------------------------------- + + private UpdateNameRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.description = builder.description; + this.name = builder.name; + + } + + public static UpdateNameRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateNameRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + @Nullable + private String description; + + @Nullable + private String name; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * API name: {@code description} + */ + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * API name: {@code name} + */ + public final Builder name(@Nullable String value) { + this.name = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateNameRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateNameRequest build() { + _checkSingleUse(); + + return new UpdateNameRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateNameRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateNameRequest::setupUpdateNameRequestDeserializer); + + protected static void setupUpdateNameRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_name}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_name", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_name"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateNameResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameResponse.java new file mode 100644 index 000000000..eccdaaa88 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameResponse.java @@ -0,0 +1,155 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_name.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateNameResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateNameResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateNameResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateNameResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateNameResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateNameResponse build() { + _checkSingleUse(); + + return new UpdateNameResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateNameResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateNameResponse::setupUpdateNameResponseDeserializer); + + protected static void setupUpdateNameResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java new file mode 100644 index 000000000..728a5783b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java @@ -0,0 +1,235 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_native.Request + +/** + * Updates the is_native flag in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateNativeRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final boolean isNative; + + // --------------------------------------------------------------------------------------------- + + private UpdateNativeRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.isNative = ApiTypeHelper.requireNonNull(builder.isNative, this, "isNative"); + + } + + public static UpdateNativeRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code is_native} + */ + public final boolean isNative() { + return this.isNative; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("is_native"); + generator.write(this.isNative); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateNativeRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private Boolean isNative; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code is_native} + */ + public final Builder isNative(boolean value) { + this.isNative = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateNativeRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateNativeRequest build() { + _checkSingleUse(); + + return new UpdateNativeRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateNativeRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateNativeRequest::setupUpdateNativeRequestDeserializer); + + protected static void setupUpdateNativeRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_native}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_native", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_native"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateNativeResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeResponse.java new file mode 100644 index 000000000..47a357eeb --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeResponse.java @@ -0,0 +1,156 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_native.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateNativeResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateNativeResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateNativeResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateNativeResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateNativeResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateNativeResponse build() { + _checkSingleUse(); + + return new UpdateNativeResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateNativeResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateNativeResponse::setupUpdateNativeResponseDeserializer); + + protected static void setupUpdateNativeResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java new file mode 100644 index 000000000..8c77a6354 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java @@ -0,0 +1,242 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_pipeline.Request + +/** + * Updates the pipeline field in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdatePipelineRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final IngestPipelineParams pipeline; + + // --------------------------------------------------------------------------------------------- + + private UpdatePipelineRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.pipeline = ApiTypeHelper.requireNonNull(builder.pipeline, this, "pipeline"); + + } + + public static UpdatePipelineRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code pipeline} + */ + public final IngestPipelineParams pipeline() { + return this.pipeline; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("pipeline"); + this.pipeline.serialize(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdatePipelineRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private IngestPipelineParams pipeline; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code pipeline} + */ + public final Builder pipeline(IngestPipelineParams value) { + this.pipeline = value; + return this; + } + + /** + * Required - API name: {@code pipeline} + */ + public final Builder pipeline(Function> fn) { + return this.pipeline(fn.apply(new IngestPipelineParams.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdatePipelineRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdatePipelineRequest build() { + _checkSingleUse(); + + return new UpdatePipelineRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdatePipelineRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdatePipelineRequest::setupUpdatePipelineRequestDeserializer); + + protected static void setupUpdatePipelineRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::pipeline, IngestPipelineParams._DESERIALIZER, "pipeline"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_pipeline}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_pipeline", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_pipeline"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdatePipelineResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineResponse.java new file mode 100644 index 000000000..d4336f8db --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_pipeline.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdatePipelineResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdatePipelineResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdatePipelineResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdatePipelineResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdatePipelineResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdatePipelineResponse build() { + _checkSingleUse(); + + return new UpdatePipelineResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdatePipelineResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdatePipelineResponse::setupUpdatePipelineResponseDeserializer); + + protected static void setupUpdatePipelineResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java new file mode 100644 index 000000000..6fc8be6e4 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java @@ -0,0 +1,244 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_scheduling.Request + +/** + * Updates the scheduling field in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateSchedulingRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final SchedulingConfiguration scheduling; + + // --------------------------------------------------------------------------------------------- + + private UpdateSchedulingRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.scheduling = ApiTypeHelper.requireNonNull(builder.scheduling, this, "scheduling"); + + } + + public static UpdateSchedulingRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code scheduling} + */ + public final SchedulingConfiguration scheduling() { + return this.scheduling; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("scheduling"); + this.scheduling.serialize(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateSchedulingRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private SchedulingConfiguration scheduling; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code scheduling} + */ + public final Builder scheduling(SchedulingConfiguration value) { + this.scheduling = value; + return this; + } + + /** + * Required - API name: {@code scheduling} + */ + public final Builder scheduling( + Function> fn) { + return this.scheduling(fn.apply(new SchedulingConfiguration.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateSchedulingRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateSchedulingRequest build() { + _checkSingleUse(); + + return new UpdateSchedulingRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateSchedulingRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateSchedulingRequest::setupUpdateSchedulingRequestDeserializer); + + protected static void setupUpdateSchedulingRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::scheduling, SchedulingConfiguration._DESERIALIZER, "scheduling"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_scheduling}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_scheduling", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_scheduling"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateSchedulingResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingResponse.java new file mode 100644 index 000000000..d3b3bcf7a --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_scheduling.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateSchedulingResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateSchedulingResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateSchedulingResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateSchedulingResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateSchedulingResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateSchedulingResponse build() { + _checkSingleUse(); + + return new UpdateSchedulingResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateSchedulingResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateSchedulingResponse::setupUpdateSchedulingResponseDeserializer); + + protected static void setupUpdateSchedulingResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java new file mode 100644 index 000000000..9e7c93ee8 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java @@ -0,0 +1,236 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_service_type.Request + +/** + * Updates the service type of the connector + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateServiceTypeRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final String serviceType; + + // --------------------------------------------------------------------------------------------- + + private UpdateServiceTypeRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.serviceType = ApiTypeHelper.requireNonNull(builder.serviceType, this, "serviceType"); + + } + + public static UpdateServiceTypeRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code service_type} + */ + public final String serviceType() { + return this.serviceType; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("service_type"); + generator.write(this.serviceType); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateServiceTypeRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private String serviceType; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code service_type} + */ + public final Builder serviceType(String value) { + this.serviceType = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateServiceTypeRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateServiceTypeRequest build() { + _checkSingleUse(); + + return new UpdateServiceTypeRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateServiceTypeRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateServiceTypeRequest::setupUpdateServiceTypeRequestDeserializer); + + protected static void setupUpdateServiceTypeRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_service_type}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_service_type", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_service_type"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateServiceTypeResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeResponse.java new file mode 100644 index 000000000..7f8e0d53e --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_service_type.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateServiceTypeResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateServiceTypeResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateServiceTypeResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateServiceTypeResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateServiceTypeResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateServiceTypeResponse build() { + _checkSingleUse(); + + return new UpdateServiceTypeResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateServiceTypeResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateServiceTypeResponse::setupUpdateServiceTypeResponseDeserializer); + + protected static void setupUpdateServiceTypeResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java new file mode 100644 index 000000000..5f0b7270f --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java @@ -0,0 +1,234 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_status.Request + +/** + * Updates the status of the connector + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateStatusRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final ConnectorStatus status; + + // --------------------------------------------------------------------------------------------- + + private UpdateStatusRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); + + } + + public static UpdateStatusRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code status} + */ + public final ConnectorStatus status() { + return this.status; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("status"); + this.status.serialize(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateStatusRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private ConnectorStatus status; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code status} + */ + public final Builder status(ConnectorStatus value) { + this.status = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateStatusRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateStatusRequest build() { + _checkSingleUse(); + + return new UpdateStatusRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateStatusRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateStatusRequest::setupUpdateStatusRequestDeserializer); + + protected static void setupUpdateStatusRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::status, ConnectorStatus._DESERIALIZER, "status"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_status}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_status", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_status"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateStatusResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusResponse.java new file mode 100644 index 000000000..f5cfe4ad5 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusResponse.java @@ -0,0 +1,156 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_status.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateStatusResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateStatusResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateStatusResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateStatusResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateStatusResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateStatusResponse build() { + _checkSingleUse(); + + return new UpdateStatusResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateStatusResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateStatusResponse::setupUpdateStatusResponseDeserializer); + + protected static void setupUpdateStatusResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Validation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Validation.java new file mode 100644 index 000000000..c84ac100b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Validation.java @@ -0,0 +1,308 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.TaggedUnion; +import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.Validation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Validation implements TaggedUnion, JsonpSerializable { + + /** + * {@link Validation} variant kinds. + * + * @see API + * specification + */ + + public enum Kind implements JsonEnum { + GreaterThan("greater_than"), + + IncludedIn("included_in"), + + LessThan("less_than"), + + ListType("list_type"), + + Regex("regex"), + + ; + + private final String jsonValue; + + Kind(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + } + + private final Kind _kind; + private final ValidationVariant _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final ValidationVariant _get() { + return _value; + } + + public Validation(ValidationVariant value) { + + this._kind = ApiTypeHelper.requireNonNull(value._validationKind(), this, ""); + this._value = ApiTypeHelper.requireNonNull(value, this, ""); + + } + + private Validation(Builder builder) { + + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + + } + + public static Validation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Is this variant instance of kind {@code greater_than}? + */ + public boolean isGreaterThan() { + return _kind == Kind.GreaterThan; + } + + /** + * Get the {@code greater_than} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code greater_than} kind. + */ + public GreaterThanValidation greaterThan() { + return TaggedUnionUtils.get(this, Kind.GreaterThan); + } + + /** + * Is this variant instance of kind {@code included_in}? + */ + public boolean isIncludedIn() { + return _kind == Kind.IncludedIn; + } + + /** + * Get the {@code included_in} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code included_in} kind. + */ + public IncludedInValidation includedIn() { + return TaggedUnionUtils.get(this, Kind.IncludedIn); + } + + /** + * Is this variant instance of kind {@code less_than}? + */ + public boolean isLessThan() { + return _kind == Kind.LessThan; + } + + /** + * Get the {@code less_than} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code less_than} kind. + */ + public LessThanValidation lessThan() { + return TaggedUnionUtils.get(this, Kind.LessThan); + } + + /** + * Is this variant instance of kind {@code list_type}? + */ + public boolean isListType() { + return _kind == Kind.ListType; + } + + /** + * Get the {@code list_type} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code list_type} kind. + */ + public ListTypeValidation listType() { + return TaggedUnionUtils.get(this, Kind.ListType); + } + + /** + * Is this variant instance of kind {@code regex}? + */ + public boolean isRegex() { + return _kind == Kind.Regex; + } + + /** + * Get the {@code regex} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code regex} kind. + */ + public RegexValidation regex() { + return TaggedUnionUtils.get(this, Kind.Regex); + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + + mapper.serialize(_value, generator); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private ValidationVariant _value; + + @Override + protected Builder self() { + return this; + } + public ObjectBuilder greaterThan(GreaterThanValidation v) { + this._kind = Kind.GreaterThan; + this._value = v; + return this; + } + + public ObjectBuilder greaterThan( + Function> fn) { + return this.greaterThan(fn.apply(new GreaterThanValidation.Builder()).build()); + } + + public ObjectBuilder includedIn(IncludedInValidation v) { + this._kind = Kind.IncludedIn; + this._value = v; + return this; + } + + public ObjectBuilder includedIn( + Function> fn) { + return this.includedIn(fn.apply(new IncludedInValidation.Builder()).build()); + } + + public ObjectBuilder lessThan(LessThanValidation v) { + this._kind = Kind.LessThan; + this._value = v; + return this; + } + + public ObjectBuilder lessThan( + Function> fn) { + return this.lessThan(fn.apply(new LessThanValidation.Builder()).build()); + } + + public ObjectBuilder listType(ListTypeValidation v) { + this._kind = Kind.ListType; + this._value = v; + return this; + } + + public ObjectBuilder listType( + Function> fn) { + return this.listType(fn.apply(new ListTypeValidation.Builder()).build()); + } + + public ObjectBuilder regex(RegexValidation v) { + this._kind = Kind.Regex; + this._value = v; + return this; + } + + public ObjectBuilder regex(Function> fn) { + return this.regex(fn.apply(new RegexValidation.Builder()).build()); + } + + public Validation build() { + _checkSingleUse(); + return new Validation(this); + } + + } + + protected static void setupValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::greaterThan, GreaterThanValidation._DESERIALIZER, "greater_than"); + op.add(Builder::includedIn, IncludedInValidation._DESERIALIZER, "included_in"); + op.add(Builder::lessThan, LessThanValidation._DESERIALIZER, "less_than"); + op.add(Builder::listType, ListTypeValidation._DESERIALIZER, "list_type"); + op.add(Builder::regex, RegexValidation._DESERIALIZER, "regex"); + + op.setTypeProperty("type", null); + + } + + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Validation::setupValidationDeserializer, Builder::build); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationBuilders.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationBuilders.java new file mode 100644 index 000000000..a6ea904d1 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationBuilders.java @@ -0,0 +1,139 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.util.ObjectBuilder; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Builders for {@link Validation} variants. + */ +public class ValidationBuilders { + private ValidationBuilders() { + } + + /** + * Creates a builder for the {@link GreaterThanValidation greater_than} + * {@code Validation} variant. + */ + public static GreaterThanValidation.Builder greaterThan() { + return new GreaterThanValidation.Builder(); + } + + /** + * Creates a Validation of the {@link GreaterThanValidation greater_than} + * {@code Validation} variant. + */ + public static Validation greaterThan( + Function> fn) { + Validation.Builder builder = new Validation.Builder(); + builder.greaterThan(fn.apply(new GreaterThanValidation.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link IncludedInValidation included_in} + * {@code Validation} variant. + */ + public static IncludedInValidation.Builder includedIn() { + return new IncludedInValidation.Builder(); + } + + /** + * Creates a Validation of the {@link IncludedInValidation included_in} + * {@code Validation} variant. + */ + public static Validation includedIn( + Function> fn) { + Validation.Builder builder = new Validation.Builder(); + builder.includedIn(fn.apply(new IncludedInValidation.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link LessThanValidation less_than} + * {@code Validation} variant. + */ + public static LessThanValidation.Builder lessThan() { + return new LessThanValidation.Builder(); + } + + /** + * Creates a Validation of the {@link LessThanValidation less_than} + * {@code Validation} variant. + */ + public static Validation lessThan(Function> fn) { + Validation.Builder builder = new Validation.Builder(); + builder.lessThan(fn.apply(new LessThanValidation.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link ListTypeValidation list_type} + * {@code Validation} variant. + */ + public static ListTypeValidation.Builder listType() { + return new ListTypeValidation.Builder(); + } + + /** + * Creates a Validation of the {@link ListTypeValidation list_type} + * {@code Validation} variant. + */ + public static Validation listType(Function> fn) { + Validation.Builder builder = new Validation.Builder(); + builder.listType(fn.apply(new ListTypeValidation.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link RegexValidation regex} {@code Validation} + * variant. + */ + public static RegexValidation.Builder regex() { + return new RegexValidation.Builder(); + } + + /** + * Creates a Validation of the {@link RegexValidation regex} {@code Validation} + * variant. + */ + public static Validation regex(Function> fn) { + Validation.Builder builder = new Validation.Builder(); + builder.regex(fn.apply(new RegexValidation.Builder()).build()); + return builder.build(); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationVariant.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationVariant.java new file mode 100644 index 000000000..73140347d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationVariant.java @@ -0,0 +1,50 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpSerializable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Base interface for {@link Validation} variants. + */ +public interface ValidationVariant extends JsonpSerializable { + + Validation.Kind _validationKind(); + + default Validation _toValidation() { + return new Validation(this); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java index 7d42b687e..7b237e3a7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java @@ -67,8 +67,9 @@ // typedef: _global.bulk.Request /** - * Performs multiple indexing or delete operations in a single API call. This - * reduces overhead and can greatly increase indexing speed. + * Bulk index or delete documents. Performs multiple indexing or delete + * operations in a single API call. This reduces overhead and can greatly + * increase indexing speed. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java index 7334e2749..ec0f3b30f 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java @@ -67,9 +67,9 @@ // typedef: _global.create.Request /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java index 64debabf9..5b10609a9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java @@ -71,7 +71,7 @@ // typedef: _global.delete_by_query.Request /** - * Deletes documents that match the specified query. + * Delete documents. Deletes documents that match the specified query. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java index a1890a672..8ced3a521 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java @@ -60,7 +60,7 @@ // typedef: _global.delete.Request /** - * Removes a JSON document from the specified index. + * Delete a document. Removes a JSON document from the specified index. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java index c943e5841..3f3f8afaf 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java @@ -56,7 +56,8 @@ // typedef: _global.delete_script.Request /** - * Deletes a stored script or search template. + * Delete a script or search template. Deletes a stored script or search + * template. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java index b6713cd70..3451c2bce 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java @@ -63,7 +63,7 @@ // typedef: _global.exists.Request /** - * Checks if a document in an index exists. + * Check a document. Checks if a specified document exists. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java index 15c4579b2..d3621903e 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java @@ -63,7 +63,8 @@ // typedef: _global.exists_source.Request /** - * Checks if a document's _source is stored. + * Check for a document source. Checks if a document's _source is + * stored. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java index 4562fdd46..06f8e861c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java @@ -63,8 +63,8 @@ // typedef: _global.explain.Request /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java index f576edff6..5c8bb7729 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java @@ -61,7 +61,8 @@ // typedef: _global.get.Request /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java index f0a1062c9..e1682f23b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java @@ -56,7 +56,8 @@ // typedef: _global.get_script.Request /** - * Retrieves a stored script or search template. + * Get a script or search template. Retrieves a stored script or search + * template. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java index 7e3c5daca..2e59164b3 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java @@ -61,7 +61,7 @@ // typedef: _global.get_source.Request /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java index 49c561282..34542789c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java @@ -69,9 +69,9 @@ // typedef: _global.index.Request /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java index 2dd187328..d21ce18fe 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java @@ -50,7 +50,7 @@ // typedef: _global.info.Request /** - * Returns basic information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java index 62f51f89e..a73479dbd 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java @@ -578,9 +578,6 @@ public MsearchRequest build() { request -> { Map params = new HashMap<>(); params.put("typed_keys", "true"); - if (request.routing != null) { - params.put("routing", request.routing); - } if (request.preFilterShardSize != null) { params.put("pre_filter_shard_size", String.valueOf(request.preFilterShardSize)); } @@ -591,6 +588,15 @@ public MsearchRequest build() { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); } + if (request.searchType != null) { + params.put("search_type", request.searchType.jsonValue()); + } + if (request.ccsMinimizeRoundtrips != null) { + params.put("ccs_minimize_roundtrips", String.valueOf(request.ccsMinimizeRoundtrips)); + } + if (request.routing != null) { + params.put("routing", request.routing); + } if (request.ignoreUnavailable != null) { params.put("ignore_unavailable", String.valueOf(request.ignoreUnavailable)); } @@ -603,12 +609,6 @@ public MsearchRequest build() { if (request.maxConcurrentSearches != null) { params.put("max_concurrent_searches", String.valueOf(request.maxConcurrentSearches)); } - if (request.searchType != null) { - params.put("search_type", request.searchType.jsonValue()); - } - if (request.ccsMinimizeRoundtrips != null) { - params.put("ccs_minimize_roundtrips", String.valueOf(request.ccsMinimizeRoundtrips)); - } return params; }, SimpleEndpoint.emptyMap(), true, MsearchResponse._DESERIALIZER); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java index 5b9752c24..b0db07d74 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java @@ -23,8 +23,11 @@ import co.elastic.clients.elasticsearch._types.ExpandWildcard; import co.elastic.clients.elasticsearch._types.RequestBase; import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.elasticsearch._types.query_dsl.Query; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.transport.Endpoint; @@ -73,8 +76,8 @@ * "../doc-files/api-spec.html#_global.open_point_in_time.Request">API * specification */ - -public class OpenPointInTimeRequest extends RequestBase { +@JsonpDeserializable +public class OpenPointInTimeRequest extends RequestBase implements JsonpSerializable { private final List expandWildcards; @Nullable @@ -82,6 +85,9 @@ public class OpenPointInTimeRequest extends RequestBase { private final List index; + @Nullable + private final Query indexFilter; + private final Time keepAlive; @Nullable @@ -97,6 +103,7 @@ private OpenPointInTimeRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.ignoreUnavailable = builder.ignoreUnavailable; this.index = ApiTypeHelper.unmodifiableRequired(builder.index, this, "index"); + this.indexFilter = builder.indexFilter; this.keepAlive = ApiTypeHelper.requireNonNull(builder.keepAlive, this, "keepAlive"); this.preference = builder.preference; this.routing = builder.routing; @@ -142,6 +149,17 @@ public final List index() { return this.index; } + /** + * Allows to filter indices if the provided query rewrites to + * match_none on every shard. + *

+ * API name: {@code index_filter} + */ + @Nullable + public final Query indexFilter() { + return this.indexFilter; + } + /** * Required - Extends the time to live of the corresponding point in time. *

@@ -172,6 +190,25 @@ public final String routing() { return this.routing; } + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.indexFilter != null) { + generator.writeKey("index_filter"); + this.indexFilter.serialize(generator, mapper); + + } + + } + // --------------------------------------------------------------------------------------------- /** @@ -189,6 +226,9 @@ public static class Builder extends RequestBase.AbstractBuilder private List index; + @Nullable + private Query indexFilter; + private Time keepAlive; @Nullable @@ -268,6 +308,27 @@ public final Builder index(String value, String... values) { return this; } + /** + * Allows to filter indices if the provided query rewrites to + * match_none on every shard. + *

+ * API name: {@code index_filter} + */ + public final Builder indexFilter(@Nullable Query value) { + this.indexFilter = value; + return this; + } + + /** + * Allows to filter indices if the provided query rewrites to + * match_none on every shard. + *

+ * API name: {@code index_filter} + */ + public final Builder indexFilter(Function> fn) { + return this.indexFilter(fn.apply(new Query.Builder()).build()); + } + /** * Required - Extends the time to live of the corresponding point in time. *

@@ -328,6 +389,21 @@ public OpenPointInTimeRequest build() { // --------------------------------------------------------------------------------------------- + /** + * Json deserializer for {@link OpenPointInTimeRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, OpenPointInTimeRequest::setupOpenPointInTimeRequestDeserializer); + + protected static void setupOpenPointInTimeRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::indexFilter, Query._DESERIALIZER, "index_filter"); + + } + + // --------------------------------------------------------------------------------------------- + /** * Endpoint "{@code open_point_in_time}". */ @@ -393,5 +469,5 @@ public OpenPointInTimeRequest build() { params.put("keep_alive", request.keepAlive._toJsonString()); return params; - }, SimpleEndpoint.emptyMap(), false, OpenPointInTimeResponse._DESERIALIZER); + }, SimpleEndpoint.emptyMap(), true, OpenPointInTimeResponse._DESERIALIZER); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeResponse.java index 803742154..72e7f8580 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeResponse.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeResponse.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.core; +import co.elastic.clients.elasticsearch._types.ShardStatistics; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -60,12 +61,15 @@ */ @JsonpDeserializable public class OpenPointInTimeResponse implements JsonpSerializable { + private final ShardStatistics shards; + private final String id; // --------------------------------------------------------------------------------------------- private OpenPointInTimeResponse(Builder builder) { + this.shards = ApiTypeHelper.requireNonNull(builder.shards, this, "shards"); this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); } @@ -74,6 +78,15 @@ public static OpenPointInTimeResponse of(Function + * API name: {@code _shards} + */ + public final ShardStatistics shards() { + return this.shards; + } + /** * Required - API name: {@code id} */ @@ -92,6 +105,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeKey("_shards"); + this.shards.serialize(generator, mapper); + generator.writeKey("id"); generator.write(this.id); @@ -111,8 +127,29 @@ public String toString() { public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private ShardStatistics shards; + private String id; + /** + * Required - Shards used to create the PIT + *

+ * API name: {@code _shards} + */ + public final Builder shards(ShardStatistics value) { + this.shards = value; + return this; + } + + /** + * Required - Shards used to create the PIT + *

+ * API name: {@code _shards} + */ + public final Builder shards(Function> fn) { + return this.shards(fn.apply(new ShardStatistics.Builder()).build()); + } + /** * Required - API name: {@code id} */ @@ -150,6 +187,7 @@ public OpenPointInTimeResponse build() { protected static void setupOpenPointInTimeResponseDeserializer( ObjectDeserializer op) { + op.add(Builder::shards, ShardStatistics._DESERIALIZER, "_shards"); op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java index 89b17d098..8c7213ad5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java @@ -52,7 +52,7 @@ // typedef: _global.ping.Request /** - * Returns whether the cluster is running. + * Ping the cluster. Returns whether the cluster is running. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java index 2acff98fc..aaa373dce 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java @@ -59,7 +59,8 @@ // typedef: _global.put_script.Request /** - * Creates or updates a stored script or search template. + * Create or update a script or search template. Creates or updates a stored + * script or search template. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java index 0019dcbd1..134ec00d1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java @@ -67,9 +67,10 @@ // typedef: _global.reindex.Request /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. + * Reindex documents. Copies documents from a source to a destination. The + * source can be any existing index, alias, or data stream. The destination must + * differ from the source. For example, you cannot reindex a data stream into + * itself. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java index 9b53ddb42..90f19710d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java @@ -57,7 +57,7 @@ // typedef: _global.scripts_painless_execute.Request /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java index 848880428..e72cf5742 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java @@ -71,8 +71,7 @@ // typedef: _global.search_mvt.Request /** - * Searches a vector tile for geospatial values. Returns results as a binary - * Mapbox vector tile. + * Search a vector tile. Searches a vector tile for geospatial values. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java index b4c8000ca..d73b6a7bf 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java @@ -23,7 +23,6 @@ import co.elastic.clients.elasticsearch._types.ExpandWildcard; import co.elastic.clients.elasticsearch._types.FieldValue; import co.elastic.clients.elasticsearch._types.KnnSearch; -import co.elastic.clients.elasticsearch._types.Rank; import co.elastic.clients.elasticsearch._types.RequestBase; import co.elastic.clients.elasticsearch._types.Retriever; import co.elastic.clients.elasticsearch._types.ScriptField; @@ -190,9 +189,6 @@ public class SearchRequest extends RequestBase implements JsonpSerializable { @Nullable private final Query query; - @Nullable - private final Rank rank; - @Nullable private final Boolean requestCache; @@ -287,7 +283,6 @@ private SearchRequest(Builder builder) { this.profile = builder.profile; this.q = builder.q; this.query = builder.query; - this.rank = builder.rank; this.requestCache = builder.requestCache; this.rescore = ApiTypeHelper.unmodifiable(builder.rescore); this.retriever = builder.retriever; @@ -716,16 +711,6 @@ public final Query query() { return this.query; } - /** - * Defines the Reciprocal Rank Fusion (RRF) to use. - *

- * API name: {@code rank} - */ - @Nullable - public final Rank rank() { - return this.rank; - } - /** * If true, the caching of search results is enabled for requests * where size is 0. Defaults to index level settings. @@ -1093,11 +1078,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("query"); this.query.serialize(generator, mapper); - } - if (this.rank != null) { - generator.writeKey("rank"); - this.rank.serialize(generator, mapper); - } if (ApiTypeHelper.isDefined(this.rescore)) { generator.writeKey("rescore"); @@ -1339,9 +1319,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private Query query; - @Nullable - private Rank rank; - @Nullable private Boolean requestCache; @@ -2041,25 +2018,6 @@ public final Builder query(Function> fn) { return this.query(fn.apply(new Query.Builder()).build()); } - /** - * Defines the Reciprocal Rank Fusion (RRF) to use. - *

- * API name: {@code rank} - */ - public final Builder rank(@Nullable Rank value) { - this.rank = value; - return this; - } - - /** - * Defines the Reciprocal Rank Fusion (RRF) to use. - *

- * API name: {@code rank} - */ - public final Builder rank(Function> fn) { - return this.rank(fn.apply(new Rank.Builder()).build()); - } - /** * If true, the caching of search results is enabled for requests * where size is 0. Defaults to index level settings. @@ -2648,7 +2606,6 @@ protected static void setupSearchRequestDeserializer(ObjectDeserializerAPI * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java index a4b50198f..46e5c936c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java @@ -65,6 +65,7 @@ public class TermvectorsResponse implements JsonpSerializable { private final boolean found; + @Nullable private final String id; private final String index; @@ -80,7 +81,7 @@ public class TermvectorsResponse implements JsonpSerializable { private TermvectorsResponse(Builder builder) { this.found = ApiTypeHelper.requireNonNull(builder.found, this, "found"); - this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.id = builder.id; this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); this.termVectors = ApiTypeHelper.unmodifiable(builder.termVectors); this.took = ApiTypeHelper.requireNonNull(builder.took, this, "took"); @@ -100,8 +101,9 @@ public final boolean found() { } /** - * Required - API name: {@code _id} + * API name: {@code _id} */ + @Nullable public final String id() { return this.id; } @@ -148,9 +150,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("found"); generator.write(this.found); - generator.writeKey("_id"); - generator.write(this.id); + if (this.id != null) { + generator.writeKey("_id"); + generator.write(this.id); + } generator.writeKey("_index"); generator.write(this.index); @@ -189,6 +193,7 @@ public static class Builder extends WithJsonObjectBuilderBase ObjectBuilder { private Boolean found; + @Nullable private String id; private String index; @@ -209,9 +214,9 @@ public final Builder found(boolean value) { } /** - * Required - API name: {@code _id} + * API name: {@code _id} */ - public final Builder id(String value) { + public final Builder id(@Nullable String value) { this.id = value; return this; } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java index fb314ace8..869a86813 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java @@ -72,9 +72,10 @@ // typedef: _global.update_by_query.Request /** - * Updates documents that match the specified query. If no query is specified, - * performs an update on every document in the data stream or index without - * modifying the source, which is useful for picking up mapping changes. + * Update documents. Updates documents that match the specified query. If no + * query is specified, performs an update on every document in the data stream + * or index without modifying the source, which is useful for picking up mapping + * changes. * * @see API * specification @@ -121,6 +122,9 @@ public class UpdateByQueryRequest extends RequestBase implements JsonpSerializab @Nullable private final String preference; + @Nullable + private final String q; + @Nullable private final Query query; @@ -197,6 +201,7 @@ private UpdateByQueryRequest(Builder builder) { this.maxDocs = builder.maxDocs; this.pipeline = builder.pipeline; this.preference = builder.preference; + this.q = builder.q; this.query = builder.query; this.refresh = builder.refresh; this.requestCache = builder.requestCache; @@ -383,6 +388,16 @@ public final String preference() { return this.preference; } + /** + * Query in the Lucene query string syntax. + *

+ * API name: {@code q} + */ + @Nullable + public final String q() { + return this.q; + } + /** * Specifies the documents to update using the Query DSL. *

@@ -683,6 +698,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private String preference; + @Nullable + private String q; + @Nullable private Query query; @@ -939,6 +957,16 @@ public final Builder preference(@Nullable String value) { return this; } + /** + * Query in the Lucene query string syntax. + *

+ * API name: {@code q} + */ + public final Builder q(@Nullable String value) { + this.q = value; + return this; + } + /** * Specifies the documents to update using the Query DSL. *

@@ -1422,6 +1450,9 @@ protected static void setupUpdateByQueryRequestDeserializer(ObjectDeserializerAPI * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java index b82dbca4a..222467ece 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java @@ -36,6 +36,7 @@ import java.lang.Boolean; import java.lang.Long; import java.lang.String; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.function.Function; @@ -70,6 +71,8 @@ public class GetResult implements JsonpSerializable { private final Map fields; + private final List ignored; + private final boolean found; private final String id; @@ -98,6 +101,7 @@ protected GetResult(AbstractBuilder builder) { this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); this.fields = ApiTypeHelper.unmodifiable(builder.fields); + this.ignored = ApiTypeHelper.unmodifiable(builder.ignored); this.found = ApiTypeHelper.requireNonNull(builder.found, this, "found"); this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); this.primaryTerm = builder.primaryTerm; @@ -128,6 +132,13 @@ public final Map fields() { return this.fields; } + /** + * API name: {@code _ignored} + */ + public final List ignored() { + return this.ignored; + } + /** * Required - API name: {@code found} */ @@ -206,6 +217,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (ApiTypeHelper.isDefined(this.ignored)) { + generator.writeKey("_ignored"); + generator.writeStartArray(); + for (String item0 : this.ignored) { + generator.write(item0); + + } + generator.writeEnd(); + } generator.writeKey("found"); generator.write(this.found); @@ -281,6 +302,9 @@ public abstract static class AbstractBuilder fields; + @Nullable + private List ignored; + private Boolean found; private String id; @@ -331,6 +355,26 @@ public final BuilderT fields(String key, JsonData value) { return self(); } + /** + * API name: {@code _ignored} + *

+ * Adds all elements of list to ignored. + */ + public final BuilderT ignored(List list) { + this.ignored = _listAddAll(this.ignored, list); + return self(); + } + + /** + * API name: {@code _ignored} + *

+ * Adds one or more values to ignored. + */ + public final BuilderT ignored(String value, String... values) { + this.ignored = _listAdd(this.ignored, value, values); + return self(); + } + /** * Required - API name: {@code found} */ @@ -424,6 +468,8 @@ protected static implements ObjectBuilder { + @Nullable private String id; private String index; @@ -239,9 +244,9 @@ public static class Builder extends WithJsonObjectBuilderBase private ErrorCause error; /** - * Required - API name: {@code _id} + * API name: {@code _id} */ - public final Builder id(String value) { + public final Builder id(@Nullable String value) { this.id = value; return this; } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java index 23595d28b..133c82c31 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java @@ -187,6 +187,8 @@ protected static void setupRankEvalQueryDeserializer(ObjectDeserializer * API name: {@code query} */ + @Nullable public final Query query() { return this.query; } @@ -129,8 +131,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("index"); generator.write(this.index); - generator.writeKey("query"); - this.query.serialize(generator, mapper); + if (this.query != null) { + generator.writeKey("query"); + this.query.serialize(generator, mapper); + + } } @@ -152,6 +157,7 @@ public static class Builder extends WithJsonObjectBuilderBase private String index; + @Nullable private Query query; /** @@ -178,17 +184,17 @@ public final Builder index(String value) { } /** - * Required - Use this parameter to specify a query for computing a score. + * Use this parameter to specify a query for computing a score. *

* API name: {@code query} */ - public final Builder query(Query value) { + public final Builder query(@Nullable Query value) { this.query = value; return this; } /** - * Required - Use this parameter to specify a query for computing a score. + * Use this parameter to specify a query for computing a score. *

* API name: {@code query} */ diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionContext.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionContext.java index e1ac5210b..474ceadf2 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionContext.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionContext.java @@ -362,7 +362,7 @@ protected static void setupCompletionContextDeserializer(ObjectDeserializer matchedFields; - @Nullable - private final Analyzer analyzer; - // --------------------------------------------------------------------------------------------- private HighlightField(Builder builder) { @@ -75,7 +71,6 @@ private HighlightField(Builder builder) { this.fragmentOffset = builder.fragmentOffset; this.matchedFields = ApiTypeHelper.unmodifiable(builder.matchedFields); - this.analyzer = builder.analyzer; } @@ -98,14 +93,6 @@ public final List matchedFields() { return this.matchedFields; } - /** - * API name: {@code analyzer} - */ - @Nullable - public final Analyzer analyzer() { - return this.analyzer; - } - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { super.serializeInternal(generator, mapper); @@ -124,11 +111,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } - if (this.analyzer != null) { - generator.writeKey("analyzer"); - this.analyzer.serialize(generator, mapper); - - } } @@ -147,9 +129,6 @@ public static class Builder extends HighlightBase.AbstractBuilder @Nullable private List matchedFields; - @Nullable - private Analyzer analyzer; - /** * API name: {@code fragment_offset} */ @@ -178,21 +157,6 @@ public final Builder matchedFields(String value, String... values) { return this; } - /** - * API name: {@code analyzer} - */ - public final Builder analyzer(@Nullable Analyzer value) { - this.analyzer = value; - return this; - } - - /** - * API name: {@code analyzer} - */ - public final Builder analyzer(Function> fn) { - return this.analyzer(fn.apply(new Analyzer.Builder()).build()); - } - @Override protected Builder self() { return this; @@ -224,7 +188,6 @@ protected static void setupHighlightFieldDeserializer(ObjectDeserializer implements JsonpSerializable { @Nullable private final TDocument source; + @Nullable + private final Integer rank; + @Nullable private final Long seqNo; @@ -141,6 +145,7 @@ private Hit(Builder builder) { this.node = builder.node; this.routing = builder.routing; this.source = builder.source; + this.rank = builder.rank; this.seqNo = builder.seqNo; this.primaryTerm = builder.primaryTerm; this.version = builder.version; @@ -268,6 +273,14 @@ public final TDocument source() { return this.source; } + /** + * API name: {@code _rank} + */ + @Nullable + public final Integer rank() { + return this.rank; + } + /** * API name: {@code _seq_no} */ @@ -429,6 +442,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("_source"); JsonpUtils.serialize(this.source, generator, tDocumentSerializer, mapper); + } + if (this.rank != null) { + generator.writeKey("_rank"); + generator.write(this.rank); + } if (this.seqNo != null) { generator.writeKey("_seq_no"); @@ -516,6 +534,9 @@ public static class Builder extends WithJsonObjectBuilderBase source(@Nullable TDocument value) { return this; } + /** + * API name: {@code _rank} + */ + public final Builder rank(@Nullable Integer value) { + this.rank = value; + return this; + } + /** * API name: {@code _seq_no} */ @@ -933,6 +962,7 @@ protected static void setupHitDeserializer(ObjectDeserializer terms; @@ -69,7 +70,7 @@ public class TermVector implements JsonpSerializable { private TermVector(Builder builder) { - this.fieldStatistics = ApiTypeHelper.requireNonNull(builder.fieldStatistics, this, "fieldStatistics"); + this.fieldStatistics = builder.fieldStatistics; this.terms = ApiTypeHelper.unmodifiableRequired(builder.terms, this, "terms"); } @@ -79,8 +80,9 @@ public static TermVector of(Function> fn) { } /** - * Required - API name: {@code field_statistics} + * API name: {@code field_statistics} */ + @Nullable public final FieldStatistics fieldStatistics() { return this.fieldStatistics; } @@ -103,9 +105,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("field_statistics"); - this.fieldStatistics.serialize(generator, mapper); + if (this.fieldStatistics != null) { + generator.writeKey("field_statistics"); + this.fieldStatistics.serialize(generator, mapper); + } if (ApiTypeHelper.isDefined(this.terms)) { generator.writeKey("terms"); generator.writeStartObject(); @@ -132,20 +136,21 @@ public String toString() { */ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable private FieldStatistics fieldStatistics; private Map terms; /** - * Required - API name: {@code field_statistics} + * API name: {@code field_statistics} */ - public final Builder fieldStatistics(FieldStatistics value) { + public final Builder fieldStatistics(@Nullable FieldStatistics value) { this.fieldStatistics = value; return this; } /** - * Required - API name: {@code field_statistics} + * API name: {@code field_statistics} */ public final Builder fieldStatistics(Function> fn) { return this.fieldStatistics(fn.apply(new FieldStatistics.Builder()).build()); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html index 059fde231..9416183a6 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html @@ -10,7 +10,7 @@ '_global.bulk.OperationBase': '_global/bulk/types.ts#L90-L107', '_global.bulk.OperationContainer': '_global/bulk/types.ts#L145-L167', '_global.bulk.OperationType': '_global/bulk/types.ts#L83-L88', -'_global.bulk.Request': '_global/bulk/BulkRequest.ts#L32-L103', +'_global.bulk.Request': '_global/bulk/BulkRequest.ts#L32-L104', '_global.bulk.Response': '_global/bulk/BulkResponse.ts#L24-L31', '_global.bulk.ResponseItem': '_global/bulk/types.ts#L37-L81', '_global.bulk.UpdateAction': '_global/bulk/types.ts#L169-L205', @@ -22,33 +22,33 @@ '_global.close_point_in_time.Response': '_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L36', '_global.count.Request': '_global/count/CountRequest.ts#L26-L120', '_global.count.Response': '_global/count/CountResponse.ts#L23-L25', -'_global.create.Request': '_global/create/CreateRequest.ts#L32-L95', +'_global.create.Request': '_global/create/CreateRequest.ts#L32-L96', '_global.create.Response': '_global/create/CreateResponse.ts#L22-L24', -'_global.delete.Request': '_global/delete/DeleteRequest.ts#L34-L91', +'_global.delete.Request': '_global/delete/DeleteRequest.ts#L34-L92', '_global.delete.Response': '_global/delete/DeleteResponse.ts#L22-L34', -'_global.delete_by_query.Request': '_global/delete_by_query/DeleteByQueryRequest.ts#L36-L209', +'_global.delete_by_query.Request': '_global/delete_by_query/DeleteByQueryRequest.ts#L36-L210', '_global.delete_by_query.Response': '_global/delete_by_query/DeleteByQueryResponse.ts#L26-L45', -'_global.delete_script.Request': '_global/delete_script/DeleteScriptRequest.ts#L24-L51', +'_global.delete_script.Request': '_global/delete_script/DeleteScriptRequest.ts#L24-L52', '_global.delete_script.Response': '_global/delete_script/DeleteScriptResponse.ts#L22-L24', -'_global.exists.Request': '_global/exists/DocumentExistsRequest.ts#L31-L99', -'_global.exists_source.Request': '_global/exists_source/SourceExistsRequest.ts#L31-L93', +'_global.exists.Request': '_global/exists/DocumentExistsRequest.ts#L31-L100', +'_global.exists_source.Request': '_global/exists_source/SourceExistsRequest.ts#L31-L94', '_global.explain.Explanation': '_global/explain/types.ts#L22-L26', '_global.explain.ExplanationDetail': '_global/explain/types.ts#L28-L32', -'_global.explain.Request': '_global/explain/ExplainRequest.ts#L26-L105', +'_global.explain.Request': '_global/explain/ExplainRequest.ts#L26-L106', '_global.explain.Response': '_global/explain/ExplainResponse.ts#L23-L31', '_global.field_caps.FieldCapability': '_global/field_caps/types.ts#L23-L81', '_global.field_caps.Request': '_global/field_caps/FieldCapabilitiesRequest.ts#L25-L106', '_global.field_caps.Response': '_global/field_caps/FieldCapabilitiesResponse.ts#L24-L35', -'_global.get.GetResult': '_global/get/types.ts#L25-L35', -'_global.get.Request': '_global/get/GetRequest.ts#L31-L98', +'_global.get.GetResult': '_global/get/types.ts#L25-L36', +'_global.get.Request': '_global/get/GetRequest.ts#L31-L100', '_global.get.Response': '_global/get/GetResponse.ts#L23-L34', -'_global.get_script.Request': '_global/get_script/GetScriptRequest.ts#L24-L41', +'_global.get_script.Request': '_global/get_script/GetScriptRequest.ts#L24-L42', '_global.get_script.Response': '_global/get_script/GetScriptResponse.ts#L23-L29', -'_global.get_source.Request': '_global/get_source/SourceRequest.ts#L31-L86', +'_global.get_source.Request': '_global/get_source/SourceRequest.ts#L31-L88', '_global.get_source.Response': '_global/get_source/SourceResponse.ts#L20-L23', -'_global.index.Request': '_global/index/IndexRequest.ts#L35-L117', +'_global.index.Request': '_global/index/IndexRequest.ts#L35-L118', '_global.index.Response': '_global/index/IndexResponse.ts#L22-L24', -'_global.info.Request': '_global/info/RootNodeInfoRequest.ts#L22-L27', +'_global.info.Request': '_global/info/RootNodeInfoRequest.ts#L22-L29', '_global.info.Response': '_global/info/RootNodeInfoResponse.ts#L23-L31', '_global.mget.MultiGetError': '_global/mget/types.ts#L62-L66', '_global.mget.Operation': '_global/mget/types.ts#L32-L55', @@ -59,7 +59,7 @@ '_global.msearch.MultiSearchResult': '_global/msearch/types.ts#L203-L206', '_global.msearch.MultisearchBody': '_global/msearch/types.ts#L70-L201', '_global.msearch.MultisearchHeader': '_global/msearch/types.ts#L52-L67', -'_global.msearch.Request': '_global/msearch/MultiSearchRequest.ts#L25-L96', +'_global.msearch.Request': '_global/msearch/MultiSearchRequest.ts#L25-L106', '_global.msearch.Response': '_global/msearch/MultiSearchResponse.ts#L25-L27', '_global.msearch.ResponseItem': '_global/msearch/types.ts#L208-L211', '_global.msearch_template.Request': '_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L70', @@ -69,48 +69,48 @@ '_global.mtermvectors.Request': '_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L109', '_global.mtermvectors.Response': '_global/mtermvectors/MultiTermVectorsResponse.ts#L22-L24', '_global.mtermvectors.TermVectorsResult': '_global/mtermvectors/types.ts#L96-L104', -'_global.open_point_in_time.Request': '_global/open_point_in_time/OpenPointInTimeRequest.ts#L24-L68', -'_global.open_point_in_time.Response': '_global/open_point_in_time/OpenPointInTimeResponse.ts#L22-L24', -'_global.ping.Request': '_global/ping/PingRequest.ts#L22-L27', -'_global.put_script.Request': '_global/put_script/PutScriptRequest.ts#L25-L64', +'_global.open_point_in_time.Request': '_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L75', +'_global.open_point_in_time.Response': '_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L29', +'_global.ping.Request': '_global/ping/PingRequest.ts#L22-L29', +'_global.put_script.Request': '_global/put_script/PutScriptRequest.ts#L25-L65', '_global.put_script.Response': '_global/put_script/PutScriptResponse.ts#L22-L24', -'_global.rank_eval.DocumentRating': '_global/rank_eval/types.ts#L116-L123', -'_global.rank_eval.RankEvalHit': '_global/rank_eval/types.ts#L141-L145', -'_global.rank_eval.RankEvalHitItem': '_global/rank_eval/types.ts#L136-L139', +'_global.rank_eval.DocumentRating': '_global/rank_eval/types.ts#L119-L126', +'_global.rank_eval.RankEvalHit': '_global/rank_eval/types.ts#L144-L148', +'_global.rank_eval.RankEvalHitItem': '_global/rank_eval/types.ts#L139-L142', '_global.rank_eval.RankEvalMetric': '_global/rank_eval/types.ts#L90-L96', '_global.rank_eval.RankEvalMetricBase': '_global/rank_eval/types.ts#L26-L32', -'_global.rank_eval.RankEvalMetricDetail': '_global/rank_eval/types.ts#L125-L134', +'_global.rank_eval.RankEvalMetricDetail': '_global/rank_eval/types.ts#L128-L137', '_global.rank_eval.RankEvalMetricDiscountedCumulativeGain': '_global/rank_eval/types.ts#L66-L77', '_global.rank_eval.RankEvalMetricExpectedReciprocalRank': '_global/rank_eval/types.ts#L79-L88', '_global.rank_eval.RankEvalMetricMeanReciprocalRank': '_global/rank_eval/types.ts#L60-L64', '_global.rank_eval.RankEvalMetricPrecision': '_global/rank_eval/types.ts#L42-L52', '_global.rank_eval.RankEvalMetricRatingTreshold': '_global/rank_eval/types.ts#L34-L40', '_global.rank_eval.RankEvalMetricRecall': '_global/rank_eval/types.ts#L54-L58', -'_global.rank_eval.RankEvalQuery': '_global/rank_eval/types.ts#L111-L114', +'_global.rank_eval.RankEvalQuery': '_global/rank_eval/types.ts#L111-L117', '_global.rank_eval.RankEvalRequestItem': '_global/rank_eval/types.ts#L98-L109', '_global.rank_eval.Request': '_global/rank_eval/RankEvalRequest.ts#L24-L61', '_global.rank_eval.Response': '_global/rank_eval/RankEvalResponse.ts#L26-L34', -'_global.rank_eval.UnratedDocument': '_global/rank_eval/types.ts#L147-L150', +'_global.rank_eval.UnratedDocument': '_global/rank_eval/types.ts#L150-L153', '_global.reindex.Destination': '_global/reindex/types.ts#L39-L64', '_global.reindex.RemoteSource': '_global/reindex/types.ts#L99-L125', -'_global.reindex.Request': '_global/reindex/ReindexRequest.ts#L27-L101', +'_global.reindex.Request': '_global/reindex/ReindexRequest.ts#L27-L103', '_global.reindex.Response': '_global/reindex/ReindexResponse.ts#L26-L45', '_global.reindex.Source': '_global/reindex/types.ts#L66-L97', '_global.render_search_template.Request': '_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L55', '_global.render_search_template.Response': '_global/render_search_template/RenderSearchTemplateResponse.ts#L23-L25', '_global.scripts_painless_execute.PainlessContextSetup': '_global/scripts_painless_execute/types.ts#L25-L39', -'_global.scripts_painless_execute.Request': '_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L46', +'_global.scripts_painless_execute.Request': '_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L47', '_global.scripts_painless_execute.Response': '_global/scripts_painless_execute/ExecutePainlessScriptResponse.ts#L20-L24', '_global.scroll.Request': '_global/scroll/ScrollRequest.ts#L24-L59', '_global.scroll.Response': '_global/scroll/ScrollResponse.ts#L22-L24', -'_global.search.Request': '_global/search/SearchRequest.ts#L54-L520', +'_global.search.Request': '_global/search/SearchRequest.ts#L54-L529', '_global.search.Response': '_global/search/SearchResponse.ts#L34-L36', '_global.search.ResponseBody': '_global/search/SearchResponse.ts#L38-L54', '_global.search._types.AggregationBreakdown': '_global/search/_types/profile.ts#L23-L36', '_global.search._types.AggregationProfile': '_global/search/_types/profile.ts#L77-L84', '_global.search._types.AggregationProfileDebug': '_global/search/_types/profile.ts#L39-L68', '_global.search._types.AggregationProfileDelegateDebugFilter': '_global/search/_types/profile.ts#L70-L75', -'_global.search._types.BoundaryScanner': '_global/search/_types/highlighting.ts#L27-L46', +'_global.search._types.BoundaryScanner': '_global/search/_types/highlighting.ts#L26-L45', '_global.search._types.Collector': '_global/search/_types/profile.ts#L86-L91', '_global.search._types.CompletionContext': '_global/search/_types/suggester.ts#L235-L264', '_global.search._types.CompletionSuggest': '_global/search/_types/suggester.ts#L48-L55', @@ -123,22 +123,22 @@ '_global.search._types.FetchProfileDebug': '_global/search/_types/profile.ts#L159-L162', '_global.search._types.FieldCollapse': '_global/search/_types/FieldCollapse.ts#L24-L38', '_global.search._types.FieldSuggester': '_global/search/_types/suggester.ts#L109-L142', -'_global.search._types.Highlight': '_global/search/_types/highlighting.ts#L153-L156', -'_global.search._types.HighlightBase': '_global/search/_types/highlighting.ts#L48-L151', -'_global.search._types.HighlightField': '_global/search/_types/highlighting.ts#L193-L197', -'_global.search._types.HighlighterEncoder': '_global/search/_types/highlighting.ts#L158-L161', -'_global.search._types.HighlighterFragmenter': '_global/search/_types/highlighting.ts#L163-L166', -'_global.search._types.HighlighterOrder': '_global/search/_types/highlighting.ts#L168-L170', -'_global.search._types.HighlighterTagsSchema': '_global/search/_types/highlighting.ts#L172-L174', -'_global.search._types.HighlighterType': '_global/search/_types/highlighting.ts#L176-L191', -'_global.search._types.Hit': '_global/search/_types/hits.ts#L40-L64', -'_global.search._types.HitsMetadata': '_global/search/_types/hits.ts#L66-L72', -'_global.search._types.InnerHits': '_global/search/_types/hits.ts#L106-L140', -'_global.search._types.InnerHitsResult': '_global/search/_types/hits.ts#L84-L86', +'_global.search._types.Highlight': '_global/search/_types/highlighting.ts#L152-L155', +'_global.search._types.HighlightBase': '_global/search/_types/highlighting.ts#L47-L150', +'_global.search._types.HighlightField': '_global/search/_types/highlighting.ts#L192-L195', +'_global.search._types.HighlighterEncoder': '_global/search/_types/highlighting.ts#L157-L160', +'_global.search._types.HighlighterFragmenter': '_global/search/_types/highlighting.ts#L162-L165', +'_global.search._types.HighlighterOrder': '_global/search/_types/highlighting.ts#L167-L169', +'_global.search._types.HighlighterTagsSchema': '_global/search/_types/highlighting.ts#L171-L173', +'_global.search._types.HighlighterType': '_global/search/_types/highlighting.ts#L175-L190', +'_global.search._types.Hit': '_global/search/_types/hits.ts#L40-L65', +'_global.search._types.HitsMetadata': '_global/search/_types/hits.ts#L67-L73', +'_global.search._types.InnerHits': '_global/search/_types/hits.ts#L107-L141', +'_global.search._types.InnerHitsResult': '_global/search/_types/hits.ts#L85-L87', '_global.search._types.LaplaceSmoothingModel': '_global/search/_types/suggester.ts#L430-L435', '_global.search._types.LearningToRank': '_global/search/_types/rescoring.ts#L88-L97', '_global.search._types.LinearInterpolationSmoothingModel': '_global/search/_types/suggester.ts#L437-L441', -'_global.search._types.NestedIdentity': '_global/search/_types/hits.ts#L88-L92', +'_global.search._types.NestedIdentity': '_global/search/_types/hits.ts#L89-L93', '_global.search._types.PhraseSuggest': '_global/search/_types/suggester.ts#L57-L62', '_global.search._types.PhraseSuggestCollate': '_global/search/_types/suggester.ts#L333-L346', '_global.search._types.PhraseSuggestCollateQuery': '_global/search/_types/suggester.ts#L348-L357', @@ -170,10 +170,10 @@ '_global.search._types.TermSuggest': '_global/search/_types/suggester.ts#L64-L69', '_global.search._types.TermSuggestOption': '_global/search/_types/suggester.ts#L93-L99', '_global.search._types.TermSuggester': '_global/search/_types/suggester.ts#L506-L568', -'_global.search._types.TotalHits': '_global/search/_types/hits.ts#L94-L97', -'_global.search._types.TotalHitsRelation': '_global/search/_types/hits.ts#L99-L104', -'_global.search._types.TrackHits': '_global/search/_types/hits.ts#L142-L150', -'_global.search_mvt.Request': '_global/search_mvt/SearchMvtRequest.ts#L33-L188', +'_global.search._types.TotalHits': '_global/search/_types/hits.ts#L95-L98', +'_global.search._types.TotalHitsRelation': '_global/search/_types/hits.ts#L100-L105', +'_global.search._types.TrackHits': '_global/search/_types/hits.ts#L143-L151', +'_global.search_mvt.Request': '_global/search_mvt/SearchMvtRequest.ts#L33-L190', '_global.search_mvt.Response': '_global/search_mvt/SearchMvtResponse.ts#L22-L25', '_global.search_mvt._types.GridAggregationType': '_global/search_mvt/_types/GridType.ts#L30-L33', '_global.search_mvt._types.GridType': '_global/search_mvt/_types/GridType.ts#L20-L28', @@ -183,371 +183,392 @@ '_global.terms_enum.Response': '_global/terms_enum/TermsEnumResponse.ts#L22-L28', '_global.termvectors.FieldStatistics': '_global/termvectors/types.ts#L28-L32', '_global.termvectors.Filter': '_global/termvectors/types.ts#L49-L86', -'_global.termvectors.Request': '_global/termvectors/TermVectorsRequest.ts#L33-L118', +'_global.termvectors.Request': '_global/termvectors/TermVectorsRequest.ts#L33-L120', '_global.termvectors.Response': '_global/termvectors/TermVectorsResponse.ts#L25-L34', '_global.termvectors.Term': '_global/termvectors/types.ts#L34-L40', '_global.termvectors.TermVector': '_global/termvectors/types.ts#L23-L26', '_global.termvectors.Token': '_global/termvectors/types.ts#L42-L47', -'_global.update.Request': '_global/update/UpdateRequest.ts#L38-L151', +'_global.update.Request': '_global/update/UpdateRequest.ts#L38-L153', '_global.update.Response': '_global/update/UpdateResponse.ts#L27-L29', '_global.update.UpdateWriteResponseBase': '_global/update/UpdateResponse.ts#L23-L25', -'_global.update_by_query.Request': '_global/update_by_query/UpdateByQueryRequest.ts#L37-L221', +'_global.update_by_query.Request': '_global/update_by_query/UpdateByQueryRequest.ts#L37-L226', '_global.update_by_query.Response': '_global/update_by_query/UpdateByQueryResponse.ts#L26-L45', '_types.AcknowledgedResponseBase': '_types/Base.ts#L47-L50', '_types.BulkIndexByScrollFailure': '_types/Errors.ts#L60-L66', -'_types.Bytes': '_types/common.ts#L169-L181', +'_types.Bytes': '_types/common.ts#L170-L182', '_types.ClusterDetails': '_types/Stats.ts#L45-L52', -'_types.ClusterInfoTarget': '_types/common.ts#L381-L387', +'_types.ClusterInfoTarget': '_types/common.ts#L382-L388', '_types.ClusterSearchStatus': '_types/Stats.ts#L37-L43', '_types.ClusterStatistics': '_types/Stats.ts#L27-L35', -'_types.Conflicts': '_types/common.ts#L183-L192', +'_types.Conflicts': '_types/common.ts#L184-L193', '_types.CoordsGeoBounds': '_types/Geo.ts#L154-L159', '_types.DFIIndependenceMeasure': '_types/Similarity.ts#L20-L24', '_types.DFRAfterEffect': '_types/Similarity.ts#L26-L30', '_types.DFRBasicModel': '_types/Similarity.ts#L32-L40', '_types.DistanceUnit': '_types/Geo.ts#L30-L40', '_types.ElasticsearchVersionInfo': '_types/Base.ts#L54-L64', -'_types.EmptyObject': '_types/common.ts#L160-L161', +'_types.EmptyObject': '_types/common.ts#L161-L162', '_types.ErrorCause': '_types/Errors.ts#L25-L50', '_types.ErrorResponseBase': '_types/Base.ts#L76-L85', -'_types.ExpandWildcard': '_types/common.ts#L201-L215', -'_types.FieldSort': '_types/sort.ts#L44-L53', -'_types.FieldSortNumericType': '_types/sort.ts#L37-L42', +'_types.ExpandWildcard': '_types/common.ts#L202-L216', +'_types.FieldSort': '_types/sort.ts#L43-L52', +'_types.FieldSortNumericType': '_types/sort.ts#L36-L41', '_types.GeoBounds': '_types/Geo.ts#L135-L148', -'_types.GeoDistanceSort': '_types/sort.ts#L59-L71', +'_types.GeoDistanceSort': '_types/sort.ts#L58-L70', '_types.GeoDistanceType': '_types/Geo.ts#L42-L51', '_types.GeoHashLocation': '_types/Geo.ts#L131-L133', '_types.GeoHashPrecision': '_types/Geo.ts#L86-L90', '_types.GeoLine': '_types/Geo.ts#L56-L62', '_types.GeoLocation': '_types/Geo.ts#L104-L118', '_types.GeoShapeRelation': '_types/Geo.ts#L64-L82', -'_types.HealthStatus': '_types/common.ts#L219-L239', +'_types.HealthStatus': '_types/common.ts#L220-L240', '_types.IBDistribution': '_types/Similarity.ts#L42-L45', '_types.IBLambda': '_types/Similarity.ts#L47-L50', -'_types.IndicesOptions': '_types/common.ts#L335-L362', +'_types.IndicesOptions': '_types/common.ts#L336-L363', '_types.IndicesResponseBase': '_types/Base.ts#L87-L89', -'_types.InlineGet': '_types/common.ts#L320-L333', -'_types.KnnQuery': '_types/Knn.ts#L54-L67', +'_types.InlineGet': '_types/common.ts#L321-L334', +'_types.KnnQuery': '_types/Knn.ts#L54-L69', '_types.KnnRetriever': '_types/Retriever.ts#L58-L71', '_types.KnnSearch': '_types/Knn.ts#L30-L52', '_types.LatLonGeoLocation': '_types/Geo.ts#L120-L129', -'_types.NestedSortValue': '_types/sort.ts#L30-L35', +'_types.NestedSortValue': '_types/sort.ts#L29-L34', '_types.Normalization': '_types/Similarity.ts#L52-L58', -'_types.OpType': '_types/common.ts#L255-L264', -'_types.QueryVectorBuilder': '_types/Knn.ts#L69-L72', +'_types.OpType': '_types/common.ts#L256-L265', +'_types.QueryVectorBuilder': '_types/Knn.ts#L71-L74', '_types.RRFRetriever': '_types/Retriever.ts#L73-L80', -'_types.RankBase': '_types/Rank.ts#L30-L30', -'_types.RankContainer': '_types/Rank.ts#L22-L28', -'_types.Refresh': '_types/common.ts#L266-L273', +'_types.Refresh': '_types/common.ts#L267-L274', '_types.RequestBase': '_types/Base.ts#L34-L34', '_types.Result': '_types/Result.ts#L20-L26', '_types.Retries': '_types/Retries.ts#L22-L25', '_types.RetrieverBase': '_types/Retriever.ts#L38-L41', '_types.RetrieverContainer': '_types/Retriever.ts#L26-L36', -'_types.RrfRank': '_types/Rank.ts#L32-L37', -'_types.ScoreSort': '_types/sort.ts#L55-L57', +'_types.ScoreSort': '_types/sort.ts#L54-L56', '_types.Script': '_types/Scripting.ts#L73-L97', '_types.ScriptField': '_types/Scripting.ts#L99-L102', '_types.ScriptLanguage': '_types/Scripting.ts#L24-L45', -'_types.ScriptSort': '_types/sort.ts#L73-L79', -'_types.ScriptSortType': '_types/sort.ts#L81-L85', -'_types.SearchType': '_types/common.ts#L275-L280', +'_types.ScriptSort': '_types/sort.ts#L72-L78', +'_types.ScriptSortType': '_types/sort.ts#L80-L84', +'_types.SearchType': '_types/common.ts#L276-L281', '_types.ShardFailure': '_types/Errors.ts#L52-L58', '_types.ShardStatistics': '_types/Stats.ts#L54-L66', '_types.ShardsOperationResponseBase': '_types/Base.ts#L91-L93', '_types.SlicedScroll': '_types/SlicedScroll.ts#L23-L27', -'_types.Slices': '_types/common.ts#L364-L369', -'_types.SlicesCalculation': '_types/common.ts#L371-L379', -'_types.SortMode': '_types/sort.ts#L109-L118', -'_types.SortOptions': '_types/sort.ts#L87-L97', -'_types.SortOrder': '_types/sort.ts#L120-L129', +'_types.Slices': '_types/common.ts#L365-L370', +'_types.SlicesCalculation': '_types/common.ts#L372-L380', +'_types.SortMode': '_types/sort.ts#L108-L117', +'_types.SortOptions': '_types/sort.ts#L86-L96', +'_types.SortOrder': '_types/sort.ts#L119-L128', '_types.StandardRetriever': '_types/Retriever.ts#L43-L56', '_types.StoredScript': '_types/Scripting.ts#L47-L57', -'_types.SuggestMode': '_types/common.ts#L282-L295', -'_types.TextEmbedding': '_types/Knn.ts#L74-L77', +'_types.SuggestMode': '_types/common.ts#L283-L296', +'_types.TextEmbedding': '_types/Knn.ts#L76-L79', '_types.TimeUnit': '_types/Time.ts#L69-L77', '_types.TopLeftBottomRightGeoBounds': '_types/Geo.ts#L161-L164', '_types.TopRightBottomLeftGeoBounds': '_types/Geo.ts#L166-L169', -'_types.VersionType': '_types/common.ts#L106-L122', -'_types.WaitForActiveShardOptions': '_types/common.ts#L305-L309', -'_types.WaitForActiveShards': '_types/common.ts#L142-L143', +'_types.VersionType': '_types/common.ts#L107-L123', +'_types.WaitForActiveShardOptions': '_types/common.ts#L306-L310', +'_types.WaitForActiveShards': '_types/common.ts#L143-L144', '_types.WktGeoBounds': '_types/Geo.ts#L150-L152', '_types.WriteResponseBase': '_types/Base.ts#L36-L45', -'_types.aggregations.AdjacencyMatrixAggregate': '_types/aggregations/Aggregate.ts#L577-L579', -'_types.aggregations.AdjacencyMatrixAggregation': '_types/aggregations/bucket.ts#L55-L65', -'_types.aggregations.AdjacencyMatrixBucket': '_types/aggregations/Aggregate.ts#L581-L583', -'_types.aggregations.Aggregate': '_types/aggregations/Aggregate.ts#L38-L123', -'_types.aggregations.AggregateBase': '_types/aggregations/Aggregate.ts#L134-L136', +'_types.aggregations.AdjacencyMatrixAggregate': '_types/aggregations/Aggregate.ts#L578-L580', +'_types.aggregations.AdjacencyMatrixAggregation': '_types/aggregations/bucket.ts#L60-L70', +'_types.aggregations.AdjacencyMatrixBucket': '_types/aggregations/Aggregate.ts#L582-L584', +'_types.aggregations.Aggregate': '_types/aggregations/Aggregate.ts#L38-L124', +'_types.aggregations.AggregateBase': '_types/aggregations/Aggregate.ts#L135-L137', '_types.aggregations.Aggregation': '_types/aggregations/Aggregation.ts#L20-L20', -'_types.aggregations.AggregationContainer': '_types/aggregations/AggregationContainer.ts#L105-L514', -'_types.aggregations.AggregationRange': '_types/aggregations/bucket.ts#L674-L687', -'_types.aggregations.ArrayPercentilesItem': '_types/aggregations/Aggregate.ts#L160-L164', -'_types.aggregations.AutoDateHistogramAggregate': '_types/aggregations/Aggregate.ts#L358-L362', -'_types.aggregations.AutoDateHistogramAggregation': '_types/aggregations/bucket.ts#L67-L102', +'_types.aggregations.AggregationContainer': '_types/aggregations/AggregationContainer.ts#L106-L523', +'_types.aggregations.AggregationRange': '_types/aggregations/bucket.ts#L679-L692', +'_types.aggregations.ArrayPercentilesItem': '_types/aggregations/Aggregate.ts#L161-L165', +'_types.aggregations.AutoDateHistogramAggregate': '_types/aggregations/Aggregate.ts#L359-L363', +'_types.aggregations.AutoDateHistogramAggregation': '_types/aggregations/bucket.ts#L72-L107', '_types.aggregations.AverageAggregation': '_types/aggregations/metric.ts#L55-L55', '_types.aggregations.AverageBucketAggregation': '_types/aggregations/pipeline.ts#L78-L78', -'_types.aggregations.AvgAggregate': '_types/aggregations/Aggregate.ts#L209-L210', -'_types.aggregations.BoxPlotAggregate': '_types/aggregations/Aggregate.ts#L713-L729', +'_types.aggregations.AvgAggregate': '_types/aggregations/Aggregate.ts#L210-L211', +'_types.aggregations.BoxPlotAggregate': '_types/aggregations/Aggregate.ts#L721-L737', '_types.aggregations.BoxplotAggregation': '_types/aggregations/metric.ts#L57-L62', -'_types.aggregations.BucketAggregationBase': '_types/aggregations/bucket.ts#L48-L53', +'_types.aggregations.BucketAggregationBase': '_types/aggregations/bucket.ts#L53-L58', '_types.aggregations.BucketCorrelationAggregation': '_types/aggregations/pipeline.ts#L129-L135', '_types.aggregations.BucketCorrelationFunction': '_types/aggregations/pipeline.ts#L137-L142', '_types.aggregations.BucketCorrelationFunctionCountCorrelation': '_types/aggregations/pipeline.ts#L144-L147', '_types.aggregations.BucketCorrelationFunctionCountCorrelationIndicator': '_types/aggregations/pipeline.ts#L149-L167', '_types.aggregations.BucketKsAggregation': '_types/aggregations/pipeline.ts#L94-L127', -'_types.aggregations.BucketMetricValueAggregate': '_types/aggregations/Aggregate.ts#L233-L236', +'_types.aggregations.BucketMetricValueAggregate': '_types/aggregations/Aggregate.ts#L234-L237', '_types.aggregations.BucketPathAggregation': '_types/aggregations/pipeline.ts#L31-L37', '_types.aggregations.BucketScriptAggregation': '_types/aggregations/pipeline.ts#L80-L85', '_types.aggregations.BucketSelectorAggregation': '_types/aggregations/pipeline.ts#L87-L92', '_types.aggregations.BucketSortAggregation': '_types/aggregations/pipeline.ts#L169-L190', -'_types.aggregations.Buckets': '_types/aggregations/Aggregate.ts#L316-L325', +'_types.aggregations.Buckets': '_types/aggregations/Aggregate.ts#L317-L326', '_types.aggregations.BucketsPath': '_types/aggregations/pipeline.ts#L53-L59', -'_types.aggregations.CalendarInterval': '_types/aggregations/bucket.ts#L251-L268', -'_types.aggregations.CardinalityAggregate': '_types/aggregations/Aggregate.ts#L138-L141', +'_types.aggregations.CalendarInterval': '_types/aggregations/bucket.ts#L256-L273', +'_types.aggregations.CardinalityAggregate': '_types/aggregations/Aggregate.ts#L139-L142', '_types.aggregations.CardinalityAggregation': '_types/aggregations/metric.ts#L87-L99', '_types.aggregations.CardinalityExecutionMode': '_types/aggregations/metric.ts#L64-L85', -'_types.aggregations.CategorizeTextAggregation': '_types/aggregations/bucket.ts#L1045-L1109', -'_types.aggregations.CategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1111-L1114', -'_types.aggregations.ChiSquareHeuristic': '_types/aggregations/bucket.ts#L737-L746', -'_types.aggregations.ChildrenAggregate': '_types/aggregations/Aggregate.ts#L783-L784', -'_types.aggregations.ChildrenAggregation': '_types/aggregations/bucket.ts#L113-L118', -'_types.aggregations.CompositeAggregate': '_types/aggregations/Aggregate.ts#L622-L627', -'_types.aggregations.CompositeAggregation': '_types/aggregations/bucket.ts#L122-L138', -'_types.aggregations.CompositeAggregationBase': '_types/aggregations/bucket.ts#L159-L168', -'_types.aggregations.CompositeAggregationSource': '_types/aggregations/bucket.ts#L140-L157', -'_types.aggregations.CompositeBucket': '_types/aggregations/Aggregate.ts#L629-L631', -'_types.aggregations.CompositeDateHistogramAggregation': '_types/aggregations/bucket.ts#L176-L184', -'_types.aggregations.CompositeGeoTileGridAggregation': '_types/aggregations/bucket.ts#L186-L189', -'_types.aggregations.CompositeHistogramAggregation': '_types/aggregations/bucket.ts#L172-L174', -'_types.aggregations.CompositeTermsAggregation': '_types/aggregations/bucket.ts#L170-L170', -'_types.aggregations.CumulativeCardinalityAggregate': '_types/aggregations/Aggregate.ts#L754-L762', +'_types.aggregations.CategorizeTextAggregation': '_types/aggregations/bucket.ts#L1062-L1126', +'_types.aggregations.CategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1128-L1131', +'_types.aggregations.ChiSquareHeuristic': '_types/aggregations/bucket.ts#L742-L751', +'_types.aggregations.ChildrenAggregate': '_types/aggregations/Aggregate.ts#L791-L792', +'_types.aggregations.ChildrenAggregation': '_types/aggregations/bucket.ts#L118-L123', +'_types.aggregations.CompositeAggregate': '_types/aggregations/Aggregate.ts#L623-L628', +'_types.aggregations.CompositeAggregation': '_types/aggregations/bucket.ts#L127-L143', +'_types.aggregations.CompositeAggregationBase': '_types/aggregations/bucket.ts#L164-L173', +'_types.aggregations.CompositeAggregationSource': '_types/aggregations/bucket.ts#L145-L162', +'_types.aggregations.CompositeBucket': '_types/aggregations/Aggregate.ts#L630-L632', +'_types.aggregations.CompositeDateHistogramAggregation': '_types/aggregations/bucket.ts#L181-L189', +'_types.aggregations.CompositeGeoTileGridAggregation': '_types/aggregations/bucket.ts#L191-L194', +'_types.aggregations.CompositeHistogramAggregation': '_types/aggregations/bucket.ts#L177-L179', +'_types.aggregations.CompositeTermsAggregation': '_types/aggregations/bucket.ts#L175-L175', +'_types.aggregations.CumulativeCardinalityAggregate': '_types/aggregations/Aggregate.ts#L762-L770', '_types.aggregations.CumulativeCardinalityAggregation': '_types/aggregations/pipeline.ts#L192-L192', '_types.aggregations.CumulativeSumAggregation': '_types/aggregations/pipeline.ts#L194-L194', -'_types.aggregations.CustomCategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1116-L1120', -'_types.aggregations.DateHistogramAggregate': '_types/aggregations/Aggregate.ts#L350-L351', -'_types.aggregations.DateHistogramAggregation': '_types/aggregations/bucket.ts#L191-L249', -'_types.aggregations.DateHistogramBucket': '_types/aggregations/Aggregate.ts#L353-L356', -'_types.aggregations.DateRangeAggregate': '_types/aggregations/Aggregate.ts#L547-L552', -'_types.aggregations.DateRangeAggregation': '_types/aggregations/bucket.ts#L270-L296', -'_types.aggregations.DateRangeExpression': '_types/aggregations/bucket.ts#L307-L320', -'_types.aggregations.DerivativeAggregate': '_types/aggregations/Aggregate.ts#L227-L231', +'_types.aggregations.CustomCategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1133-L1137', +'_types.aggregations.DateHistogramAggregate': '_types/aggregations/Aggregate.ts#L351-L352', +'_types.aggregations.DateHistogramAggregation': '_types/aggregations/bucket.ts#L196-L254', +'_types.aggregations.DateHistogramBucket': '_types/aggregations/Aggregate.ts#L354-L357', +'_types.aggregations.DateRangeAggregate': '_types/aggregations/Aggregate.ts#L548-L553', +'_types.aggregations.DateRangeAggregation': '_types/aggregations/bucket.ts#L275-L301', +'_types.aggregations.DateRangeExpression': '_types/aggregations/bucket.ts#L312-L325', +'_types.aggregations.DerivativeAggregate': '_types/aggregations/Aggregate.ts#L228-L232', '_types.aggregations.DerivativeAggregation': '_types/aggregations/pipeline.ts#L196-L196', -'_types.aggregations.DiversifiedSamplerAggregation': '_types/aggregations/bucket.ts#L322-L343', -'_types.aggregations.DoubleTermsAggregate': '_types/aggregations/Aggregate.ts#L413-L418', -'_types.aggregations.DoubleTermsBucket': '_types/aggregations/Aggregate.ts#L420-L423', +'_types.aggregations.DiversifiedSamplerAggregation': '_types/aggregations/bucket.ts#L327-L348', +'_types.aggregations.DoubleTermsAggregate': '_types/aggregations/Aggregate.ts#L414-L419', +'_types.aggregations.DoubleTermsBucket': '_types/aggregations/Aggregate.ts#L421-L424', '_types.aggregations.EwmaModelSettings': '_types/aggregations/pipeline.ts#L267-L269', '_types.aggregations.EwmaMovingAverageAggregation': '_types/aggregations/pipeline.ts#L252-L255', -'_types.aggregations.ExtendedBounds': '_types/aggregations/bucket.ts#L491-L500', -'_types.aggregations.ExtendedStatsAggregate': '_types/aggregations/Aggregate.ts#L278-L296', +'_types.aggregations.ExtendedBounds': '_types/aggregations/bucket.ts#L496-L505', +'_types.aggregations.ExtendedStatsAggregate': '_types/aggregations/Aggregate.ts#L279-L297', '_types.aggregations.ExtendedStatsAggregation': '_types/aggregations/metric.ts#L101-L106', -'_types.aggregations.ExtendedStatsBucketAggregate': '_types/aggregations/Aggregate.ts#L298-L299', +'_types.aggregations.ExtendedStatsBucketAggregate': '_types/aggregations/Aggregate.ts#L299-L300', '_types.aggregations.ExtendedStatsBucketAggregation': '_types/aggregations/pipeline.ts#L198-L203', -'_types.aggregations.FieldDateMath': '_types/aggregations/bucket.ts#L298-L305', -'_types.aggregations.FilterAggregate': '_types/aggregations/Aggregate.ts#L499-L500', -'_types.aggregations.FiltersAggregate': '_types/aggregations/Aggregate.ts#L572-L573', -'_types.aggregations.FiltersAggregation': '_types/aggregations/bucket.ts#L360-L380', -'_types.aggregations.FiltersBucket': '_types/aggregations/Aggregate.ts#L575-L575', +'_types.aggregations.FieldDateMath': '_types/aggregations/bucket.ts#L303-L310', +'_types.aggregations.FilterAggregate': '_types/aggregations/Aggregate.ts#L500-L501', +'_types.aggregations.FiltersAggregate': '_types/aggregations/Aggregate.ts#L573-L574', +'_types.aggregations.FiltersAggregation': '_types/aggregations/bucket.ts#L365-L385', +'_types.aggregations.FiltersBucket': '_types/aggregations/Aggregate.ts#L576-L576', '_types.aggregations.FormatMetricAggregationBase': '_types/aggregations/metric.ts#L47-L49', '_types.aggregations.FormattableMetricAggregation': '_types/aggregations/metric.ts#L51-L53', -'_types.aggregations.FrequentItemSetsAggregate': '_types/aggregations/Aggregate.ts#L643-L644', -'_types.aggregations.FrequentItemSetsAggregation': '_types/aggregations/bucket.ts#L1167-L1191', -'_types.aggregations.FrequentItemSetsBucket': '_types/aggregations/Aggregate.ts#L646-L649', -'_types.aggregations.FrequentItemSetsField': '_types/aggregations/bucket.ts#L1153-L1165', +'_types.aggregations.FrequentItemSetsAggregate': '_types/aggregations/Aggregate.ts#L644-L645', +'_types.aggregations.FrequentItemSetsAggregation': '_types/aggregations/bucket.ts#L1184-L1208', +'_types.aggregations.FrequentItemSetsBucket': '_types/aggregations/Aggregate.ts#L647-L650', +'_types.aggregations.FrequentItemSetsField': '_types/aggregations/bucket.ts#L1170-L1182', '_types.aggregations.GapPolicy': '_types/aggregations/pipeline.ts#L61-L76', -'_types.aggregations.GeoBoundsAggregate': '_types/aggregations/Aggregate.ts#L303-L306', +'_types.aggregations.GeoBoundsAggregate': '_types/aggregations/Aggregate.ts#L304-L307', '_types.aggregations.GeoBoundsAggregation': '_types/aggregations/metric.ts#L108-L114', -'_types.aggregations.GeoCentroidAggregate': '_types/aggregations/Aggregate.ts#L308-L312', +'_types.aggregations.GeoCentroidAggregate': '_types/aggregations/Aggregate.ts#L309-L313', '_types.aggregations.GeoCentroidAggregation': '_types/aggregations/metric.ts#L116-L119', -'_types.aggregations.GeoDistanceAggregate': '_types/aggregations/Aggregate.ts#L554-L558', -'_types.aggregations.GeoDistanceAggregation': '_types/aggregations/bucket.ts#L382-L405', -'_types.aggregations.GeoHashGridAggregate': '_types/aggregations/Aggregate.ts#L510-L512', -'_types.aggregations.GeoHashGridAggregation': '_types/aggregations/bucket.ts#L407-L432', -'_types.aggregations.GeoHashGridBucket': '_types/aggregations/Aggregate.ts#L514-L516', -'_types.aggregations.GeoHexGridAggregate': '_types/aggregations/Aggregate.ts#L526-L527', -'_types.aggregations.GeoHexGridBucket': '_types/aggregations/Aggregate.ts#L529-L531', -'_types.aggregations.GeoLineAggregate': '_types/aggregations/Aggregate.ts#L791-L798', +'_types.aggregations.GeoDistanceAggregate': '_types/aggregations/Aggregate.ts#L555-L559', +'_types.aggregations.GeoDistanceAggregation': '_types/aggregations/bucket.ts#L387-L410', +'_types.aggregations.GeoHashGridAggregate': '_types/aggregations/Aggregate.ts#L511-L513', +'_types.aggregations.GeoHashGridAggregation': '_types/aggregations/bucket.ts#L412-L437', +'_types.aggregations.GeoHashGridBucket': '_types/aggregations/Aggregate.ts#L515-L517', +'_types.aggregations.GeoHexGridAggregate': '_types/aggregations/Aggregate.ts#L527-L528', +'_types.aggregations.GeoHexGridBucket': '_types/aggregations/Aggregate.ts#L530-L532', +'_types.aggregations.GeoLineAggregate': '_types/aggregations/Aggregate.ts#L799-L806', '_types.aggregations.GeoLineAggregation': '_types/aggregations/metric.ts#L121-L146', '_types.aggregations.GeoLinePoint': '_types/aggregations/metric.ts#L155-L160', '_types.aggregations.GeoLineSort': '_types/aggregations/metric.ts#L148-L153', -'_types.aggregations.GeoTileGridAggregate': '_types/aggregations/Aggregate.ts#L518-L520', -'_types.aggregations.GeoTileGridAggregation': '_types/aggregations/bucket.ts#L434-L460', -'_types.aggregations.GeoTileGridBucket': '_types/aggregations/Aggregate.ts#L522-L524', -'_types.aggregations.GeohexGridAggregation': '_types/aggregations/bucket.ts#L462-L487', -'_types.aggregations.GlobalAggregate': '_types/aggregations/Aggregate.ts#L496-L497', -'_types.aggregations.GlobalAggregation': '_types/aggregations/bucket.ts#L489-L489', -'_types.aggregations.GoogleNormalizedDistanceHeuristic': '_types/aggregations/bucket.ts#L748-L753', +'_types.aggregations.GeoTileGridAggregate': '_types/aggregations/Aggregate.ts#L519-L521', +'_types.aggregations.GeoTileGridAggregation': '_types/aggregations/bucket.ts#L439-L465', +'_types.aggregations.GeoTileGridBucket': '_types/aggregations/Aggregate.ts#L523-L525', +'_types.aggregations.GeohexGridAggregation': '_types/aggregations/bucket.ts#L467-L492', +'_types.aggregations.GlobalAggregate': '_types/aggregations/Aggregate.ts#L497-L498', +'_types.aggregations.GlobalAggregation': '_types/aggregations/bucket.ts#L494-L494', +'_types.aggregations.GoogleNormalizedDistanceHeuristic': '_types/aggregations/bucket.ts#L753-L758', '_types.aggregations.HdrMethod': '_types/aggregations/metric.ts#L216-L221', -'_types.aggregations.HdrPercentileRanksAggregate': '_types/aggregations/Aggregate.ts#L169-L170', -'_types.aggregations.HdrPercentilesAggregate': '_types/aggregations/Aggregate.ts#L166-L167', -'_types.aggregations.HistogramAggregate': '_types/aggregations/Aggregate.ts#L342-L343', -'_types.aggregations.HistogramAggregation': '_types/aggregations/bucket.ts#L502-L548', -'_types.aggregations.HistogramBucket': '_types/aggregations/Aggregate.ts#L345-L348', +'_types.aggregations.HdrPercentileRanksAggregate': '_types/aggregations/Aggregate.ts#L170-L171', +'_types.aggregations.HdrPercentilesAggregate': '_types/aggregations/Aggregate.ts#L167-L168', +'_types.aggregations.HistogramAggregate': '_types/aggregations/Aggregate.ts#L343-L344', +'_types.aggregations.HistogramAggregation': '_types/aggregations/bucket.ts#L507-L553', +'_types.aggregations.HistogramBucket': '_types/aggregations/Aggregate.ts#L346-L349', '_types.aggregations.HoltLinearModelSettings': '_types/aggregations/pipeline.ts#L271-L274', '_types.aggregations.HoltMovingAverageAggregation': '_types/aggregations/pipeline.ts#L257-L260', '_types.aggregations.HoltWintersModelSettings': '_types/aggregations/pipeline.ts#L275-L282', '_types.aggregations.HoltWintersMovingAverageAggregation': '_types/aggregations/pipeline.ts#L262-L265', '_types.aggregations.HoltWintersType': '_types/aggregations/pipeline.ts#L283-L286', -'_types.aggregations.InferenceAggregate': '_types/aggregations/Aggregate.ts#L663-L677', +'_types.aggregations.InferenceAggregate': '_types/aggregations/Aggregate.ts#L671-L685', '_types.aggregations.InferenceAggregation': '_types/aggregations/pipeline.ts#L205-L214', -'_types.aggregations.InferenceClassImportance': '_types/aggregations/Aggregate.ts#L691-L694', +'_types.aggregations.InferenceClassImportance': '_types/aggregations/Aggregate.ts#L699-L702', '_types.aggregations.InferenceConfigContainer': '_types/aggregations/pipeline.ts#L216-L222', -'_types.aggregations.InferenceFeatureImportance': '_types/aggregations/Aggregate.ts#L685-L689', -'_types.aggregations.InferenceTopClassEntry': '_types/aggregations/Aggregate.ts#L679-L683', -'_types.aggregations.IpPrefixAggregate': '_types/aggregations/Aggregate.ts#L633-L634', -'_types.aggregations.IpPrefixAggregation': '_types/aggregations/bucket.ts#L1122-L1151', -'_types.aggregations.IpPrefixBucket': '_types/aggregations/Aggregate.ts#L636-L641', -'_types.aggregations.IpRangeAggregate': '_types/aggregations/Aggregate.ts#L560-L562', -'_types.aggregations.IpRangeAggregation': '_types/aggregations/bucket.ts#L550-L559', -'_types.aggregations.IpRangeAggregationRange': '_types/aggregations/bucket.ts#L561-L574', -'_types.aggregations.IpRangeBucket': '_types/aggregations/Aggregate.ts#L564-L568', +'_types.aggregations.InferenceFeatureImportance': '_types/aggregations/Aggregate.ts#L693-L697', +'_types.aggregations.InferenceTopClassEntry': '_types/aggregations/Aggregate.ts#L687-L691', +'_types.aggregations.IpPrefixAggregate': '_types/aggregations/Aggregate.ts#L634-L635', +'_types.aggregations.IpPrefixAggregation': '_types/aggregations/bucket.ts#L1139-L1168', +'_types.aggregations.IpPrefixBucket': '_types/aggregations/Aggregate.ts#L637-L642', +'_types.aggregations.IpRangeAggregate': '_types/aggregations/Aggregate.ts#L561-L563', +'_types.aggregations.IpRangeAggregation': '_types/aggregations/bucket.ts#L555-L564', +'_types.aggregations.IpRangeAggregationRange': '_types/aggregations/bucket.ts#L566-L579', +'_types.aggregations.IpRangeBucket': '_types/aggregations/Aggregate.ts#L565-L569', '_types.aggregations.LinearMovingAverageAggregation': '_types/aggregations/pipeline.ts#L242-L245', -'_types.aggregations.LongRareTermsAggregate': '_types/aggregations/Aggregate.ts#L433-L438', -'_types.aggregations.LongRareTermsBucket': '_types/aggregations/Aggregate.ts#L440-L443', -'_types.aggregations.LongTermsAggregate': '_types/aggregations/Aggregate.ts#L401-L406', -'_types.aggregations.LongTermsBucket': '_types/aggregations/Aggregate.ts#L408-L411', +'_types.aggregations.LongRareTermsAggregate': '_types/aggregations/Aggregate.ts#L434-L439', +'_types.aggregations.LongRareTermsBucket': '_types/aggregations/Aggregate.ts#L441-L444', +'_types.aggregations.LongTermsAggregate': '_types/aggregations/Aggregate.ts#L402-L407', +'_types.aggregations.LongTermsBucket': '_types/aggregations/Aggregate.ts#L409-L412', '_types.aggregations.MatrixAggregation': '_types/aggregations/matrix.ts#L26-L36', -'_types.aggregations.MatrixStatsAggregate': '_types/aggregations/Aggregate.ts#L764-L768', +'_types.aggregations.MatrixStatsAggregate': '_types/aggregations/Aggregate.ts#L772-L776', '_types.aggregations.MatrixStatsAggregation': '_types/aggregations/matrix.ts#L38-L44', -'_types.aggregations.MatrixStatsFields': '_types/aggregations/Aggregate.ts#L770-L779', -'_types.aggregations.MaxAggregate': '_types/aggregations/Aggregate.ts#L200-L201', +'_types.aggregations.MatrixStatsFields': '_types/aggregations/Aggregate.ts#L778-L787', +'_types.aggregations.MaxAggregate': '_types/aggregations/Aggregate.ts#L201-L202', '_types.aggregations.MaxAggregation': '_types/aggregations/metric.ts#L162-L162', '_types.aggregations.MaxBucketAggregation': '_types/aggregations/pipeline.ts#L224-L224', -'_types.aggregations.MedianAbsoluteDeviationAggregate': '_types/aggregations/Aggregate.ts#L194-L195', +'_types.aggregations.MedianAbsoluteDeviationAggregate': '_types/aggregations/Aggregate.ts#L195-L196', '_types.aggregations.MedianAbsoluteDeviationAggregation': '_types/aggregations/metric.ts#L164-L170', '_types.aggregations.MetricAggregationBase': '_types/aggregations/metric.ts#L34-L45', -'_types.aggregations.MinAggregate': '_types/aggregations/Aggregate.ts#L197-L198', +'_types.aggregations.MinAggregate': '_types/aggregations/Aggregate.ts#L198-L199', '_types.aggregations.MinAggregation': '_types/aggregations/metric.ts#L172-L172', '_types.aggregations.MinBucketAggregation': '_types/aggregations/pipeline.ts#L226-L226', -'_types.aggregations.MinimumInterval': '_types/aggregations/bucket.ts#L104-L111', -'_types.aggregations.MissingAggregate': '_types/aggregations/Aggregate.ts#L487-L488', -'_types.aggregations.MissingAggregation': '_types/aggregations/bucket.ts#L576-L582', -'_types.aggregations.MissingOrder': '_types/aggregations/AggregationContainer.ts#L517-L521', +'_types.aggregations.MinimumInterval': '_types/aggregations/bucket.ts#L109-L116', +'_types.aggregations.MissingAggregate': '_types/aggregations/Aggregate.ts#L488-L489', +'_types.aggregations.MissingAggregation': '_types/aggregations/bucket.ts#L581-L587', +'_types.aggregations.MissingOrder': '_types/aggregations/AggregationContainer.ts#L526-L530', '_types.aggregations.MovingAverageAggregation': '_types/aggregations/pipeline.ts#L228-L234', '_types.aggregations.MovingAverageAggregationBase': '_types/aggregations/pipeline.ts#L236-L240', '_types.aggregations.MovingFunctionAggregation': '_types/aggregations/pipeline.ts#L288-L303', '_types.aggregations.MovingPercentilesAggregation': '_types/aggregations/pipeline.ts#L305-L317', -'_types.aggregations.MultiBucketAggregateBase': '_types/aggregations/Aggregate.ts#L327-L329', -'_types.aggregations.MultiBucketBase': '_types/aggregations/Aggregate.ts#L331-L340', -'_types.aggregations.MultiTermLookup': '_types/aggregations/bucket.ts#L626-L636', -'_types.aggregations.MultiTermsAggregate': '_types/aggregations/Aggregate.ts#L463-L465', -'_types.aggregations.MultiTermsAggregation': '_types/aggregations/bucket.ts#L584-L624', -'_types.aggregations.MultiTermsBucket': '_types/aggregations/Aggregate.ts#L467-L471', -'_types.aggregations.MutualInformationHeuristic': '_types/aggregations/bucket.ts#L755-L764', -'_types.aggregations.NestedAggregate': '_types/aggregations/Aggregate.ts#L490-L491', -'_types.aggregations.NestedAggregation': '_types/aggregations/bucket.ts#L638-L643', +'_types.aggregations.MultiBucketAggregateBase': '_types/aggregations/Aggregate.ts#L328-L330', +'_types.aggregations.MultiBucketBase': '_types/aggregations/Aggregate.ts#L332-L341', +'_types.aggregations.MultiTermLookup': '_types/aggregations/bucket.ts#L631-L641', +'_types.aggregations.MultiTermsAggregate': '_types/aggregations/Aggregate.ts#L464-L466', +'_types.aggregations.MultiTermsAggregation': '_types/aggregations/bucket.ts#L589-L629', +'_types.aggregations.MultiTermsBucket': '_types/aggregations/Aggregate.ts#L468-L472', +'_types.aggregations.MutualInformationHeuristic': '_types/aggregations/bucket.ts#L760-L769', +'_types.aggregations.NestedAggregate': '_types/aggregations/Aggregate.ts#L491-L492', +'_types.aggregations.NestedAggregation': '_types/aggregations/bucket.ts#L643-L648', '_types.aggregations.NormalizeAggregation': '_types/aggregations/pipeline.ts#L319-L324', '_types.aggregations.NormalizeMethod': '_types/aggregations/pipeline.ts#L326-L352', -'_types.aggregations.ParentAggregate': '_types/aggregations/Aggregate.ts#L786-L787', -'_types.aggregations.ParentAggregation': '_types/aggregations/bucket.ts#L645-L650', -'_types.aggregations.PercentageScoreHeuristic': '_types/aggregations/bucket.ts#L766-L766', +'_types.aggregations.ParentAggregate': '_types/aggregations/Aggregate.ts#L794-L795', +'_types.aggregations.ParentAggregation': '_types/aggregations/bucket.ts#L650-L655', +'_types.aggregations.PercentageScoreHeuristic': '_types/aggregations/bucket.ts#L771-L771', '_types.aggregations.PercentileRanksAggregation': '_types/aggregations/metric.ts#L174-L193', -'_types.aggregations.Percentiles': '_types/aggregations/Aggregate.ts#L150-L151', -'_types.aggregations.PercentilesAggregateBase': '_types/aggregations/Aggregate.ts#L146-L148', +'_types.aggregations.Percentiles': '_types/aggregations/Aggregate.ts#L151-L152', +'_types.aggregations.PercentilesAggregateBase': '_types/aggregations/Aggregate.ts#L147-L149', '_types.aggregations.PercentilesAggregation': '_types/aggregations/metric.ts#L195-L214', -'_types.aggregations.PercentilesBucketAggregate': '_types/aggregations/Aggregate.ts#L178-L179', +'_types.aggregations.PercentilesBucketAggregate': '_types/aggregations/Aggregate.ts#L179-L180', '_types.aggregations.PercentilesBucketAggregation': '_types/aggregations/pipeline.ts#L354-L359', '_types.aggregations.PipelineAggregationBase': '_types/aggregations/pipeline.ts#L39-L51', -'_types.aggregations.RangeAggregate': '_types/aggregations/Aggregate.ts#L535-L536', -'_types.aggregations.RangeAggregation': '_types/aggregations/bucket.ts#L652-L672', -'_types.aggregations.RangeBucket': '_types/aggregations/Aggregate.ts#L538-L545', -'_types.aggregations.RareTermsAggregation': '_types/aggregations/bucket.ts#L689-L719', -'_types.aggregations.RateAggregate': '_types/aggregations/Aggregate.ts#L748-L752', +'_types.aggregations.RangeAggregate': '_types/aggregations/Aggregate.ts#L536-L537', +'_types.aggregations.RangeAggregation': '_types/aggregations/bucket.ts#L657-L677', +'_types.aggregations.RangeBucket': '_types/aggregations/Aggregate.ts#L539-L546', +'_types.aggregations.RareTermsAggregation': '_types/aggregations/bucket.ts#L694-L724', +'_types.aggregations.RateAggregate': '_types/aggregations/Aggregate.ts#L756-L760', '_types.aggregations.RateAggregation': '_types/aggregations/metric.ts#L230-L241', '_types.aggregations.RateMode': '_types/aggregations/metric.ts#L243-L252', -'_types.aggregations.ReverseNestedAggregate': '_types/aggregations/Aggregate.ts#L493-L494', -'_types.aggregations.ReverseNestedAggregation': '_types/aggregations/bucket.ts#L721-L727', -'_types.aggregations.SamplerAggregate': '_types/aggregations/Aggregate.ts#L502-L503', -'_types.aggregations.SamplerAggregation': '_types/aggregations/bucket.ts#L729-L735', -'_types.aggregations.SamplerAggregationExecutionHint': '_types/aggregations/bucket.ts#L345-L358', -'_types.aggregations.ScriptedHeuristic': '_types/aggregations/bucket.ts#L768-L770', -'_types.aggregations.ScriptedMetricAggregate': '_types/aggregations/Aggregate.ts#L653-L656', +'_types.aggregations.ReverseNestedAggregate': '_types/aggregations/Aggregate.ts#L494-L495', +'_types.aggregations.ReverseNestedAggregation': '_types/aggregations/bucket.ts#L726-L732', +'_types.aggregations.SamplerAggregate': '_types/aggregations/Aggregate.ts#L503-L504', +'_types.aggregations.SamplerAggregation': '_types/aggregations/bucket.ts#L734-L740', +'_types.aggregations.SamplerAggregationExecutionHint': '_types/aggregations/bucket.ts#L350-L363', +'_types.aggregations.ScriptedHeuristic': '_types/aggregations/bucket.ts#L773-L775', +'_types.aggregations.ScriptedMetricAggregate': '_types/aggregations/Aggregate.ts#L661-L664', '_types.aggregations.ScriptedMetricAggregation': '_types/aggregations/metric.ts#L254-L280', '_types.aggregations.SerialDifferencingAggregation': '_types/aggregations/pipeline.ts#L361-L367', -'_types.aggregations.SignificantLongTermsAggregate': '_types/aggregations/Aggregate.ts#L592-L594', -'_types.aggregations.SignificantLongTermsBucket': '_types/aggregations/Aggregate.ts#L601-L604', -'_types.aggregations.SignificantStringTermsAggregate': '_types/aggregations/Aggregate.ts#L606-L608', -'_types.aggregations.SignificantStringTermsBucket': '_types/aggregations/Aggregate.ts#L610-L612', -'_types.aggregations.SignificantTermsAggregateBase': '_types/aggregations/Aggregate.ts#L585-L590', -'_types.aggregations.SignificantTermsAggregation': '_types/aggregations/bucket.ts#L772-L836', -'_types.aggregations.SignificantTermsBucketBase': '_types/aggregations/Aggregate.ts#L596-L599', -'_types.aggregations.SignificantTextAggregation': '_types/aggregations/bucket.ts#L838-L910', +'_types.aggregations.SignificantLongTermsAggregate': '_types/aggregations/Aggregate.ts#L593-L595', +'_types.aggregations.SignificantLongTermsBucket': '_types/aggregations/Aggregate.ts#L602-L605', +'_types.aggregations.SignificantStringTermsAggregate': '_types/aggregations/Aggregate.ts#L607-L609', +'_types.aggregations.SignificantStringTermsBucket': '_types/aggregations/Aggregate.ts#L611-L613', +'_types.aggregations.SignificantTermsAggregateBase': '_types/aggregations/Aggregate.ts#L586-L591', +'_types.aggregations.SignificantTermsAggregation': '_types/aggregations/bucket.ts#L777-L841', +'_types.aggregations.SignificantTermsBucketBase': '_types/aggregations/Aggregate.ts#L597-L600', +'_types.aggregations.SignificantTextAggregation': '_types/aggregations/bucket.ts#L843-L915', '_types.aggregations.SimpleMovingAverageAggregation': '_types/aggregations/pipeline.ts#L247-L250', -'_types.aggregations.SimpleValueAggregate': '_types/aggregations/Aggregate.ts#L224-L225', -'_types.aggregations.SingleBucketAggregateBase': '_types/aggregations/Aggregate.ts#L475-L485', -'_types.aggregations.SingleMetricAggregateBase': '_types/aggregations/Aggregate.ts#L183-L192', -'_types.aggregations.StandardDeviationBounds': '_types/aggregations/Aggregate.ts#L260-L267', -'_types.aggregations.StandardDeviationBoundsAsString': '_types/aggregations/Aggregate.ts#L269-L276', -'_types.aggregations.StatsAggregate': '_types/aggregations/Aggregate.ts#L240-L255', +'_types.aggregations.SimpleValueAggregate': '_types/aggregations/Aggregate.ts#L225-L226', +'_types.aggregations.SingleBucketAggregateBase': '_types/aggregations/Aggregate.ts#L476-L486', +'_types.aggregations.SingleMetricAggregateBase': '_types/aggregations/Aggregate.ts#L184-L193', +'_types.aggregations.StandardDeviationBounds': '_types/aggregations/Aggregate.ts#L261-L268', +'_types.aggregations.StandardDeviationBoundsAsString': '_types/aggregations/Aggregate.ts#L270-L277', +'_types.aggregations.StatsAggregate': '_types/aggregations/Aggregate.ts#L241-L256', '_types.aggregations.StatsAggregation': '_types/aggregations/metric.ts#L282-L282', -'_types.aggregations.StatsBucketAggregate': '_types/aggregations/Aggregate.ts#L257-L258', +'_types.aggregations.StatsBucketAggregate': '_types/aggregations/Aggregate.ts#L258-L259', '_types.aggregations.StatsBucketAggregation': '_types/aggregations/pipeline.ts#L369-L369', -'_types.aggregations.StringRareTermsAggregate': '_types/aggregations/Aggregate.ts#L445-L449', -'_types.aggregations.StringRareTermsBucket': '_types/aggregations/Aggregate.ts#L451-L453', -'_types.aggregations.StringStatsAggregate': '_types/aggregations/Aggregate.ts#L700-L711', +'_types.aggregations.StringRareTermsAggregate': '_types/aggregations/Aggregate.ts#L446-L450', +'_types.aggregations.StringRareTermsBucket': '_types/aggregations/Aggregate.ts#L452-L454', +'_types.aggregations.StringStatsAggregate': '_types/aggregations/Aggregate.ts#L708-L719', '_types.aggregations.StringStatsAggregation': '_types/aggregations/metric.ts#L284-L290', -'_types.aggregations.StringTermsAggregate': '_types/aggregations/Aggregate.ts#L386-L391', -'_types.aggregations.StringTermsBucket': '_types/aggregations/Aggregate.ts#L397-L399', -'_types.aggregations.SumAggregate': '_types/aggregations/Aggregate.ts#L203-L207', +'_types.aggregations.StringTermsAggregate': '_types/aggregations/Aggregate.ts#L387-L392', +'_types.aggregations.StringTermsBucket': '_types/aggregations/Aggregate.ts#L398-L400', +'_types.aggregations.SumAggregate': '_types/aggregations/Aggregate.ts#L204-L208', '_types.aggregations.SumAggregation': '_types/aggregations/metric.ts#L292-L292', '_types.aggregations.SumBucketAggregation': '_types/aggregations/pipeline.ts#L371-L371', '_types.aggregations.TDigest': '_types/aggregations/metric.ts#L223-L228', -'_types.aggregations.TDigestPercentileRanksAggregate': '_types/aggregations/Aggregate.ts#L175-L176', -'_types.aggregations.TDigestPercentilesAggregate': '_types/aggregations/Aggregate.ts#L172-L173', -'_types.aggregations.TTestAggregate': '_types/aggregations/Aggregate.ts#L742-L746', +'_types.aggregations.TDigestPercentileRanksAggregate': '_types/aggregations/Aggregate.ts#L176-L177', +'_types.aggregations.TDigestPercentilesAggregate': '_types/aggregations/Aggregate.ts#L173-L174', +'_types.aggregations.TTestAggregate': '_types/aggregations/Aggregate.ts#L750-L754', '_types.aggregations.TTestAggregation': '_types/aggregations/metric.ts#L294-L308', '_types.aggregations.TTestType': '_types/aggregations/metric.ts#L322-L335', -'_types.aggregations.TermsAggregateBase': '_types/aggregations/Aggregate.ts#L379-L384', -'_types.aggregations.TermsAggregation': '_types/aggregations/bucket.ts#L912-L977', -'_types.aggregations.TermsAggregationCollectMode': '_types/aggregations/bucket.ts#L987-L996', -'_types.aggregations.TermsAggregationExecutionHint': '_types/aggregations/bucket.ts#L998-L1003', -'_types.aggregations.TermsBucketBase': '_types/aggregations/Aggregate.ts#L393-L395', -'_types.aggregations.TermsExclude': '_types/aggregations/bucket.ts#L1008-L1009', -'_types.aggregations.TermsInclude': '_types/aggregations/bucket.ts#L1005-L1006', -'_types.aggregations.TermsPartition': '_types/aggregations/bucket.ts#L1011-L1020', +'_types.aggregations.TermsAggregateBase': '_types/aggregations/Aggregate.ts#L380-L385', +'_types.aggregations.TermsAggregation': '_types/aggregations/bucket.ts#L917-L982', +'_types.aggregations.TermsAggregationCollectMode': '_types/aggregations/bucket.ts#L1004-L1013', +'_types.aggregations.TermsAggregationExecutionHint': '_types/aggregations/bucket.ts#L1015-L1020', +'_types.aggregations.TermsBucketBase': '_types/aggregations/Aggregate.ts#L394-L396', +'_types.aggregations.TermsExclude': '_types/aggregations/bucket.ts#L1025-L1026', +'_types.aggregations.TermsInclude': '_types/aggregations/bucket.ts#L1022-L1023', +'_types.aggregations.TermsPartition': '_types/aggregations/bucket.ts#L1028-L1037', '_types.aggregations.TestPopulation': '_types/aggregations/metric.ts#L310-L320', -'_types.aggregations.TopHitsAggregate': '_types/aggregations/Aggregate.ts#L658-L661', +'_types.aggregations.TimeSeriesAggregate': '_types/aggregations/Aggregate.ts#L652-L653', +'_types.aggregations.TimeSeriesAggregation': '_types/aggregations/bucket.ts#L984-L994', +'_types.aggregations.TimeSeriesBucket': '_types/aggregations/Aggregate.ts#L655-L657', +'_types.aggregations.TopHitsAggregate': '_types/aggregations/Aggregate.ts#L666-L669', '_types.aggregations.TopHitsAggregation': '_types/aggregations/metric.ts#L337-L397', -'_types.aggregations.TopMetrics': '_types/aggregations/Aggregate.ts#L736-L740', -'_types.aggregations.TopMetricsAggregate': '_types/aggregations/Aggregate.ts#L731-L734', +'_types.aggregations.TopMetrics': '_types/aggregations/Aggregate.ts#L744-L748', +'_types.aggregations.TopMetricsAggregate': '_types/aggregations/Aggregate.ts#L739-L742', '_types.aggregations.TopMetricsAggregation': '_types/aggregations/metric.ts#L399-L413', '_types.aggregations.TopMetricsValue': '_types/aggregations/metric.ts#L415-L420', -'_types.aggregations.UnmappedRareTermsAggregate': '_types/aggregations/Aggregate.ts#L455-L461', -'_types.aggregations.UnmappedSamplerAggregate': '_types/aggregations/Aggregate.ts#L505-L506', -'_types.aggregations.UnmappedSignificantTermsAggregate': '_types/aggregations/Aggregate.ts#L614-L620', -'_types.aggregations.UnmappedTermsAggregate': '_types/aggregations/Aggregate.ts#L425-L431', -'_types.aggregations.ValueCountAggregate': '_types/aggregations/Aggregate.ts#L218-L222', +'_types.aggregations.UnmappedRareTermsAggregate': '_types/aggregations/Aggregate.ts#L456-L462', +'_types.aggregations.UnmappedSamplerAggregate': '_types/aggregations/Aggregate.ts#L506-L507', +'_types.aggregations.UnmappedSignificantTermsAggregate': '_types/aggregations/Aggregate.ts#L615-L621', +'_types.aggregations.UnmappedTermsAggregate': '_types/aggregations/Aggregate.ts#L426-L432', +'_types.aggregations.ValueCountAggregate': '_types/aggregations/Aggregate.ts#L219-L223', '_types.aggregations.ValueCountAggregation': '_types/aggregations/metric.ts#L422-L422', '_types.aggregations.ValueType': '_types/aggregations/metric.ts#L424-L435', -'_types.aggregations.VariableWidthHistogramAggregate': '_types/aggregations/Aggregate.ts#L364-L366', -'_types.aggregations.VariableWidthHistogramAggregation': '_types/aggregations/bucket.ts#L1022-L1043', -'_types.aggregations.VariableWidthHistogramBucket': '_types/aggregations/Aggregate.ts#L368-L375', +'_types.aggregations.VariableWidthHistogramAggregate': '_types/aggregations/Aggregate.ts#L365-L367', +'_types.aggregations.VariableWidthHistogramAggregation': '_types/aggregations/bucket.ts#L1039-L1060', +'_types.aggregations.VariableWidthHistogramBucket': '_types/aggregations/Aggregate.ts#L369-L376', '_types.aggregations.WeightedAverageAggregation': '_types/aggregations/metric.ts#L437-L451', '_types.aggregations.WeightedAverageValue': '_types/aggregations/metric.ts#L453-L463', -'_types.aggregations.WeightedAvgAggregate': '_types/aggregations/Aggregate.ts#L212-L216', -'_types.analysis.Analyzer': '_types/analysis/analyzers.ts#L113-L131', -'_types.analysis.AsciiFoldingTokenFilter': '_types/analysis/token_filters.ts#L170-L173', +'_types.aggregations.WeightedAvgAggregate': '_types/aggregations/Aggregate.ts#L213-L217', +'_types.analysis.Analyzer': '_types/analysis/analyzers.ts#L359-L413', +'_types.analysis.ArabicAnalyzer': '_types/analysis/analyzers.ts#L61-L66', +'_types.analysis.ArmenianAnalyzer': '_types/analysis/analyzers.ts#L68-L73', +'_types.analysis.AsciiFoldingTokenFilter': '_types/analysis/token_filters.ts#L169-L172', +'_types.analysis.BasqueAnalyzer': '_types/analysis/analyzers.ts#L75-L80', +'_types.analysis.BengaliAnalyzer': '_types/analysis/analyzers.ts#L82-L87', +'_types.analysis.BrazilianAnalyzer': '_types/analysis/analyzers.ts#L89-L93', +'_types.analysis.BulgarianAnalyzer': '_types/analysis/analyzers.ts#L95-L100', +'_types.analysis.CatalanAnalyzer': '_types/analysis/analyzers.ts#L102-L107', '_types.analysis.CharFilter': '_types/analysis/char_filters.ts#L28-L30', '_types.analysis.CharFilterBase': '_types/analysis/char_filters.ts#L24-L26', '_types.analysis.CharFilterDefinition': '_types/analysis/char_filters.ts#L32-L41', -'_types.analysis.CharGroupTokenizer': '_types/analysis/tokenizers.ts#L56-L60', -'_types.analysis.CommonGramsTokenFilter': '_types/analysis/token_filters.ts#L175-L181', -'_types.analysis.CompoundWordTokenFilterBase': '_types/analysis/token_filters.ts#L44-L52', -'_types.analysis.ConditionTokenFilter': '_types/analysis/token_filters.ts#L183-L187', +'_types.analysis.CharGroupTokenizer': '_types/analysis/tokenizers.ts#L31-L38', +'_types.analysis.ChineseAnalyzer': '_types/analysis/analyzers.ts#L109-L113', +'_types.analysis.CjkAnalyzer': '_types/analysis/analyzers.ts#L115-L119', +'_types.analysis.ClassicTokenizer': '_types/analysis/tokenizers.ts#L40-L46', +'_types.analysis.CommonGramsTokenFilter': '_types/analysis/token_filters.ts#L174-L180', +'_types.analysis.CompoundWordTokenFilterBase': '_types/analysis/token_filters.ts#L43-L51', +'_types.analysis.ConditionTokenFilter': '_types/analysis/token_filters.ts#L182-L186', '_types.analysis.CustomAnalyzer': '_types/analysis/analyzers.ts#L28-L35', '_types.analysis.CustomNormalizer': '_types/analysis/normalizers.ts#L30-L34', -'_types.analysis.DelimitedPayloadEncoding': '_types/analysis/token_filters.ts#L62-L66', -'_types.analysis.DelimitedPayloadTokenFilter': '_types/analysis/token_filters.ts#L68-L72', -'_types.analysis.DictionaryDecompounderTokenFilter': '_types/analysis/token_filters.ts#L54-L56', -'_types.analysis.DutchAnalyzer': '_types/analysis/analyzers.ts#L61-L64', -'_types.analysis.EdgeNGramSide': '_types/analysis/token_filters.ts#L74-L77', -'_types.analysis.EdgeNGramTokenFilter': '_types/analysis/token_filters.ts#L79-L85', -'_types.analysis.EdgeNGramTokenizer': '_types/analysis/tokenizers.ts#L31-L37', -'_types.analysis.ElisionTokenFilter': '_types/analysis/token_filters.ts#L189-L194', +'_types.analysis.CzechAnalyzer': '_types/analysis/analyzers.ts#L121-L126', +'_types.analysis.DanishAnalyzer': '_types/analysis/analyzers.ts#L128-L132', +'_types.analysis.DelimitedPayloadEncoding': '_types/analysis/token_filters.ts#L61-L65', +'_types.analysis.DelimitedPayloadTokenFilter': '_types/analysis/token_filters.ts#L67-L71', +'_types.analysis.DictionaryDecompounderTokenFilter': '_types/analysis/token_filters.ts#L53-L55', +'_types.analysis.DutchAnalyzer': '_types/analysis/analyzers.ts#L134-L139', +'_types.analysis.EdgeNGramSide': '_types/analysis/token_filters.ts#L73-L76', +'_types.analysis.EdgeNGramTokenFilter': '_types/analysis/token_filters.ts#L78-L84', +'_types.analysis.EdgeNGramTokenizer': '_types/analysis/tokenizers.ts#L48-L57', +'_types.analysis.ElisionTokenFilter': '_types/analysis/token_filters.ts#L188-L193', +'_types.analysis.EnglishAnalyzer': '_types/analysis/analyzers.ts#L141-L146', +'_types.analysis.EstonianAnalyzer': '_types/analysis/analyzers.ts#L148-L152', '_types.analysis.FingerprintAnalyzer': '_types/analysis/analyzers.ts#L37-L45', -'_types.analysis.FingerprintTokenFilter': '_types/analysis/token_filters.ts#L196-L200', +'_types.analysis.FingerprintTokenFilter': '_types/analysis/token_filters.ts#L195-L199', +'_types.analysis.FinnishAnalyzer': '_types/analysis/analyzers.ts#L154-L159', +'_types.analysis.FrenchAnalyzer': '_types/analysis/analyzers.ts#L161-L166', +'_types.analysis.GalicianAnalyzer': '_types/analysis/analyzers.ts#L168-L173', +'_types.analysis.GermanAnalyzer': '_types/analysis/analyzers.ts#L175-L180', +'_types.analysis.GreekAnalyzer': '_types/analysis/analyzers.ts#L182-L186', +'_types.analysis.HindiAnalyzer': '_types/analysis/analyzers.ts#L188-L193', '_types.analysis.HtmlStripCharFilter': '_types/analysis/char_filters.ts#L43-L46', -'_types.analysis.HunspellTokenFilter': '_types/analysis/token_filters.ts#L202-L208', -'_types.analysis.HyphenationDecompounderTokenFilter': '_types/analysis/token_filters.ts#L58-L60', +'_types.analysis.HungarianAnalyzer': '_types/analysis/analyzers.ts#L195-L200', +'_types.analysis.HunspellTokenFilter': '_types/analysis/token_filters.ts#L201-L207', +'_types.analysis.HyphenationDecompounderTokenFilter': '_types/analysis/token_filters.ts#L57-L59', '_types.analysis.IcuAnalyzer': '_types/analysis/icu-plugin.ts#L67-L71', '_types.analysis.IcuCollationAlternate': '_types/analysis/icu-plugin.ts#L89-L92', '_types.analysis.IcuCollationCaseFirst': '_types/analysis/icu-plugin.ts#L94-L97', @@ -562,13 +583,16 @@ '_types.analysis.IcuTokenizer': '_types/analysis/icu-plugin.ts#L30-L33', '_types.analysis.IcuTransformDirection': '_types/analysis/icu-plugin.ts#L73-L76', '_types.analysis.IcuTransformTokenFilter': '_types/analysis/icu-plugin.ts#L24-L28', -'_types.analysis.KStemTokenFilter': '_types/analysis/token_filters.ts#L241-L243', -'_types.analysis.KeepTypesMode': '_types/analysis/token_filters.ts#L215-L218', -'_types.analysis.KeepTypesTokenFilter': '_types/analysis/token_filters.ts#L220-L224', -'_types.analysis.KeepWordsTokenFilter': '_types/analysis/token_filters.ts#L226-L231', +'_types.analysis.IndonesianAnalyzer': '_types/analysis/analyzers.ts#L202-L207', +'_types.analysis.IrishAnalyzer': '_types/analysis/analyzers.ts#L209-L214', +'_types.analysis.ItalianAnalyzer': '_types/analysis/analyzers.ts#L216-L221', +'_types.analysis.KStemTokenFilter': '_types/analysis/token_filters.ts#L240-L242', +'_types.analysis.KeepTypesMode': '_types/analysis/token_filters.ts#L214-L217', +'_types.analysis.KeepTypesTokenFilter': '_types/analysis/token_filters.ts#L219-L223', +'_types.analysis.KeepWordsTokenFilter': '_types/analysis/token_filters.ts#L225-L230', '_types.analysis.KeywordAnalyzer': '_types/analysis/analyzers.ts#L47-L50', -'_types.analysis.KeywordMarkerTokenFilter': '_types/analysis/token_filters.ts#L233-L239', -'_types.analysis.KeywordTokenizer': '_types/analysis/tokenizers.ts#L62-L65', +'_types.analysis.KeywordMarkerTokenFilter': '_types/analysis/token_filters.ts#L232-L238', +'_types.analysis.KeywordTokenizer': '_types/analysis/tokenizers.ts#L68-L71', '_types.analysis.KuromojiAnalyzer': '_types/analysis/kuromoji-plugin.ts#L25-L29', '_types.analysis.KuromojiIterationMarkCharFilter': '_types/analysis/kuromoji-plugin.ts#L31-L35', '_types.analysis.KuromojiPartOfSpeechTokenFilter': '_types/analysis/kuromoji-plugin.ts#L37-L40', @@ -578,79 +602,96 @@ '_types.analysis.KuromojiTokenizer': '_types/analysis/kuromoji-plugin.ts#L58-L67', '_types.analysis.Language': '_types/analysis/languages.ts#L20-L55', '_types.analysis.LanguageAnalyzer': '_types/analysis/analyzers.ts#L52-L59', -'_types.analysis.LengthTokenFilter': '_types/analysis/token_filters.ts#L245-L249', -'_types.analysis.LetterTokenizer': '_types/analysis/tokenizers.ts#L67-L69', -'_types.analysis.LimitTokenCountTokenFilter': '_types/analysis/token_filters.ts#L251-L255', +'_types.analysis.LatvianAnalyzer': '_types/analysis/analyzers.ts#L223-L228', +'_types.analysis.LengthTokenFilter': '_types/analysis/token_filters.ts#L244-L248', +'_types.analysis.LetterTokenizer': '_types/analysis/tokenizers.ts#L73-L75', +'_types.analysis.LimitTokenCountTokenFilter': '_types/analysis/token_filters.ts#L250-L254', +'_types.analysis.LithuanianAnalyzer': '_types/analysis/analyzers.ts#L230-L235', '_types.analysis.LowercaseNormalizer': '_types/analysis/normalizers.ts#L26-L28', -'_types.analysis.LowercaseTokenFilter': '_types/analysis/token_filters.ts#L257-L260', -'_types.analysis.LowercaseTokenizer': '_types/analysis/tokenizers.ts#L71-L73', +'_types.analysis.LowercaseTokenFilter': '_types/analysis/token_filters.ts#L256-L259', +'_types.analysis.LowercaseTokenizer': '_types/analysis/tokenizers.ts#L77-L79', '_types.analysis.MappingCharFilter': '_types/analysis/char_filters.ts#L48-L52', -'_types.analysis.MultiplexerTokenFilter': '_types/analysis/token_filters.ts#L262-L266', -'_types.analysis.NGramTokenFilter': '_types/analysis/token_filters.ts#L268-L273', -'_types.analysis.NGramTokenizer': '_types/analysis/tokenizers.ts#L39-L45', -'_types.analysis.NoriAnalyzer': '_types/analysis/analyzers.ts#L66-L72', -'_types.analysis.NoriDecompoundMode': '_types/analysis/tokenizers.ts#L75-L79', -'_types.analysis.NoriPartOfSpeechTokenFilter': '_types/analysis/token_filters.ts#L275-L278', -'_types.analysis.NoriTokenizer': '_types/analysis/tokenizers.ts#L81-L87', +'_types.analysis.MultiplexerTokenFilter': '_types/analysis/token_filters.ts#L261-L265', +'_types.analysis.NGramTokenFilter': '_types/analysis/token_filters.ts#L267-L272', +'_types.analysis.NGramTokenizer': '_types/analysis/tokenizers.ts#L81-L90', +'_types.analysis.NoriAnalyzer': '_types/analysis/analyzers.ts#L312-L318', +'_types.analysis.NoriDecompoundMode': '_types/analysis/nori-plugin.ts#L22-L26', +'_types.analysis.NoriPartOfSpeechTokenFilter': '_types/analysis/token_filters.ts#L274-L277', +'_types.analysis.NoriTokenizer': '_types/analysis/nori-plugin.ts#L28-L34', '_types.analysis.Normalizer': '_types/analysis/normalizers.ts#L20-L24', -'_types.analysis.PathHierarchyTokenizer': '_types/analysis/tokenizers.ts#L89-L96', -'_types.analysis.PatternAnalyzer': '_types/analysis/analyzers.ts#L74-L81', -'_types.analysis.PatternCaptureTokenFilter': '_types/analysis/token_filters.ts#L280-L284', +'_types.analysis.NorwegianAnalyzer': '_types/analysis/analyzers.ts#L237-L242', +'_types.analysis.PathHierarchyTokenizer': '_types/analysis/tokenizers.ts#L92-L99', +'_types.analysis.PatternAnalyzer': '_types/analysis/analyzers.ts#L320-L327', +'_types.analysis.PatternCaptureTokenFilter': '_types/analysis/token_filters.ts#L279-L283', '_types.analysis.PatternReplaceCharFilter': '_types/analysis/char_filters.ts#L54-L59', -'_types.analysis.PatternReplaceTokenFilter': '_types/analysis/token_filters.ts#L286-L292', -'_types.analysis.PatternTokenizer': '_types/analysis/tokenizers.ts#L98-L103', +'_types.analysis.PatternReplaceTokenFilter': '_types/analysis/token_filters.ts#L285-L291', +'_types.analysis.PatternTokenizer': '_types/analysis/tokenizers.ts#L101-L106', +'_types.analysis.PersianAnalyzer': '_types/analysis/analyzers.ts#L244-L248', '_types.analysis.PhoneticEncoder': '_types/analysis/phonetic-plugin.ts#L23-L36', '_types.analysis.PhoneticLanguage': '_types/analysis/phonetic-plugin.ts#L38-L51', '_types.analysis.PhoneticNameType': '_types/analysis/phonetic-plugin.ts#L53-L57', '_types.analysis.PhoneticRuleType': '_types/analysis/phonetic-plugin.ts#L59-L62', '_types.analysis.PhoneticTokenFilter': '_types/analysis/phonetic-plugin.ts#L64-L72', -'_types.analysis.PorterStemTokenFilter': '_types/analysis/token_filters.ts#L294-L296', -'_types.analysis.PredicateTokenFilter': '_types/analysis/token_filters.ts#L298-L301', -'_types.analysis.RemoveDuplicatesTokenFilter': '_types/analysis/token_filters.ts#L303-L305', -'_types.analysis.ReverseTokenFilter': '_types/analysis/token_filters.ts#L307-L309', -'_types.analysis.ShingleTokenFilter': '_types/analysis/token_filters.ts#L87-L95', -'_types.analysis.SimpleAnalyzer': '_types/analysis/analyzers.ts#L83-L86', -'_types.analysis.SnowballAnalyzer': '_types/analysis/analyzers.ts#L88-L93', +'_types.analysis.PorterStemTokenFilter': '_types/analysis/token_filters.ts#L293-L295', +'_types.analysis.PortugueseAnalyzer': '_types/analysis/analyzers.ts#L250-L255', +'_types.analysis.PredicateTokenFilter': '_types/analysis/token_filters.ts#L297-L300', +'_types.analysis.RemoveDuplicatesTokenFilter': '_types/analysis/token_filters.ts#L302-L304', +'_types.analysis.ReverseTokenFilter': '_types/analysis/token_filters.ts#L306-L308', +'_types.analysis.RomanianAnalyzer': '_types/analysis/analyzers.ts#L257-L262', +'_types.analysis.RussianAnalyzer': '_types/analysis/analyzers.ts#L264-L269', +'_types.analysis.SerbianAnalyzer': '_types/analysis/analyzers.ts#L271-L276', +'_types.analysis.ShingleTokenFilter': '_types/analysis/token_filters.ts#L86-L94', +'_types.analysis.SimpleAnalyzer': '_types/analysis/analyzers.ts#L329-L332', +'_types.analysis.SimplePatternSplitTokenizer': '_types/analysis/tokenizers.ts#L113-L116', +'_types.analysis.SimplePatternTokenizer': '_types/analysis/tokenizers.ts#L108-L111', +'_types.analysis.SnowballAnalyzer': '_types/analysis/analyzers.ts#L334-L339', '_types.analysis.SnowballLanguage': '_types/analysis/languages.ts#L57-L80', -'_types.analysis.SnowballTokenFilter': '_types/analysis/token_filters.ts#L311-L314', -'_types.analysis.StandardAnalyzer': '_types/analysis/analyzers.ts#L95-L99', -'_types.analysis.StandardTokenizer': '_types/analysis/tokenizers.ts#L105-L108', -'_types.analysis.StemmerOverrideTokenFilter': '_types/analysis/token_filters.ts#L316-L320', -'_types.analysis.StemmerTokenFilter': '_types/analysis/token_filters.ts#L322-L326', -'_types.analysis.StopAnalyzer': '_types/analysis/analyzers.ts#L101-L106', -'_types.analysis.StopTokenFilter': '_types/analysis/token_filters.ts#L97-L103', -'_types.analysis.SynonymFormat': '_types/analysis/token_filters.ts#L105-L108', -'_types.analysis.SynonymGraphTokenFilter': '_types/analysis/token_filters.ts#L110-L120', -'_types.analysis.SynonymTokenFilter': '_types/analysis/token_filters.ts#L122-L132', -'_types.analysis.TokenChar': '_types/analysis/tokenizers.ts#L47-L54', -'_types.analysis.TokenFilter': '_types/analysis/token_filters.ts#L346-L348', -'_types.analysis.TokenFilterBase': '_types/analysis/token_filters.ts#L40-L42', -'_types.analysis.TokenFilterDefinition': '_types/analysis/token_filters.ts#L350-L402', -'_types.analysis.Tokenizer': '_types/analysis/tokenizers.ts#L120-L122', +'_types.analysis.SnowballTokenFilter': '_types/analysis/token_filters.ts#L310-L313', +'_types.analysis.SoraniAnalyzer': '_types/analysis/analyzers.ts#L278-L283', +'_types.analysis.SpanishAnalyzer': '_types/analysis/analyzers.ts#L285-L290', +'_types.analysis.StandardAnalyzer': '_types/analysis/analyzers.ts#L341-L345', +'_types.analysis.StandardTokenizer': '_types/analysis/tokenizers.ts#L118-L121', +'_types.analysis.StemmerOverrideTokenFilter': '_types/analysis/token_filters.ts#L315-L319', +'_types.analysis.StemmerTokenFilter': '_types/analysis/token_filters.ts#L321-L325', +'_types.analysis.StopAnalyzer': '_types/analysis/analyzers.ts#L347-L352', +'_types.analysis.StopTokenFilter': '_types/analysis/token_filters.ts#L96-L102', +'_types.analysis.SwedishAnalyzer': '_types/analysis/analyzers.ts#L292-L297', +'_types.analysis.SynonymFormat': '_types/analysis/token_filters.ts#L104-L107', +'_types.analysis.SynonymGraphTokenFilter': '_types/analysis/token_filters.ts#L109-L119', +'_types.analysis.SynonymTokenFilter': '_types/analysis/token_filters.ts#L121-L131', +'_types.analysis.ThaiAnalyzer': '_types/analysis/analyzers.ts#L306-L310', +'_types.analysis.ThaiTokenizer': '_types/analysis/tokenizers.ts#L123-L125', +'_types.analysis.TokenChar': '_types/analysis/tokenizers.ts#L59-L66', +'_types.analysis.TokenFilter': '_types/analysis/token_filters.ts#L345-L347', +'_types.analysis.TokenFilterBase': '_types/analysis/token_filters.ts#L39-L41', +'_types.analysis.TokenFilterDefinition': '_types/analysis/token_filters.ts#L349-L401', +'_types.analysis.Tokenizer': '_types/analysis/tokenizers.ts#L137-L139', '_types.analysis.TokenizerBase': '_types/analysis/tokenizers.ts#L27-L29', -'_types.analysis.TokenizerDefinition': '_types/analysis/tokenizers.ts#L124-L142', -'_types.analysis.TrimTokenFilter': '_types/analysis/token_filters.ts#L328-L330', -'_types.analysis.TruncateTokenFilter': '_types/analysis/token_filters.ts#L332-L335', -'_types.analysis.UaxEmailUrlTokenizer': '_types/analysis/tokenizers.ts#L110-L113', -'_types.analysis.UniqueTokenFilter': '_types/analysis/token_filters.ts#L337-L340', -'_types.analysis.UppercaseTokenFilter': '_types/analysis/token_filters.ts#L342-L344', -'_types.analysis.WhitespaceAnalyzer': '_types/analysis/analyzers.ts#L108-L111', -'_types.analysis.WhitespaceTokenizer': '_types/analysis/tokenizers.ts#L115-L118', -'_types.analysis.WordDelimiterGraphTokenFilter': '_types/analysis/token_filters.ts#L151-L168', -'_types.analysis.WordDelimiterTokenFilter': '_types/analysis/token_filters.ts#L134-L149', +'_types.analysis.TokenizerDefinition': '_types/analysis/tokenizers.ts#L141-L164', +'_types.analysis.TrimTokenFilter': '_types/analysis/token_filters.ts#L327-L329', +'_types.analysis.TruncateTokenFilter': '_types/analysis/token_filters.ts#L331-L334', +'_types.analysis.TurkishAnalyzer': '_types/analysis/analyzers.ts#L299-L304', +'_types.analysis.UaxEmailUrlTokenizer': '_types/analysis/tokenizers.ts#L127-L130', +'_types.analysis.UniqueTokenFilter': '_types/analysis/token_filters.ts#L336-L339', +'_types.analysis.UppercaseTokenFilter': '_types/analysis/token_filters.ts#L341-L343', +'_types.analysis.WhitespaceAnalyzer': '_types/analysis/analyzers.ts#L354-L357', +'_types.analysis.WhitespaceTokenizer': '_types/analysis/tokenizers.ts#L132-L135', +'_types.analysis.WordDelimiterGraphTokenFilter': '_types/analysis/token_filters.ts#L150-L167', +'_types.analysis.WordDelimiterTokenFilter': '_types/analysis/token_filters.ts#L133-L148', '_types.mapping.AggregateMetricDoubleProperty': '_types/mapping/complex.ts#L61-L66', '_types.mapping.AllField': '_types/mapping/meta-fields.ts#L29-L40', '_types.mapping.BinaryProperty': '_types/mapping/core.ts#L55-L57', '_types.mapping.BooleanProperty': '_types/mapping/core.ts#L59-L65', '_types.mapping.ByteNumberProperty': '_types/mapping/core.ts#L172-L175', '_types.mapping.CompletionProperty': '_types/mapping/specialized.ts#L33-L41', +'_types.mapping.CompositeSubField': '_types/mapping/RuntimeFields.ts#L52-L54', '_types.mapping.ConstantKeywordProperty': '_types/mapping/specialized.ts#L50-L53', '_types.mapping.CorePropertyBase': '_types/mapping/core.ts#L45-L49', '_types.mapping.DataStreamTimestamp': '_types/mapping/TypeMapping.ts#L59-L61', '_types.mapping.DateNanosProperty': '_types/mapping/core.ts#L79-L87', '_types.mapping.DateProperty': '_types/mapping/core.ts#L67-L77', '_types.mapping.DateRangeProperty': '_types/mapping/range.ts#L29-L32', -'_types.mapping.DenseVectorIndexOptions': '_types/mapping/DenseVectorIndexOptions.ts#L22-L26', +'_types.mapping.DenseVectorIndexOptions': '_types/mapping/DenseVectorIndexOptions.ts#L22-L27', '_types.mapping.DenseVectorProperty': '_types/mapping/complex.ts#L52-L59', '_types.mapping.DocValuesPropertyBase': '_types/mapping/core.ts#L51-L53', '_types.mapping.DoubleNumberProperty': '_types/mapping/core.ts#L152-L155', @@ -696,9 +737,9 @@ '_types.mapping.RankFeatureProperty': '_types/mapping/core.ts#L192-L195', '_types.mapping.RankFeaturesProperty': '_types/mapping/core.ts#L197-L200', '_types.mapping.RoutingField': '_types/mapping/meta-fields.ts#L50-L52', -'_types.mapping.RuntimeField': '_types/mapping/RuntimeFields.ts#L26-L48', -'_types.mapping.RuntimeFieldFetchFields': '_types/mapping/RuntimeFields.ts#L50-L54', -'_types.mapping.RuntimeFieldType': '_types/mapping/RuntimeFields.ts#L56-L66', +'_types.mapping.RuntimeField': '_types/mapping/RuntimeFields.ts#L26-L50', +'_types.mapping.RuntimeFieldFetchFields': '_types/mapping/RuntimeFields.ts#L56-L60', +'_types.mapping.RuntimeFieldType': '_types/mapping/RuntimeFields.ts#L62-L72', '_types.mapping.ScaledFloatNumberProperty': '_types/mapping/core.ts#L182-L186', '_types.mapping.SearchAsYouTypeProperty': '_types/mapping/core.ts#L212-L222', '_types.mapping.SemanticTextProperty': '_types/mapping/core.ts#L206-L210', @@ -726,28 +767,28 @@ '_types.query_dsl.CombinedFieldsZeroTerms': '_types/query_dsl/abstractions.ts#L514-L523', '_types.query_dsl.CommonTermsQuery': '_types/query_dsl/fulltext.ts#L34-L44', '_types.query_dsl.ConstantScoreQuery': '_types/query_dsl/compound.ts#L70-L77', -'_types.query_dsl.DateDecayFunction': '_types/query_dsl/compound.ts#L193-L193', -'_types.query_dsl.DateDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L72-L75', +'_types.query_dsl.DateDecayFunction': '_types/query_dsl/compound.ts#L196-L196', +'_types.query_dsl.DateDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L71-L74', '_types.query_dsl.DateRangeQuery': '_types/query_dsl/term.ts#L146-L155', -'_types.query_dsl.DecayFunction': '_types/query_dsl/compound.ts#L199-L208', -'_types.query_dsl.DecayFunctionBase': '_types/query_dsl/compound.ts#L175-L186', -'_types.query_dsl.DecayPlacement': '_types/query_dsl/compound.ts#L154-L173', +'_types.query_dsl.DecayFunction': '_types/query_dsl/compound.ts#L202-L211', +'_types.query_dsl.DecayFunctionBase': '_types/query_dsl/compound.ts#L178-L189', +'_types.query_dsl.DecayPlacement': '_types/query_dsl/compound.ts#L157-L176', '_types.query_dsl.DisMaxQuery': '_types/query_dsl/compound.ts#L79-L91', -'_types.query_dsl.DistanceFeatureQuery': '_types/query_dsl/specialized.ts#L77-L85', -'_types.query_dsl.DistanceFeatureQueryBase': '_types/query_dsl/specialized.ts#L40-L60', +'_types.query_dsl.DistanceFeatureQuery': '_types/query_dsl/specialized.ts#L76-L84', +'_types.query_dsl.DistanceFeatureQueryBase': '_types/query_dsl/specialized.ts#L39-L59', '_types.query_dsl.ExistsQuery': '_types/query_dsl/term.ts#L37-L42', '_types.query_dsl.FieldAndFormat': '_types/query_dsl/abstractions.ts#L525-L539', '_types.query_dsl.FieldLookup': '_types/query_dsl/abstractions.ts#L429-L446', -'_types.query_dsl.FieldValueFactorModifier': '_types/query_dsl/compound.ts#L307-L350', -'_types.query_dsl.FieldValueFactorScoreFunction': '_types/query_dsl/compound.ts#L133-L152', -'_types.query_dsl.FunctionBoostMode': '_types/query_dsl/compound.ts#L279-L305', -'_types.query_dsl.FunctionScoreContainer': '_types/query_dsl/compound.ts#L210-L250', -'_types.query_dsl.FunctionScoreMode': '_types/query_dsl/compound.ts#L252-L277', -'_types.query_dsl.FunctionScoreQuery': '_types/query_dsl/compound.ts#L93-L119', +'_types.query_dsl.FieldValueFactorModifier': '_types/query_dsl/compound.ts#L310-L353', +'_types.query_dsl.FieldValueFactorScoreFunction': '_types/query_dsl/compound.ts#L136-L155', +'_types.query_dsl.FunctionBoostMode': '_types/query_dsl/compound.ts#L282-L308', +'_types.query_dsl.FunctionScoreContainer': '_types/query_dsl/compound.ts#L213-L253', +'_types.query_dsl.FunctionScoreMode': '_types/query_dsl/compound.ts#L255-L280', +'_types.query_dsl.FunctionScoreQuery': '_types/query_dsl/compound.ts#L93-L122', '_types.query_dsl.FuzzyQuery': '_types/query_dsl/term.ts#L44-L79', '_types.query_dsl.GeoBoundingBoxQuery': '_types/query_dsl/geo.ts#L32-L53', -'_types.query_dsl.GeoDecayFunction': '_types/query_dsl/compound.ts#L194-L197', -'_types.query_dsl.GeoDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L67-L70', +'_types.query_dsl.GeoDecayFunction': '_types/query_dsl/compound.ts#L197-L200', +'_types.query_dsl.GeoDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L66-L69', '_types.query_dsl.GeoDistanceQuery': '_types/query_dsl/geo.ts#L60-L91', '_types.query_dsl.GeoExecution': '_types/query_dsl/geo.ts#L55-L58', '_types.query_dsl.GeoPolygonPoints': '_types/query_dsl/geo.ts#L93-L95', @@ -767,47 +808,47 @@ '_types.query_dsl.IntervalsPrefix': '_types/query_dsl/fulltext.ts#L218-L233', '_types.query_dsl.IntervalsQuery': '_types/query_dsl/fulltext.ts#L235-L263', '_types.query_dsl.IntervalsWildcard': '_types/query_dsl/fulltext.ts#L265-L280', -'_types.query_dsl.Like': '_types/query_dsl/specialized.ts#L195-L200', -'_types.query_dsl.LikeDocument': '_types/query_dsl/specialized.ts#L171-L193', +'_types.query_dsl.Like': '_types/query_dsl/specialized.ts#L194-L199', +'_types.query_dsl.LikeDocument': '_types/query_dsl/specialized.ts#L170-L192', '_types.query_dsl.MatchAllQuery': '_types/query_dsl/MatchAllQuery.ts#L22-L22', '_types.query_dsl.MatchBoolPrefixQuery': '_types/query_dsl/fulltext.ts#L349-L403', '_types.query_dsl.MatchNoneQuery': '_types/query_dsl/MatchNoneQuery.ts#L22-L22', '_types.query_dsl.MatchPhrasePrefixQuery': '_types/query_dsl/fulltext.ts#L428-L454', '_types.query_dsl.MatchPhraseQuery': '_types/query_dsl/fulltext.ts#L405-L426', '_types.query_dsl.MatchQuery': '_types/query_dsl/fulltext.ts#L282-L347', -'_types.query_dsl.MoreLikeThisQuery': '_types/query_dsl/specialized.ts#L87-L169', +'_types.query_dsl.MoreLikeThisQuery': '_types/query_dsl/specialized.ts#L86-L168', '_types.query_dsl.MultiMatchQuery': '_types/query_dsl/fulltext.ts#L456-L539', -'_types.query_dsl.MultiValueMode': '_types/query_dsl/compound.ts#L352-L369', +'_types.query_dsl.MultiValueMode': '_types/query_dsl/compound.ts#L355-L372', '_types.query_dsl.NestedQuery': '_types/query_dsl/joining.ts#L106-L130', '_types.query_dsl.NumberRangeQuery': '_types/query_dsl/term.ts#L157-L157', -'_types.query_dsl.NumericDecayFunction': '_types/query_dsl/compound.ts#L192-L192', +'_types.query_dsl.NumericDecayFunction': '_types/query_dsl/compound.ts#L195-L195', '_types.query_dsl.Operator': '_types/query_dsl/Operator.ts#L22-L27', '_types.query_dsl.ParentIdQuery': '_types/query_dsl/joining.ts#L132-L146', -'_types.query_dsl.PercolateQuery': '_types/query_dsl/specialized.ts#L202-L239', -'_types.query_dsl.PinnedDoc': '_types/query_dsl/specialized.ts#L262-L271', -'_types.query_dsl.PinnedQuery': '_types/query_dsl/specialized.ts#L241-L260', +'_types.query_dsl.PercolateQuery': '_types/query_dsl/specialized.ts#L201-L238', +'_types.query_dsl.PinnedDoc': '_types/query_dsl/specialized.ts#L261-L270', +'_types.query_dsl.PinnedQuery': '_types/query_dsl/specialized.ts#L240-L259', '_types.query_dsl.PrefixQuery': '_types/query_dsl/term.ts#L88-L107', '_types.query_dsl.QueryBase': '_types/query_dsl/abstractions.ts#L452-L463', '_types.query_dsl.QueryContainer': '_types/query_dsl/abstractions.ts#L102-L427', '_types.query_dsl.QueryStringQuery': '_types/query_dsl/fulltext.ts#L580-L700', -'_types.query_dsl.RandomScoreFunction': '_types/query_dsl/compound.ts#L128-L131', +'_types.query_dsl.RandomScoreFunction': '_types/query_dsl/compound.ts#L131-L134', '_types.query_dsl.RangeQuery': '_types/query_dsl/term.ts#L161-L170', '_types.query_dsl.RangeQueryBase': '_types/query_dsl/term.ts#L109-L133', '_types.query_dsl.RangeRelation': '_types/query_dsl/term.ts#L172-L185', -'_types.query_dsl.RankFeatureFunction': '_types/query_dsl/specialized.ts#L273-L273', -'_types.query_dsl.RankFeatureFunctionLinear': '_types/query_dsl/specialized.ts#L275-L275', -'_types.query_dsl.RankFeatureFunctionLogarithm': '_types/query_dsl/specialized.ts#L277-L282', -'_types.query_dsl.RankFeatureFunctionSaturation': '_types/query_dsl/specialized.ts#L284-L289', -'_types.query_dsl.RankFeatureFunctionSigmoid': '_types/query_dsl/specialized.ts#L291-L300', -'_types.query_dsl.RankFeatureQuery': '_types/query_dsl/specialized.ts#L302-L325', +'_types.query_dsl.RankFeatureFunction': '_types/query_dsl/specialized.ts#L272-L272', +'_types.query_dsl.RankFeatureFunctionLinear': '_types/query_dsl/specialized.ts#L274-L274', +'_types.query_dsl.RankFeatureFunctionLogarithm': '_types/query_dsl/specialized.ts#L276-L281', +'_types.query_dsl.RankFeatureFunctionSaturation': '_types/query_dsl/specialized.ts#L283-L288', +'_types.query_dsl.RankFeatureFunctionSigmoid': '_types/query_dsl/specialized.ts#L290-L299', +'_types.query_dsl.RankFeatureQuery': '_types/query_dsl/specialized.ts#L301-L324', '_types.query_dsl.RegexpQuery': '_types/query_dsl/term.ts#L187-L217', -'_types.query_dsl.RuleQuery': '_types/query_dsl/specialized.ts#L381-L385', -'_types.query_dsl.ScriptQuery': '_types/query_dsl/specialized.ts#L327-L333', -'_types.query_dsl.ScriptScoreFunction': '_types/query_dsl/compound.ts#L121-L126', -'_types.query_dsl.ScriptScoreQuery': '_types/query_dsl/specialized.ts#L335-L349', +'_types.query_dsl.RuleQuery': '_types/query_dsl/specialized.ts#L380-L384', +'_types.query_dsl.ScriptQuery': '_types/query_dsl/specialized.ts#L326-L332', +'_types.query_dsl.ScriptScoreFunction': '_types/query_dsl/compound.ts#L124-L129', +'_types.query_dsl.ScriptScoreQuery': '_types/query_dsl/specialized.ts#L334-L348', '_types.query_dsl.SemanticQuery': '_types/query_dsl/SemanticQuery.ts#L22-L27', -'_types.query_dsl.ShapeFieldQuery': '_types/query_dsl/specialized.ts#L366-L379', -'_types.query_dsl.ShapeQuery': '_types/query_dsl/specialized.ts#L351-L364', +'_types.query_dsl.ShapeFieldQuery': '_types/query_dsl/specialized.ts#L365-L378', +'_types.query_dsl.ShapeQuery': '_types/query_dsl/specialized.ts#L350-L363', '_types.query_dsl.SimpleQueryStringFlag': '_types/query_dsl/fulltext.ts#L708-L763', '_types.query_dsl.SimpleQueryStringQuery': '_types/query_dsl/fulltext.ts#L765-L830', '_types.query_dsl.SpanContainingQuery': '_types/query_dsl/span.ts#L25-L36', @@ -831,10 +872,10 @@ '_types.query_dsl.TextQueryType': '_types/query_dsl/fulltext.ts#L541-L567', '_types.query_dsl.TokenPruningConfig': '_types/query_dsl/TokenPruningConfig.ts#L22-L35', '_types.query_dsl.TypeQuery': '_types/query_dsl/term.ts#L269-L271', -'_types.query_dsl.UntypedDecayFunction': '_types/query_dsl/compound.ts#L188-L191', -'_types.query_dsl.UntypedDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L62-L65', +'_types.query_dsl.UntypedDecayFunction': '_types/query_dsl/compound.ts#L191-L194', +'_types.query_dsl.UntypedDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L61-L64', '_types.query_dsl.UntypedRangeQuery': '_types/query_dsl/term.ts#L135-L144', -'_types.query_dsl.WeightedTokensQuery': '_types/query_dsl/WeightedTokensQuery.ts#L27-L32', +'_types.query_dsl.WeightedTokensQuery': '_types/query_dsl/WeightedTokensQuery.ts#L25-L30', '_types.query_dsl.WildcardQuery': '_types/query_dsl/term.ts#L273-L290', '_types.query_dsl.WrapperQuery': '_types/query_dsl/abstractions.ts#L501-L507', '_types.query_dsl.ZeroTermsQuery': '_types/query_dsl/fulltext.ts#L569-L578', @@ -857,67 +898,150 @@ 'cat._types.CatTrainedModelsColumn': 'cat/_types/CatBase.ts#L561-L635', 'cat._types.CatTransformColumn': 'cat/_types/CatBase.ts#L640-L844', 'cat.aliases.AliasesRecord': 'cat/aliases/types.ts#L22-L53', -'cat.aliases.Request': 'cat/aliases/CatAliasesRequest.ts#L23-L41', +'cat.aliases.Request': 'cat/aliases/CatAliasesRequest.ts#L23-L43', 'cat.aliases.Response': 'cat/aliases/CatAliasesResponse.ts#L22-L24', 'cat.component_templates.ComponentTemplate': 'cat/component_templates/types.ts#L20-L28', -'cat.component_templates.Request': 'cat/component_templates/CatComponentTemplatesRequest.ts#L22-L37', +'cat.component_templates.Request': 'cat/component_templates/CatComponentTemplatesRequest.ts#L22-L39', 'cat.component_templates.Response': 'cat/component_templates/CatComponentTemplatesResponse.ts#L22-L24', 'cat.count.CountRecord': 'cat/count/types.ts#L23-L39', -'cat.count.Request': 'cat/count/CatCountRequest.ts#L23-L42', +'cat.count.Request': 'cat/count/CatCountRequest.ts#L23-L44', 'cat.count.Response': 'cat/count/CatCountResponse.ts#L22-L24', 'cat.help.HelpRecord': 'cat/help/types.ts#L20-L22', -'cat.help.Request': 'cat/help/CatHelpRequest.ts#L22-L28', +'cat.help.Request': 'cat/help/CatHelpRequest.ts#L22-L30', 'cat.help.Response': 'cat/help/CatHelpResponse.ts#L22-L24', -'cat.indices.IndicesRecord': 'cat/indices/types.ts#L20-L801', -'cat.indices.Request': 'cat/indices/CatIndicesRequest.ts#L24-L68', +'cat.indices.IndicesRecord': 'cat/indices/types.ts#L20-L808', +'cat.indices.Request': 'cat/indices/CatIndicesRequest.ts#L24-L77', 'cat.indices.Response': 'cat/indices/CatIndicesResponse.ts#L22-L24', 'cat.ml_data_frame_analytics.DataFrameAnalyticsRecord': 'cat/ml_data_frame_analytics/types.ts#L22-L102', -'cat.ml_data_frame_analytics.Request': 'cat/ml_data_frame_analytics/CatDataFrameAnalyticsRequest.ts#L24-L58', +'cat.ml_data_frame_analytics.Request': 'cat/ml_data_frame_analytics/CatDataFrameAnalyticsRequest.ts#L24-L59', 'cat.ml_data_frame_analytics.Response': 'cat/ml_data_frame_analytics/CatDataFrameAnalyticsResponse.ts#L22-L24', 'cat.ml_datafeeds.DatafeedsRecord': 'cat/ml_datafeeds/types.ts#L22-L87', -'cat.ml_datafeeds.Request': 'cat/ml_datafeeds/CatDatafeedsRequest.ts#L24-L73', +'cat.ml_datafeeds.Request': 'cat/ml_datafeeds/CatDatafeedsRequest.ts#L24-L74', 'cat.ml_datafeeds.Response': 'cat/ml_datafeeds/CatDatafeedsResponse.ts#L22-L24', 'cat.ml_jobs.JobsRecord': 'cat/ml_jobs/types.ts#L24-L347', -'cat.ml_jobs.Request': 'cat/ml_jobs/CatJobsRequest.ts#L24-L77', +'cat.ml_jobs.Request': 'cat/ml_jobs/CatJobsRequest.ts#L24-L78', 'cat.ml_jobs.Response': 'cat/ml_jobs/CatJobsResponse.ts#L22-L24', -'cat.ml_trained_models.Request': 'cat/ml_trained_models/CatTrainedModelsRequest.ts#L24-L63', +'cat.ml_trained_models.Request': 'cat/ml_trained_models/CatTrainedModelsRequest.ts#L24-L64', 'cat.ml_trained_models.Response': 'cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L24', 'cat.ml_trained_models.TrainedModelsRecord': 'cat/ml_trained_models/types.ts#L23-L115', -'cat.transforms.Request': 'cat/transforms/CatTransformsRequest.ts#L25-L77', +'cat.transforms.Request': 'cat/transforms/CatTransformsRequest.ts#L25-L78', 'cat.transforms.Response': 'cat/transforms/CatTransformsResponse.ts#L22-L24', 'cat.transforms.TransformsRecord': 'cat/transforms/types.ts#L22-L197', -'cluster._types.ComponentTemplate': 'cluster/_types/ComponentTemplate.ts#L30-L33', -'cluster._types.ComponentTemplateNode': 'cluster/_types/ComponentTemplate.ts#L35-L40', -'cluster._types.ComponentTemplateSummary': 'cluster/_types/ComponentTemplate.ts#L42-L54', -'cluster.delete_component_template.Request': 'cluster/delete_component_template/ClusterDeleteComponentTemplateRequest.ts#L24-L54', +'cluster._types.ComponentTemplate': 'cluster/_types/ComponentTemplate.ts#L27-L30', +'cluster._types.ComponentTemplateNode': 'cluster/_types/ComponentTemplate.ts#L32-L37', +'cluster._types.ComponentTemplateSummary': 'cluster/_types/ComponentTemplate.ts#L39-L51', +'cluster.delete_component_template.Request': 'cluster/delete_component_template/ClusterDeleteComponentTemplateRequest.ts#L24-L55', 'cluster.delete_component_template.Response': 'cluster/delete_component_template/ClusterDeleteComponentTemplateResponse.ts#L22-L24', -'cluster.exists_component_template.Request': 'cluster/exists_component_template/ClusterComponentTemplateExistsRequest.ts#L24-L53', -'cluster.get_component_template.Request': 'cluster/get_component_template/ClusterGetComponentTemplateRequest.ts#L24-L65', +'cluster.exists_component_template.Request': 'cluster/exists_component_template/ClusterComponentTemplateExistsRequest.ts#L24-L55', +'cluster.get_component_template.Request': 'cluster/get_component_template/ClusterGetComponentTemplateRequest.ts#L24-L66', 'cluster.get_component_template.Response': 'cluster/get_component_template/ClusterGetComponentTemplateResponse.ts#L22-L24', -'cluster.info.Request': 'cluster/info/ClusterInfoRequest.ts#L23-L34', +'cluster.info.Request': 'cluster/info/ClusterInfoRequest.ts#L23-L36', 'cluster.info.Response': 'cluster/info/ClusterInfoResponse.ts#L26-L34', -'cluster.put_component_template.Request': 'cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L93', +'cluster.put_component_template.Request': 'cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L94', 'cluster.put_component_template.Response': 'cluster/put_component_template/ClusterPutComponentTemplateResponse.ts#L22-L24', +'connector._types.Connector': 'connector/_types/Connector.ts#L237-L268', +'connector._types.ConnectorConfigProperties': 'connector/_types/Connector.ts#L83-L99', +'connector._types.ConnectorFeatures': 'connector/_types/Connector.ts#L224-L229', +'connector._types.ConnectorFieldType': 'connector/_types/Connector.ts#L43-L48', +'connector._types.ConnectorScheduling': 'connector/_types/Connector.ts#L106-L110', +'connector._types.ConnectorStatus': 'connector/_types/Connector.ts#L130-L136', +'connector._types.ConnectorSyncJob': 'connector/_types/SyncJob.ts#L53-L72', +'connector._types.CustomScheduling': 'connector/_types/Connector.ts#L120-L126', +'connector._types.CustomSchedulingConfigurationOverrides': 'connector/_types/Connector.ts#L112-L118', +'connector._types.Dependency': 'connector/_types/Connector.ts#L30-L33', +'connector._types.DisplayType': 'connector/_types/Connector.ts#L35-L41', +'connector._types.FeatureEnabled': 'connector/_types/Connector.ts#L215-L217', +'connector._types.FilteringAdvancedSnippet': 'connector/_types/Connector.ts#L192-L196', +'connector._types.FilteringConfig': 'connector/_types/Connector.ts#L209-L213', +'connector._types.FilteringPolicy': 'connector/_types/Connector.ts#L155-L158', +'connector._types.FilteringRule': 'connector/_types/Connector.ts#L170-L179', +'connector._types.FilteringRuleRule': 'connector/_types/Connector.ts#L160-L168', +'connector._types.FilteringRules': 'connector/_types/Connector.ts#L203-L207', +'connector._types.FilteringRulesValidation': 'connector/_types/Connector.ts#L198-L201', +'connector._types.FilteringValidation': 'connector/_types/Connector.ts#L181-L184', +'connector._types.FilteringValidationState': 'connector/_types/Connector.ts#L186-L190', +'connector._types.GreaterThanValidation': 'connector/_types/Connector.ts#L63-L66', +'connector._types.IncludedInValidation': 'connector/_types/Connector.ts#L73-L76', +'connector._types.IngestPipelineParams': 'connector/_types/Connector.ts#L148-L153', +'connector._types.LessThanValidation': 'connector/_types/Connector.ts#L58-L61', +'connector._types.ListTypeValidation': 'connector/_types/Connector.ts#L68-L71', +'connector._types.RegexValidation': 'connector/_types/Connector.ts#L78-L81', +'connector._types.SchedulingConfiguration': 'connector/_types/Connector.ts#L231-L235', +'connector._types.SelectOption': 'connector/_types/Connector.ts#L25-L28', +'connector._types.SyncJobConnectorReference': 'connector/_types/SyncJob.ts#L31-L40', +'connector._types.SyncJobTriggerMethod': 'connector/_types/SyncJob.ts#L48-L51', +'connector._types.SyncJobType': 'connector/_types/SyncJob.ts#L42-L46', +'connector._types.SyncRulesFeature': 'connector/_types/Connector.ts#L219-L222', +'connector._types.SyncStatus': 'connector/_types/Connector.ts#L138-L146', +'connector._types.Validation': 'connector/_types/Connector.ts#L50-L56', +'connector.check_in.Request': 'connector/check_in/ConnectorCheckInRequest.ts#L22-L36', +'connector.check_in.Response': 'connector/check_in/ConnectorCheckInResponse.ts#L22-L26', +'connector.delete.Request': 'connector/delete/ConnectorDeleteRequest.ts#L22-L42', +'connector.delete.Response': 'connector/delete/ConnectorDeleteResponse.ts#L22-L24', +'connector.get.Request': 'connector/get/ConnectorGetRequest.ts#L22-L36', +'connector.get.Response': 'connector/get/ConnectorGetResponse.ts#L22-L24', +'connector.list.Request': 'connector/list/ConnectorListRequest.ts#L23-L57', +'connector.list.Response': 'connector/list/ConnectorListResponse.ts#L23-L28', +'connector.post.Request': 'connector/post/ConnectorPostRequest.ts#L22-L42', +'connector.post.Response': 'connector/post/ConnectorPostResponse.ts#L23-L28', +'connector.put.Request': 'connector/put/ConnectorPutRequest.ts#L22-L48', +'connector.put.Response': 'connector/put/ConnectorPutResponse.ts#L23-L28', +'connector.sync_job_cancel.Request': 'connector/sync_job_cancel/SyncJobCancelRequest.ts#L22-L36', +'connector.sync_job_cancel.Response': 'connector/sync_job_cancel/SyncJobCancelResponse.ts#L22-L26', +'connector.sync_job_delete.Request': 'connector/sync_job_delete/SyncJobDeleteRequest.ts#L22-L36', +'connector.sync_job_delete.Response': 'connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L24', +'connector.sync_job_get.Request': 'connector/sync_job_get/SyncJobGetRequest.ts#L22-L36', +'connector.sync_job_get.Response': 'connector/sync_job_get/SyncJobGetResponse.ts#L22-L24', +'connector.sync_job_list.Request': 'connector/sync_job_list/SyncJobListRequest.ts#L25-L55', +'connector.sync_job_list.Response': 'connector/sync_job_list/SyncJobListResponse.ts#L23-L28', +'connector.sync_job_post.Request': 'connector/sync_job_post/SyncJobPostRequest.ts#L23-L43', +'connector.sync_job_post.Response': 'connector/sync_job_post/SyncJobPostResponse.ts#L22-L26', +'connector.update_active_filtering.Request': 'connector/update_active_filtering/ConnectorUpdateActiveFilteringRequest.ts#L22-L36', +'connector.update_active_filtering.Response': 'connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts#L22-L26', +'connector.update_api_key_id.Request': 'connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L42', +'connector.update_api_key_id.Response': 'connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts#L22-L26', +'connector.update_configuration.Request': 'connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L47', +'connector.update_configuration.Response': 'connector/update_configuration/ConnectorUpdateConfigurationResponse.ts#L22-L26', +'connector.update_error.Request': 'connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L44', +'connector.update_error.Response': 'connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26', +'connector.update_filtering.Request': 'connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L50', +'connector.update_filtering.Response': 'connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26', +'connector.update_filtering_validation.Request': 'connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L40', +'connector.update_filtering_validation.Response': 'connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts#L22-L26', +'connector.update_index_name.Request': 'connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L43', +'connector.update_index_name.Response': 'connector/update_index_name/ConnectorUpdateIndexNameResponse.ts#L22-L26', +'connector.update_name.Request': 'connector/update_name/ConnectorUpdateNameRequest.ts#L22-L43', +'connector.update_name.Response': 'connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26', +'connector.update_native.Request': 'connector/update_native/ConnectorUpdateNativeRequest.ts#L22-L42', +'connector.update_native.Response': 'connector/update_native/ConnectorUpdateNativeResponse.ts#L22-L26', +'connector.update_pipeline.Request': 'connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L44', +'connector.update_pipeline.Response': 'connector/update_pipeline/ConnectorUpdatePipelineResponse.ts#L22-L26', +'connector.update_scheduling.Request': 'connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L44', +'connector.update_scheduling.Response': 'connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26', +'connector.update_service_type.Request': 'connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts#L22-L42', +'connector.update_service_type.Response': 'connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26', +'connector.update_status.Request': 'connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L43', +'connector.update_status.Response': 'connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26', 'enrich._types.Policy': 'enrich/_types/Policy.ts#L34-L41', 'enrich._types.PolicyType': 'enrich/_types/Policy.ts#L28-L32', 'enrich._types.Summary': 'enrich/_types/Policy.ts#L24-L26', -'enrich.delete_policy.Request': 'enrich/delete_policy/DeleteEnrichPolicyRequest.ts#L23-L36', +'enrich.delete_policy.Request': 'enrich/delete_policy/DeleteEnrichPolicyRequest.ts#L23-L37', 'enrich.delete_policy.Response': 'enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L24', 'enrich.execute_policy.EnrichPolicyPhase': 'enrich/execute_policy/types.ts#L24-L29', 'enrich.execute_policy.ExecuteEnrichPolicyStatus': 'enrich/execute_policy/types.ts#L20-L22', 'enrich.execute_policy.Request': 'enrich/execute_policy/ExecuteEnrichPolicyRequest.ts#L23-L44', 'enrich.execute_policy.Response': 'enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28', -'enrich.get_policy.Request': 'enrich/get_policy/GetEnrichPolicyRequest.ts#L23-L37', +'enrich.get_policy.Request': 'enrich/get_policy/GetEnrichPolicyRequest.ts#L23-L38', 'enrich.get_policy.Response': 'enrich/get_policy/GetEnrichPolicyResponse.ts#L22-L24', -'enrich.put_policy.Request': 'enrich/put_policy/PutEnrichPolicyRequest.ts#L24-L52', +'enrich.put_policy.Request': 'enrich/put_policy/PutEnrichPolicyRequest.ts#L24-L53', 'enrich.put_policy.Response': 'enrich/put_policy/PutEnrichPolicyResponse.ts#L22-L24', -'enrich.stats.CacheStats': 'enrich/stats/types.ts#L37-L43', -'enrich.stats.CoordinatorStats': 'enrich/stats/types.ts#L29-L35', -'enrich.stats.ExecutingPolicy': 'enrich/stats/types.ts#L24-L27', -'enrich.stats.Request': 'enrich/stats/EnrichStatsRequest.ts#L22-L28', +'enrich.stats.CacheStats': 'enrich/stats/types.ts#L38-L50', +'enrich.stats.CoordinatorStats': 'enrich/stats/types.ts#L30-L36', +'enrich.stats.ExecutingPolicy': 'enrich/stats/types.ts#L25-L28', +'enrich.stats.Request': 'enrich/stats/EnrichStatsRequest.ts#L22-L29', 'enrich.stats.Response': 'enrich/stats/EnrichStatsResponse.ts#L22-L39', 'eql._types.EqlHits': 'eql/_types/EqlHits.ts#L25-L39', -'eql._types.EqlSearchResponseBase': 'eql/_types/EqlSearchResponseBase.ts#L25-L50', +'eql._types.EqlSearchResponseBase': 'eql/_types/EqlSearchResponseBase.ts#L24-L49', 'eql._types.HitsEvent': 'eql/_types/EqlHits.ts#L41-L54', 'eql._types.HitsSequence': 'eql/_types/EqlHits.ts#L56-L64', 'eql.delete.Request': 'eql/delete/EqlDeleteRequest.ts#L23-L39', @@ -929,7 +1053,9 @@ 'eql.search.Request': 'eql/search/EqlSearchRequest.ts#L28-L118', 'eql.search.Response': 'eql/search/EqlSearchResponse.ts#L22-L24', 'eql.search.ResultPosition': 'eql/search/types.ts#L20-L32', -'esql.query.Request': 'esql/query/QueryRequest.ts#L24-L76', +'esql._types.TableValuesContainer': 'esql/_types/TableValuesContainer.ts#L22-L28', +'esql.query.EsqlFormat': 'esql/query/QueryRequest.ts#L91-L100', +'esql.query.Request': 'esql/query/QueryRequest.ts#L26-L89', 'esql.query.Response': 'esql/query/QueryResponse.ts#L22-L25', 'graph._types.Connection': 'graph/_types/Connection.ts#L22-L27', 'graph._types.ExploreControls': 'graph/_types/ExploreControls.ts#L24-L49', @@ -943,16 +1069,17 @@ 'indices._types.Alias': 'indices/_types/Alias.ts#L23-L53', 'indices._types.AliasDefinition': 'indices/_types/AliasDefinition.ts#L22-L54', 'indices._types.CacheQueries': 'indices/_types/IndexSettings.ts#L407-L409', -'indices._types.DataStream': 'indices/_types/DataStream.ts#L39-L112', -'indices._types.DataStreamIndex': 'indices/_types/DataStream.ts#L121-L142', +'indices._types.DataStream': 'indices/_types/DataStream.ts#L45-L127', +'indices._types.DataStreamIndex': 'indices/_types/DataStream.ts#L136-L157', 'indices._types.DataStreamLifecycle': 'indices/_types/DataStreamLifecycle.ts#L25-L31', 'indices._types.DataStreamLifecycleDownsampling': 'indices/_types/DataStreamLifecycleDownsampling.ts#L22-L27', 'indices._types.DataStreamLifecycleRolloverConditions': 'indices/_types/DataStreamLifecycle.ts#L57-L69', 'indices._types.DataStreamLifecycleWithRollover': 'indices/_types/DataStreamLifecycle.ts#L33-L55', -'indices._types.DataStreamTimestampField': 'indices/_types/DataStream.ts#L114-L119', -'indices._types.DataStreamVisibility': 'indices/_types/DataStream.ts#L144-L146', +'indices._types.DataStreamTimestampField': 'indices/_types/DataStream.ts#L129-L134', +'indices._types.DataStreamVisibility': 'indices/_types/DataStream.ts#L159-L161', 'indices._types.DownsampleConfig': 'indices/_types/Downsample.ts#L22-L27', 'indices._types.DownsamplingRound': 'indices/_types/DownsamplingRound.ts#L23-L32', +'indices._types.FailureStore': 'indices/_types/DataStream.ts#L39-L43', 'indices._types.FielddataFrequencyFilter': 'indices/_types/FielddataFrequencyFilter.ts#L22-L26', 'indices._types.IndexCheckOnStartup': 'indices/_types/IndexSettings.ts#L262-L269', 'indices._types.IndexRouting': 'indices/_types/IndexRouting.ts#L22-L25', @@ -971,9 +1098,9 @@ 'indices._types.IndexSettingsLifecycleStep': 'indices/_types/IndexSettings.ts#L311-L317', 'indices._types.IndexSettingsTimeSeries': 'indices/_types/IndexSettings.ts#L327-L330', 'indices._types.IndexState': 'indices/_types/IndexState.ts#L27-L40', -'indices._types.IndexTemplate': 'indices/_types/IndexTemplate.ts#L31-L70', -'indices._types.IndexTemplateDataStreamConfiguration': 'indices/_types/IndexTemplate.ts#L72-L83', -'indices._types.IndexTemplateSummary': 'indices/_types/IndexTemplate.ts#L85-L107', +'indices._types.IndexTemplate': 'indices/_types/IndexTemplate.ts#L28-L67', +'indices._types.IndexTemplateDataStreamConfiguration': 'indices/_types/IndexTemplate.ts#L69-L80', +'indices._types.IndexTemplateSummary': 'indices/_types/IndexTemplate.ts#L82-L104', 'indices._types.IndexVersioning': 'indices/_types/IndexSettings.ts#L271-L274', 'indices._types.IndexingPressure': 'indices/_types/IndexSettings.ts#L550-L552', 'indices._types.IndexingPressureMemory': 'indices/_types/IndexSettings.ts#L554-L561', @@ -1019,9 +1146,9 @@ 'indices._types.Translog': 'indices/_types/IndexSettings.ts#L341-L363', 'indices._types.TranslogDurability': 'indices/_types/IndexSettings.ts#L365-L380', 'indices._types.TranslogRetention': 'indices/_types/IndexSettings.ts#L382-L401', -'indices.add_block.IndicesBlockOptions': 'indices/add_block/IndicesAddBlockRequest.ts#L43-L48', +'indices.add_block.IndicesBlockOptions': 'indices/add_block/IndicesAddBlockRequest.ts#L45-L50', 'indices.add_block.IndicesBlockStatus': 'indices/add_block/IndicesAddBlockResponse.ts#L30-L33', -'indices.add_block.Request': 'indices/add_block/IndicesAddBlockRequest.ts#L24-L41', +'indices.add_block.Request': 'indices/add_block/IndicesAddBlockRequest.ts#L24-L43', 'indices.add_block.Response': 'indices/add_block/IndicesAddBlockResponse.ts#L22-L28', 'indices.analyze.AnalyzeDetail': 'indices/analyze/types.ts#L24-L30', 'indices.analyze.AnalyzeToken': 'indices/analyze/types.ts#L37-L44', @@ -1031,77 +1158,77 @@ 'indices.analyze.Request': 'indices/analyze/IndicesAnalyzeRequest.ts#L27-L92', 'indices.analyze.Response': 'indices/analyze/IndicesAnalyzeResponse.ts#L22-L27', 'indices.analyze.TokenDetail': 'indices/analyze/types.ts#L71-L74', -'indices.create.Request': 'indices/create/IndicesCreateRequest.ts#L28-L81', +'indices.create.Request': 'indices/create/IndicesCreateRequest.ts#L28-L82', 'indices.create.Response': 'indices/create/IndicesCreateResponse.ts#L22-L28', -'indices.create_data_stream.Request': 'indices/create_data_stream/IndicesCreateDataStreamRequest.ts#L23-L43', +'indices.create_data_stream.Request': 'indices/create_data_stream/IndicesCreateDataStreamRequest.ts#L24-L57', 'indices.create_data_stream.Response': 'indices/create_data_stream/IndicesCreateDataStreamResponse.ts#L22-L24', 'indices.data_streams_stats.DataStreamsStatsItem': 'indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L45-L65', -'indices.data_streams_stats.Request': 'indices/data_streams_stats/IndicesDataStreamsStatsRequest.ts#L23-L47', +'indices.data_streams_stats.Request': 'indices/data_streams_stats/IndicesDataStreamsStatsRequest.ts#L23-L48', 'indices.data_streams_stats.Response': 'indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L25-L43', -'indices.delete.Request': 'indices/delete/IndicesDeleteRequest.ts#L24-L73', +'indices.delete.Request': 'indices/delete/IndicesDeleteRequest.ts#L24-L74', 'indices.delete.Response': 'indices/delete/IndicesDeleteResponse.ts#L22-L24', -'indices.delete_alias.Request': 'indices/delete_alias/IndicesDeleteAliasRequest.ts#L24-L57', +'indices.delete_alias.Request': 'indices/delete_alias/IndicesDeleteAliasRequest.ts#L24-L58', 'indices.delete_alias.Response': 'indices/delete_alias/IndicesDeleteAliasResponse.ts#L22-L24', -'indices.delete_data_lifecycle.Request': 'indices/delete_data_lifecycle/IndicesDeleteDataLifecycleRequest.ts#L24-L39', +'indices.delete_data_lifecycle.Request': 'indices/delete_data_lifecycle/IndicesDeleteDataLifecycleRequest.ts#L24-L40', 'indices.delete_data_lifecycle.Response': 'indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponse.ts#L22-L24', -'indices.delete_data_stream.Request': 'indices/delete_data_stream/IndicesDeleteDataStreamRequest.ts#L23-L44', +'indices.delete_data_stream.Request': 'indices/delete_data_stream/IndicesDeleteDataStreamRequest.ts#L24-L51', 'indices.delete_data_stream.Response': 'indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L24', 'indices.delete_index_template.Request': 'indices/delete_index_template/IndicesDeleteIndexTemplateRequest.ts#L24-L53', 'indices.delete_index_template.Response': 'indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L24', -'indices.exists.Request': 'indices/exists/IndicesExistsRequest.ts#L23-L72', -'indices.exists_alias.Request': 'indices/exists_alias/IndicesExistsAliasRequest.ts#L23-L67', +'indices.exists.Request': 'indices/exists/IndicesExistsRequest.ts#L23-L73', +'indices.exists_alias.Request': 'indices/exists_alias/IndicesExistsAliasRequest.ts#L23-L68', 'indices.exists_index_template.Request': 'indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts#L24-L41', 'indices.explain_data_lifecycle.DataStreamLifecycleExplain': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41', -'indices.explain_data_lifecycle.Request': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleRequest.ts#L24-L38', +'indices.explain_data_lifecycle.Request': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleRequest.ts#L24-L39', 'indices.explain_data_lifecycle.Response': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L25-L29', -'indices.get.Feature': 'indices/get/IndicesGetRequest.ts#L90-L94', -'indices.get.Request': 'indices/get/IndicesGetRequest.ts#L24-L88', +'indices.get.Feature': 'indices/get/IndicesGetRequest.ts#L91-L95', +'indices.get.Request': 'indices/get/IndicesGetRequest.ts#L24-L89', 'indices.get.Response': 'indices/get/IndicesGetResponse.ts#L24-L27', 'indices.get_alias.IndexAliases': 'indices/get_alias/IndicesGetAliasResponse.ts#L37-L39', -'indices.get_alias.Request': 'indices/get_alias/IndicesGetAliasRequest.ts#L23-L70', +'indices.get_alias.Request': 'indices/get_alias/IndicesGetAliasRequest.ts#L23-L71', 'indices.get_alias.Response': 'indices/get_alias/IndicesGetAliasResponse.ts#L26-L35', 'indices.get_data_lifecycle.DataStreamWithLifecycle': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30', -'indices.get_data_lifecycle.Request': 'indices/get_data_lifecycle/IndicesGetDataLifecycleRequest.ts#L23-L52', +'indices.get_data_lifecycle.Request': 'indices/get_data_lifecycle/IndicesGetDataLifecycleRequest.ts#L24-L59', 'indices.get_data_lifecycle.Response': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25', -'indices.get_data_stream.Request': 'indices/get_data_stream/IndicesGetDataStreamRequest.ts#L23-L53', +'indices.get_data_stream.Request': 'indices/get_data_stream/IndicesGetDataStreamRequest.ts#L24-L65', 'indices.get_data_stream.Response': 'indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24', 'indices.get_index_template.IndexTemplateItem': 'indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L29-L32', 'indices.get_index_template.Request': 'indices/get_index_template/IndicesGetIndexTemplateRequest.ts#L24-L61', 'indices.get_index_template.Response': 'indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L23-L27', 'indices.get_mapping.IndexMappingRecord': 'indices/get_mapping/IndicesGetMappingResponse.ts#L29-L32', -'indices.get_mapping.Request': 'indices/get_mapping/IndicesGetMappingRequest.ts#L24-L72', +'indices.get_mapping.Request': 'indices/get_mapping/IndicesGetMappingRequest.ts#L24-L73', 'indices.get_mapping.Response': 'indices/get_mapping/IndicesGetMappingResponse.ts#L24-L27', -'indices.get_settings.Request': 'indices/get_settings/IndicesGetSettingsRequest.ts#L24-L91', +'indices.get_settings.Request': 'indices/get_settings/IndicesGetSettingsRequest.ts#L24-L92', 'indices.get_settings.Response': 'indices/get_settings/IndicesGetSettingsResponse.ts#L24-L27', -'indices.migrate_to_data_stream.Request': 'indices/migrate_to_data_stream/IndicesMigrateToDataStreamRequest.ts#L23-L44', +'indices.migrate_to_data_stream.Request': 'indices/migrate_to_data_stream/IndicesMigrateToDataStreamRequest.ts#L24-L58', 'indices.migrate_to_data_stream.Response': 'indices/migrate_to_data_stream/IndicesMigrateToDataStreamResponse.ts#L22-L24', 'indices.modify_data_stream.Action': 'indices/modify_data_stream/types.ts#L22-L37', 'indices.modify_data_stream.IndexAndDataStreamAction': 'indices/modify_data_stream/types.ts#L39-L44', -'indices.modify_data_stream.Request': 'indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L23-L36', +'indices.modify_data_stream.Request': 'indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L23-L37', 'indices.modify_data_stream.Response': 'indices/modify_data_stream/IndicesModifyDataStreamResponse.ts#L22-L24', -'indices.put_alias.Request': 'indices/put_alias/IndicesPutAliasRequest.ts#L25-L91', +'indices.put_alias.Request': 'indices/put_alias/IndicesPutAliasRequest.ts#L25-L92', 'indices.put_alias.Response': 'indices/put_alias/IndicesPutAliasResponse.ts#L22-L24', -'indices.put_data_lifecycle.Request': 'indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L75', +'indices.put_data_lifecycle.Request': 'indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L76', 'indices.put_data_lifecycle.Response': 'indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L24', 'indices.put_index_template.IndexTemplateMapping': 'indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L121-L143', 'indices.put_index_template.Request': 'indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L37-L119', 'indices.put_index_template.Response': 'indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L24', -'indices.put_mapping.Request': 'indices/put_mapping/IndicesPutMappingRequest.ts#L42-L149', +'indices.put_mapping.Request': 'indices/put_mapping/IndicesPutMappingRequest.ts#L41-L149', 'indices.put_mapping.Response': 'indices/put_mapping/IndicesPutMappingResponse.ts#L22-L24', -'indices.put_settings.Request': 'indices/put_settings/IndicesPutSettingsRequest.ts#L25-L92', +'indices.put_settings.Request': 'indices/put_settings/IndicesPutSettingsRequest.ts#L25-L93', 'indices.put_settings.Response': 'indices/put_settings/IndicesPutSettingsResponse.ts#L22-L24', 'indices.put_template.Request': 'indices/put_template/IndicesPutTemplateRequest.ts#L29-L95', 'indices.put_template.Response': 'indices/put_template/IndicesPutTemplateResponse.ts#L22-L24', -'indices.refresh.Request': 'indices/refresh/IndicesRefreshRequest.ts#L23-L60', +'indices.refresh.Request': 'indices/refresh/IndicesRefreshRequest.ts#L23-L61', 'indices.refresh.Response': 'indices/refresh/IndicesRefreshResponse.ts#L22-L24', 'indices.reload_search_analyzers.ReloadDetails': 'indices/reload_search_analyzers/types.ts#L27-L31', 'indices.reload_search_analyzers.ReloadResult': 'indices/reload_search_analyzers/types.ts#L22-L25', -'indices.resolve_index.Request': 'indices/resolve_index/ResolveIndexRequest.ts#L23-L48', +'indices.resolve_index.Request': 'indices/resolve_index/ResolveIndexRequest.ts#L23-L60', 'indices.resolve_index.ResolveIndexAliasItem': 'indices/resolve_index/ResolveIndexResponse.ts#L37-L40', 'indices.resolve_index.ResolveIndexDataStreamsItem': 'indices/resolve_index/ResolveIndexResponse.ts#L42-L46', 'indices.resolve_index.ResolveIndexItem': 'indices/resolve_index/ResolveIndexResponse.ts#L30-L35', 'indices.resolve_index.Response': 'indices/resolve_index/ResolveIndexResponse.ts#L22-L28', -'indices.rollover.Request': 'indices/rollover/IndicesRolloverRequest.ts#L29-L99', +'indices.rollover.Request': 'indices/rollover/IndicesRolloverRequest.ts#L29-L100', 'indices.rollover.Response': 'indices/rollover/IndicesRolloverResponse.ts#L22-L32', 'indices.rollover.RolloverConditions': 'indices/rollover/types.ts#L24-L40', 'indices.simulate_index_template.Request': 'indices/simulate_index_template/IndicesSimulateIndexTemplateRequest.ts#L24-L50', @@ -1114,10 +1241,10 @@ 'indices.update_aliases.AddAction': 'indices/update_aliases/types.ts#L41-L95', 'indices.update_aliases.RemoveAction': 'indices/update_aliases/types.ts#L97-L122', 'indices.update_aliases.RemoveIndexAction': 'indices/update_aliases/types.ts#L124-L139', -'indices.update_aliases.Request': 'indices/update_aliases/IndicesUpdateAliasesRequest.ts#L24-L51', +'indices.update_aliases.Request': 'indices/update_aliases/IndicesUpdateAliasesRequest.ts#L24-L52', 'indices.update_aliases.Response': 'indices/update_aliases/IndicesUpdateAliasesResponse.ts#L22-L24', 'indices.validate_query.IndicesValidationExplanation': 'indices/validate_query/IndicesValidateQueryResponse.ts#L32-L37', -'indices.validate_query.Request': 'indices/validate_query/IndicesValidateQueryRequest.ts#L25-L111', +'indices.validate_query.Request': 'indices/validate_query/IndicesValidateQueryRequest.ts#L25-L112', 'indices.validate_query.Response': 'indices/validate_query/IndicesValidateQueryResponse.ts#L23-L30', 'inference._types.CompletionResult': 'inference/_types/Results.ts#L60-L65', 'inference._types.DeleteInferenceEndpointResult': 'inference/_types/Results.ts#L91-L96', @@ -1137,69 +1264,76 @@ 'inference.inference.Response': 'inference/inference/InferenceResponse.ts#L22-L24', 'inference.put.Request': 'inference/put/PutRequest.ts#L25-L44', 'inference.put.Response': 'inference/put/PutResponse.ts#L22-L24', -'ingest._types.AppendProcessor': 'ingest/_types/Processors.ts#L279-L294', -'ingest._types.AttachmentProcessor': 'ingest/_types/Processors.ts#L296-L337', -'ingest._types.BytesProcessor': 'ingest/_types/Processors.ts#L392-L408', -'ingest._types.CircleProcessor': 'ingest/_types/Processors.ts#L410-L433', -'ingest._types.ConvertProcessor': 'ingest/_types/Processors.ts#L445-L465', -'ingest._types.ConvertType': 'ingest/_types/Processors.ts#L435-L443', -'ingest._types.CsvProcessor': 'ingest/_types/Processors.ts#L467-L500', -'ingest._types.DateIndexNameProcessor': 'ingest/_types/Processors.ts#L502-L540', -'ingest._types.DateProcessor': 'ingest/_types/Processors.ts#L542-L569', -'ingest._types.DissectProcessor': 'ingest/_types/Processors.ts#L571-L590', -'ingest._types.DotExpanderProcessor': 'ingest/_types/Processors.ts#L592-L603', -'ingest._types.DropProcessor': 'ingest/_types/Processors.ts#L605-L605', -'ingest._types.EnrichProcessor': 'ingest/_types/Processors.ts#L607-L646', -'ingest._types.FailProcessor': 'ingest/_types/Processors.ts#L648-L654', -'ingest._types.ForeachProcessor': 'ingest/_types/Processors.ts#L656-L670', -'ingest._types.GeoIpProcessor': 'ingest/_types/Processors.ts#L339-L368', -'ingest._types.GrokProcessor': 'ingest/_types/Processors.ts#L672-L697', -'ingest._types.GsubProcessor': 'ingest/_types/Processors.ts#L699-L723', -'ingest._types.InferenceConfig': 'ingest/_types/Processors.ts#L746-L758', -'ingest._types.InferenceConfigClassification': 'ingest/_types/Processors.ts#L773-L799', -'ingest._types.InferenceConfigRegression': 'ingest/_types/Processors.ts#L760-L771', -'ingest._types.InferenceProcessor': 'ingest/_types/Processors.ts#L725-L744', -'ingest._types.JoinProcessor': 'ingest/_types/Processors.ts#L801-L816', -'ingest._types.JsonProcessor': 'ingest/_types/Processors.ts#L818-L847', -'ingest._types.JsonProcessorConflictStrategy': 'ingest/_types/Processors.ts#L849-L854', -'ingest._types.KeyValueProcessor': 'ingest/_types/Processors.ts#L856-L908', -'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L910-L926', -'ingest._types.Pipeline': 'ingest/_types/Pipeline.ts#L23-L45', -'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L928-L939', -'ingest._types.ProcessorBase': 'ingest/_types/Processors.ts#L241-L264', -'ingest._types.ProcessorContainer': 'ingest/_types/Processors.ts#L27-L239', -'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L941-L955', -'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L957-L973', -'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L975-L1003', -'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1005-L1025', -'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1027-L1061', -'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1063-L1072', -'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1074-L1077', -'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1079-L1095', -'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1097-L1122', -'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1124-L1140', -'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1142-L1158', -'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1160-L1176', -'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L370-L390', -'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L266-L277', +'ingest._types.AppendProcessor': 'ingest/_types/Processors.ts#L291-L306', +'ingest._types.AttachmentProcessor': 'ingest/_types/Processors.ts#L308-L349', +'ingest._types.BytesProcessor': 'ingest/_types/Processors.ts#L482-L498', +'ingest._types.CircleProcessor': 'ingest/_types/Processors.ts#L500-L523', +'ingest._types.ConvertProcessor': 'ingest/_types/Processors.ts#L535-L555', +'ingest._types.ConvertType': 'ingest/_types/Processors.ts#L525-L533', +'ingest._types.CsvProcessor': 'ingest/_types/Processors.ts#L557-L590', +'ingest._types.DateIndexNameProcessor': 'ingest/_types/Processors.ts#L592-L630', +'ingest._types.DateProcessor': 'ingest/_types/Processors.ts#L632-L659', +'ingest._types.DissectProcessor': 'ingest/_types/Processors.ts#L661-L680', +'ingest._types.DotExpanderProcessor': 'ingest/_types/Processors.ts#L682-L700', +'ingest._types.DropProcessor': 'ingest/_types/Processors.ts#L702-L702', +'ingest._types.EnrichProcessor': 'ingest/_types/Processors.ts#L704-L743', +'ingest._types.FailProcessor': 'ingest/_types/Processors.ts#L745-L751', +'ingest._types.ForeachProcessor': 'ingest/_types/Processors.ts#L753-L767', +'ingest._types.GeoGridProcessor': 'ingest/_types/Processors.ts#L351-L392', +'ingest._types.GeoGridTargetFormat': 'ingest/_types/Processors.ts#L400-L403', +'ingest._types.GeoGridTileType': 'ingest/_types/Processors.ts#L394-L398', +'ingest._types.GeoIpProcessor': 'ingest/_types/Processors.ts#L405-L439', +'ingest._types.GrokProcessor': 'ingest/_types/Processors.ts#L769-L794', +'ingest._types.GsubProcessor': 'ingest/_types/Processors.ts#L796-L820', +'ingest._types.HtmlStripProcessor': 'ingest/_types/Processors.ts#L822-L838', +'ingest._types.InferenceConfig': 'ingest/_types/Processors.ts#L861-L873', +'ingest._types.InferenceConfigClassification': 'ingest/_types/Processors.ts#L888-L914', +'ingest._types.InferenceConfigRegression': 'ingest/_types/Processors.ts#L875-L886', +'ingest._types.InferenceProcessor': 'ingest/_types/Processors.ts#L840-L859', +'ingest._types.JoinProcessor': 'ingest/_types/Processors.ts#L916-L931', +'ingest._types.JsonProcessor': 'ingest/_types/Processors.ts#L933-L962', +'ingest._types.JsonProcessorConflictStrategy': 'ingest/_types/Processors.ts#L964-L969', +'ingest._types.KeyValueProcessor': 'ingest/_types/Processors.ts#L971-L1023', +'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L1025-L1041', +'ingest._types.Pipeline': 'ingest/_types/Pipeline.ts#L23-L51', +'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L1043-L1054', +'ingest._types.ProcessorBase': 'ingest/_types/Processors.ts#L266-L289', +'ingest._types.ProcessorContainer': 'ingest/_types/Processors.ts#L27-L264', +'ingest._types.RedactProcessor': 'ingest/_types/Processors.ts#L1056-L1090', +'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L1092-L1106', +'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L1108-L1124', +'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L1126-L1154', +'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1156-L1176', +'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1178-L1212', +'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1214-L1223', +'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1225-L1228', +'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1230-L1246', +'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1248-L1273', +'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1275-L1291', +'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1293-L1309', +'ingest._types.UriPartsProcessor': 'ingest/_types/Processors.ts#L1329-L1355', +'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1311-L1327', +'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L441-L472', +'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L474-L480', 'ingest.delete_pipeline.Request': 'ingest/delete_pipeline/DeletePipelineRequest.ts#L24-L52', 'ingest.delete_pipeline.Response': 'ingest/delete_pipeline/DeletePipelineResponse.ts#L22-L24', 'ingest.get_pipeline.Request': 'ingest/get_pipeline/GetPipelineRequest.ts#L24-L50', 'ingest.get_pipeline.Response': 'ingest/get_pipeline/GetPipelineResponse.ts#L23-L26', 'ingest.processor_grok.Request': 'ingest/processor_grok/GrokProcessorPatternsRequest.ts#L22-L31', 'ingest.processor_grok.Response': 'ingest/processor_grok/GrokProcessorPatternsResponse.ts#L22-L24', -'ingest.put_pipeline.Request': 'ingest/put_pipeline/PutPipelineRequest.ts#L25-L77', +'ingest.put_pipeline.Request': 'ingest/put_pipeline/PutPipelineRequest.ts#L25-L83', 'ingest.put_pipeline.Response': 'ingest/put_pipeline/PutPipelineResponse.ts#L22-L24', -'ingest.simulate.Document': 'ingest/simulate/types.ts#L41-L55', -'ingest.simulate.DocumentSimulation': 'ingest/simulate/types.ts#L57-L87', -'ingest.simulate.Ingest': 'ingest/simulate/types.ts#L28-L31', -'ingest.simulate.PipelineSimulation': 'ingest/simulate/types.ts#L33-L39', +'ingest.simulate.Document': 'ingest/simulate/types.ts#L50-L64', +'ingest.simulate.DocumentSimulation': 'ingest/simulate/types.ts#L66-L96', +'ingest.simulate.Ingest': 'ingest/simulate/types.ts#L29-L32', +'ingest.simulate.PipelineSimulation': 'ingest/simulate/types.ts#L40-L48', 'ingest.simulate.Request': 'ingest/simulate/SimulatePipelineRequest.ts#L25-L57', 'ingest.simulate.Response': 'ingest/simulate/SimulatePipelineResponse.ts#L22-L24', +'ingest.simulate.SimulateDocumentResult': 'ingest/simulate/types.ts#L34-L38', 'license._types.LicenseStatus': 'license/_types/License.ts#L35-L40', 'license._types.LicenseType': 'license/_types/License.ts#L23-L33', 'license.get.LicenseInformation': 'license/get/types.ts#L25-L38', -'license.get.Request': 'license/get/GetLicenseRequest.ts#L22-L44', +'license.get.Request': 'license/get/GetLicenseRequest.ts#L22-L45', 'license.get.Response': 'license/get/GetLicenseResponse.ts#L22-L24', 'logstash._types.Pipeline': 'logstash/_types/Pipeline.ts#L60-L92', 'logstash._types.PipelineMetadata': 'logstash/_types/Pipeline.ts#L23-L26', @@ -1231,29 +1365,29 @@ 'ml._types.DatafeedState': 'ml/_types/Datafeed.ts#L132-L137', 'ml._types.DatafeedStats': 'ml/_types/Datafeed.ts#L139-L168', 'ml._types.DatafeedTimingStats': 'ml/_types/Datafeed.ts#L170-L195', -'ml._types.DataframeAnalysis': 'ml/_types/DataframeAnalytics.ts#L134-L213', -'ml._types.DataframeAnalysisAnalyzedFields': 'ml/_types/DataframeAnalytics.ts#L238-L244', -'ml._types.DataframeAnalysisClassification': 'ml/_types/DataframeAnalytics.ts#L227-L236', -'ml._types.DataframeAnalysisContainer': 'ml/_types/DataframeAnalytics.ts#L84-L101', -'ml._types.DataframeAnalysisFeatureProcessor': 'ml/_types/DataframeAnalytics.ts#L246-L258', -'ml._types.DataframeAnalysisFeatureProcessorFrequencyEncoding': 'ml/_types/DataframeAnalytics.ts#L260-L267', -'ml._types.DataframeAnalysisFeatureProcessorMultiEncoding': 'ml/_types/DataframeAnalytics.ts#L269-L272', -'ml._types.DataframeAnalysisFeatureProcessorNGramEncoding': 'ml/_types/DataframeAnalytics.ts#L274-L286', -'ml._types.DataframeAnalysisFeatureProcessorOneHotEncoding': 'ml/_types/DataframeAnalytics.ts#L288-L293', -'ml._types.DataframeAnalysisFeatureProcessorTargetMeanEncoding': 'ml/_types/DataframeAnalytics.ts#L295-L304', -'ml._types.DataframeAnalysisOutlierDetection': 'ml/_types/DataframeAnalytics.ts#L103-L132', -'ml._types.DataframeAnalysisRegression': 'ml/_types/DataframeAnalytics.ts#L215-L225', -'ml._types.DataframeAnalytics': 'ml/_types/DataframeAnalytics.ts#L324-L344', +'ml._types.DataframeAnalysis': 'ml/_types/DataframeAnalytics.ts#L133-L212', +'ml._types.DataframeAnalysisAnalyzedFields': 'ml/_types/DataframeAnalytics.ts#L237-L243', +'ml._types.DataframeAnalysisClassification': 'ml/_types/DataframeAnalytics.ts#L226-L235', +'ml._types.DataframeAnalysisContainer': 'ml/_types/DataframeAnalytics.ts#L83-L100', +'ml._types.DataframeAnalysisFeatureProcessor': 'ml/_types/DataframeAnalytics.ts#L245-L257', +'ml._types.DataframeAnalysisFeatureProcessorFrequencyEncoding': 'ml/_types/DataframeAnalytics.ts#L259-L266', +'ml._types.DataframeAnalysisFeatureProcessorMultiEncoding': 'ml/_types/DataframeAnalytics.ts#L268-L271', +'ml._types.DataframeAnalysisFeatureProcessorNGramEncoding': 'ml/_types/DataframeAnalytics.ts#L273-L285', +'ml._types.DataframeAnalysisFeatureProcessorOneHotEncoding': 'ml/_types/DataframeAnalytics.ts#L287-L292', +'ml._types.DataframeAnalysisFeatureProcessorTargetMeanEncoding': 'ml/_types/DataframeAnalytics.ts#L294-L303', +'ml._types.DataframeAnalysisOutlierDetection': 'ml/_types/DataframeAnalytics.ts#L102-L131', +'ml._types.DataframeAnalysisRegression': 'ml/_types/DataframeAnalytics.ts#L214-L224', +'ml._types.DataframeAnalytics': 'ml/_types/DataframeAnalytics.ts#L323-L343', 'ml._types.DataframeAnalyticsAuthorization': 'ml/_types/Authorization.ts#L45-L57', -'ml._types.DataframeAnalyticsDestination': 'ml/_types/DataframeAnalytics.ts#L77-L82', -'ml._types.DataframeAnalyticsSource': 'ml/_types/DataframeAnalytics.ts#L39-L53', -'ml._types.DataframeAnalyticsStatsContainer': 'ml/_types/DataframeAnalytics.ts#L373-L381', -'ml._types.DataframeAnalyticsStatsDataCounts': 'ml/_types/DataframeAnalytics.ts#L364-L371', -'ml._types.DataframeAnalyticsStatsHyperparameters': 'ml/_types/DataframeAnalytics.ts#L383-L402', -'ml._types.DataframeAnalyticsStatsMemoryUsage': 'ml/_types/DataframeAnalytics.ts#L353-L362', -'ml._types.DataframeAnalyticsStatsOutlierDetection': 'ml/_types/DataframeAnalytics.ts#L404-L417', -'ml._types.DataframeAnalyticsStatsProgress': 'ml/_types/DataframeAnalytics.ts#L346-L351', -'ml._types.DataframeAnalyticsSummary': 'ml/_types/DataframeAnalytics.ts#L306-L322', +'ml._types.DataframeAnalyticsDestination': 'ml/_types/DataframeAnalytics.ts#L76-L81', +'ml._types.DataframeAnalyticsSource': 'ml/_types/DataframeAnalytics.ts#L38-L52', +'ml._types.DataframeAnalyticsStatsContainer': 'ml/_types/DataframeAnalytics.ts#L372-L380', +'ml._types.DataframeAnalyticsStatsDataCounts': 'ml/_types/DataframeAnalytics.ts#L363-L370', +'ml._types.DataframeAnalyticsStatsHyperparameters': 'ml/_types/DataframeAnalytics.ts#L382-L401', +'ml._types.DataframeAnalyticsStatsMemoryUsage': 'ml/_types/DataframeAnalytics.ts#L352-L361', +'ml._types.DataframeAnalyticsStatsOutlierDetection': 'ml/_types/DataframeAnalytics.ts#L403-L416', +'ml._types.DataframeAnalyticsStatsProgress': 'ml/_types/DataframeAnalytics.ts#L345-L350', +'ml._types.DataframeAnalyticsSummary': 'ml/_types/DataframeAnalytics.ts#L305-L321', 'ml._types.DataframeEvaluationClassification': 'ml/_types/DataframeEvaluation.ts#L35-L44', 'ml._types.DataframeEvaluationClassificationMetrics': 'ml/_types/DataframeEvaluation.ts#L73-L78', 'ml._types.DataframeEvaluationClassificationMetricsAucRoc': 'ml/_types/DataframeEvaluation.ts#L85-L90', @@ -1267,9 +1401,9 @@ 'ml._types.DataframeEvaluationRegressionMetricsMsle': 'ml/_types/DataframeEvaluation.ts#L112-L115', 'ml._types.DataframeState': 'ml/_types/Dataframe.ts#L20-L26', 'ml._types.DelayedDataCheckConfig': 'ml/_types/Datafeed.ts#L118-L129', -'ml._types.DeploymentAllocationState': 'ml/_types/TrainedModel.ts#L289-L302', -'ml._types.DeploymentAssignmentState': 'ml/_types/TrainedModel.ts#L304-L309', -'ml._types.DeploymentState': 'ml/_types/TrainedModel.ts#L274-L287', +'ml._types.DeploymentAllocationState': 'ml/_types/TrainedModel.ts#L288-L301', +'ml._types.DeploymentAssignmentState': 'ml/_types/TrainedModel.ts#L303-L308', +'ml._types.DeploymentState': 'ml/_types/TrainedModel.ts#L273-L286', 'ml._types.DetectionRule': 'ml/_types/Rule.ts#L25-L39', 'ml._types.Detector': 'ml/_types/Detector.ts#L25-L67', 'ml._types.DetectorRead': 'ml/_types/Detector.ts#L69-L125', @@ -1279,12 +1413,12 @@ 'ml._types.Filter': 'ml/_types/Filter.ts#L22-L29', 'ml._types.FilterRef': 'ml/_types/Filter.ts#L31-L41', 'ml._types.FilterType': 'ml/_types/Filter.ts#L43-L46', -'ml._types.Hyperparameter': 'ml/_types/TrainedModel.ts#L217-L231', -'ml._types.Hyperparameters': 'ml/_types/DataframeAnalytics.ts#L419-L525', +'ml._types.Hyperparameter': 'ml/_types/TrainedModel.ts#L216-L230', +'ml._types.Hyperparameters': 'ml/_types/DataframeAnalytics.ts#L418-L524', 'ml._types.Include': 'ml/_types/Include.ts#L20-L47', 'ml._types.InferenceConfigCreateContainer': 'ml/_types/inference.ts#L23-L80', 'ml._types.InferenceConfigUpdateContainer': 'ml/_types/inference.ts#L296-L318', -'ml._types.InferenceResponseResult': 'ml/_types/inference.ts#L459-L506', +'ml._types.InferenceResponseResult': 'ml/_types/inference.ts#L459-L507', 'ml._types.Job': 'ml/_types/Job.ts#L61-L180', 'ml._types.JobBlocked': 'ml/_types/Job.ts#L392-L395', 'ml._types.JobBlockedReason': 'ml/_types/Job.ts#L397-L401', @@ -1302,9 +1436,9 @@ 'ml._types.NlpBertTokenizationConfig': 'ml/_types/inference.ts#L131-L158', 'ml._types.NlpRobertaTokenizationConfig': 'ml/_types/inference.ts#L160-L187', 'ml._types.NlpTokenizationUpdateOptions': 'ml/_types/inference.ts#L356-L361', -'ml._types.OutlierDetectionParameters': 'ml/_types/DataframeAnalytics.ts#L527-L561', -'ml._types.OverallBucket': 'ml/_types/Bucket.ts#L130-L145', -'ml._types.OverallBucketJob': 'ml/_types/Bucket.ts#L146-L149', +'ml._types.OutlierDetectionParameters': 'ml/_types/DataframeAnalytics.ts#L526-L560', +'ml._types.OverallBucket': 'ml/_types/Bucket.ts#L129-L144', +'ml._types.OverallBucketJob': 'ml/_types/Bucket.ts#L145-L148', 'ml._types.Page': 'ml/_types/Page.ts#L22-L33', 'ml._types.PassThroughInferenceOptions': 'ml/_types/inference.ts#L224-L231', 'ml._types.PassThroughInferenceUpdateOptions': 'ml/_types/inference.ts#L385-L390', @@ -1312,7 +1446,7 @@ 'ml._types.QuestionAnsweringInferenceOptions': 'ml/_types/inference.ts#L282-L292', 'ml._types.QuestionAnsweringInferenceUpdateOptions': 'ml/_types/inference.ts#L420-L431', 'ml._types.RegressionInferenceOptions': 'ml/_types/inference.ts#L82-L91', -'ml._types.RoutingState': 'ml/_types/TrainedModel.ts#L351-L372', +'ml._types.RoutingState': 'ml/_types/TrainedModel.ts#L350-L371', 'ml._types.RuleAction': 'ml/_types/Rule.ts#L41-L50', 'ml._types.RuleCondition': 'ml/_types/Rule.ts#L52-L65', 'ml._types.RunningStateSearchInterval': 'ml/_types/Datafeed.ts#L213-L230', @@ -1322,41 +1456,41 @@ 'ml._types.TextEmbeddingInferenceUpdateOptions': 'ml/_types/inference.ts#L392-L396', 'ml._types.TextExpansionInferenceOptions': 'ml/_types/inference.ts#L247-L253', 'ml._types.TextExpansionInferenceUpdateOptions': 'ml/_types/inference.ts#L398-L402', -'ml._types.TimingStats': 'ml/_types/DataframeAnalytics.ts#L563-L568', +'ml._types.TimingStats': 'ml/_types/DataframeAnalytics.ts#L562-L567', 'ml._types.TokenizationConfigContainer': 'ml/_types/inference.ts#L110-L129', 'ml._types.TokenizationTruncate': 'ml/_types/inference.ts#L350-L354', 'ml._types.TopClassEntry': 'ml/_types/inference.ts#L440-L444', -'ml._types.TotalFeatureImportance': 'ml/_types/TrainedModel.ts#L233-L240', -'ml._types.TotalFeatureImportanceClass': 'ml/_types/TrainedModel.ts#L242-L247', -'ml._types.TotalFeatureImportanceStatistics': 'ml/_types/TrainedModel.ts#L249-L256', -'ml._types.TrainedModelAssignment': 'ml/_types/TrainedModel.ts#L403-L418', -'ml._types.TrainedModelAssignmentRoutingTable': 'ml/_types/TrainedModel.ts#L374-L392', -'ml._types.TrainedModelAssignmentTaskParameters': 'ml/_types/TrainedModel.ts#L316-L349', -'ml._types.TrainedModelConfig': 'ml/_types/TrainedModel.ts#L165-L200', -'ml._types.TrainedModelConfigInput': 'ml/_types/TrainedModel.ts#L202-L205', -'ml._types.TrainedModelConfigMetadata': 'ml/_types/TrainedModel.ts#L207-L215', -'ml._types.TrainedModelDeploymentAllocationStatus': 'ml/_types/TrainedModel.ts#L394-L401', -'ml._types.TrainedModelDeploymentNodesStats': 'ml/_types/TrainedModel.ts#L133-L163', -'ml._types.TrainedModelDeploymentStats': 'ml/_types/TrainedModel.ts#L62-L102', +'ml._types.TotalFeatureImportance': 'ml/_types/TrainedModel.ts#L232-L239', +'ml._types.TotalFeatureImportanceClass': 'ml/_types/TrainedModel.ts#L241-L246', +'ml._types.TotalFeatureImportanceStatistics': 'ml/_types/TrainedModel.ts#L248-L255', +'ml._types.TrainedModelAssignment': 'ml/_types/TrainedModel.ts#L402-L417', +'ml._types.TrainedModelAssignmentRoutingTable': 'ml/_types/TrainedModel.ts#L373-L391', +'ml._types.TrainedModelAssignmentTaskParameters': 'ml/_types/TrainedModel.ts#L315-L348', +'ml._types.TrainedModelConfig': 'ml/_types/TrainedModel.ts#L164-L199', +'ml._types.TrainedModelConfigInput': 'ml/_types/TrainedModel.ts#L201-L204', +'ml._types.TrainedModelConfigMetadata': 'ml/_types/TrainedModel.ts#L206-L214', +'ml._types.TrainedModelDeploymentAllocationStatus': 'ml/_types/TrainedModel.ts#L393-L400', +'ml._types.TrainedModelDeploymentNodesStats': 'ml/_types/TrainedModel.ts#L132-L162', +'ml._types.TrainedModelDeploymentStats': 'ml/_types/TrainedModel.ts#L61-L101', 'ml._types.TrainedModelEntities': 'ml/_types/inference.ts#L433-L439', 'ml._types.TrainedModelInferenceClassImportance': 'ml/_types/inference.ts#L446-L449', 'ml._types.TrainedModelInferenceFeatureImportance': 'ml/_types/inference.ts#L451-L455', -'ml._types.TrainedModelInferenceStats': 'ml/_types/TrainedModel.ts#L104-L124', -'ml._types.TrainedModelLocation': 'ml/_types/TrainedModel.ts#L420-L422', -'ml._types.TrainedModelLocationIndex': 'ml/_types/TrainedModel.ts#L424-L426', -'ml._types.TrainedModelPrefixStrings': 'ml/_types/TrainedModel.ts#L428-L437', -'ml._types.TrainedModelSizeStats': 'ml/_types/TrainedModel.ts#L126-L131', -'ml._types.TrainedModelStats': 'ml/_types/TrainedModel.ts#L42-L60', -'ml._types.TrainedModelType': 'ml/_types/TrainedModel.ts#L258-L272', -'ml._types.TrainingPriority': 'ml/_types/TrainedModel.ts#L311-L314', +'ml._types.TrainedModelInferenceStats': 'ml/_types/TrainedModel.ts#L103-L123', +'ml._types.TrainedModelLocation': 'ml/_types/TrainedModel.ts#L419-L421', +'ml._types.TrainedModelLocationIndex': 'ml/_types/TrainedModel.ts#L423-L425', +'ml._types.TrainedModelPrefixStrings': 'ml/_types/TrainedModel.ts#L427-L436', +'ml._types.TrainedModelSizeStats': 'ml/_types/TrainedModel.ts#L125-L130', +'ml._types.TrainedModelStats': 'ml/_types/TrainedModel.ts#L41-L59', +'ml._types.TrainedModelType': 'ml/_types/TrainedModel.ts#L257-L271', +'ml._types.TrainingPriority': 'ml/_types/TrainedModel.ts#L310-L313', 'ml._types.TransformAuthorization': 'ml/_types/Authorization.ts#L59-L71', -'ml._types.ValidationLoss': 'ml/_types/DataframeAnalytics.ts#L570-L575', +'ml._types.ValidationLoss': 'ml/_types/DataframeAnalytics.ts#L569-L574', 'ml._types.Vocabulary': 'ml/_types/inference.ts#L233-L235', 'ml._types.ZeroShotClassificationInferenceOptions': 'ml/_types/inference.ts#L201-L222', 'ml._types.ZeroShotClassificationInferenceUpdateOptions': 'ml/_types/inference.ts#L374-L383', 'ml.close_job.Request': 'ml/close_job/MlCloseJobRequest.ts#L24-L77', 'ml.close_job.Response': 'ml/close_job/MlCloseJobResponse.ts#L20-L22', -'ml.delete_calendar.Request': 'ml/delete_calendar/MlDeleteCalendarRequest.ts#L23-L36', +'ml.delete_calendar.Request': 'ml/delete_calendar/MlDeleteCalendarRequest.ts#L23-L37', 'ml.delete_calendar.Response': 'ml/delete_calendar/MlDeleteCalendarResponse.ts#L22-L24', 'ml.delete_calendar_event.Request': 'ml/delete_calendar_event/MlDeleteCalendarEventRequest.ts#L23-L42', 'ml.delete_calendar_event.Response': 'ml/delete_calendar_event/MlDeleteCalendarEventResponse.ts#L22-L24', @@ -1374,7 +1508,7 @@ 'ml.delete_trained_model.Response': 'ml/delete_trained_model/MlDeleteTrainedModelResponse.ts#L22-L24', 'ml.delete_trained_model_alias.Request': 'ml/delete_trained_model_alias/MlDeleteTrainedModelAliasRequest.ts#L23-L44', 'ml.delete_trained_model_alias.Response': 'ml/delete_trained_model_alias/MlDeleteTrainedModelAliasResponse.ts#L22-L24', -'ml.estimate_model_memory.Request': 'ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L61', +'ml.estimate_model_memory.Request': 'ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L62', 'ml.estimate_model_memory.Response': 'ml/estimate_model_memory/MlEstimateModelMemoryResponse.ts#L20-L24', 'ml.evaluate_data_frame.ConfusionMatrixItem': 'ml/evaluate_data_frame/types.ts#L125-L130', 'ml.evaluate_data_frame.ConfusionMatrixPrediction': 'ml/evaluate_data_frame/types.ts#L132-L135', @@ -1402,7 +1536,7 @@ 'ml.get_data_frame_analytics.Request': 'ml/get_data_frame_analytics/MlGetDataFrameAnalyticsRequest.ts#L24-L77', 'ml.get_data_frame_analytics.Response': 'ml/get_data_frame_analytics/MlGetDataFrameAnalyticsResponse.ts#L23-L29', 'ml.get_data_frame_analytics_stats.Request': 'ml/get_data_frame_analytics_stats/MlGetDataFrameAnalyticsStatsRequest.ts#L24-L72', -'ml.get_data_frame_analytics_stats.Response': 'ml/get_data_frame_analytics_stats/MlGetDataFrameAnalyticsStatsResponse.ts#L24-L30', +'ml.get_data_frame_analytics_stats.Response': 'ml/get_data_frame_analytics_stats/MlGetDataFrameAnalyticsStatsResponse.ts#L23-L29', 'ml.get_datafeed_stats.Request': 'ml/get_datafeed_stats/MlGetDatafeedStatsRequest.ts#L23-L60', 'ml.get_datafeed_stats.Response': 'ml/get_datafeed_stats/MlGetDatafeedStatsResponse.ts#L23-L28', 'ml.get_datafeeds.Request': 'ml/get_datafeeds/MlGetDatafeedsRequest.ts#L23-L66', @@ -1413,20 +1547,20 @@ 'ml.get_job_stats.Response': 'ml/get_job_stats/MlGetJobStatsResponse.ts#L23-L28', 'ml.get_jobs.Request': 'ml/get_jobs/MlGetJobsRequest.ts#L23-L66', 'ml.get_jobs.Response': 'ml/get_jobs/MlGetJobsResponse.ts#L23-L28', -'ml.get_overall_buckets.Request': 'ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L143', +'ml.get_overall_buckets.Request': 'ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L145', 'ml.get_overall_buckets.Response': 'ml/get_overall_buckets/MlGetOverallBucketsResponse.ts#L23-L29', 'ml.get_trained_models.Request': 'ml/get_trained_models/MlGetTrainedModelRequest.ts#L25-L91', 'ml.get_trained_models.Response': 'ml/get_trained_models/MlGetTrainedModelResponse.ts#L23-L34', -'ml.get_trained_models_stats.Request': 'ml/get_trained_models_stats/MlGetTrainedModelStatsRequest.ts#L24-L64', +'ml.get_trained_models_stats.Request': 'ml/get_trained_models_stats/MlGetTrainedModelStatsRequest.ts#L24-L65', 'ml.get_trained_models_stats.Response': 'ml/get_trained_models_stats/MlGetTrainedModelStatsResponse.ts#L23-L33', 'ml.infer_trained_model.Request': 'ml/infer_trained_model/MlInferTrainedModelRequest.ts#L27-L59', 'ml.infer_trained_model.Response': 'ml/infer_trained_model/MlInferTrainedModelResponse.ts#L22-L26', -'ml.open_job.Request': 'ml/open_job/MlOpenJobRequest.ts#L24-L59', +'ml.open_job.Request': 'ml/open_job/MlOpenJobRequest.ts#L24-L58', 'ml.open_job.Response': 'ml/open_job/MlOpenJobResponse.ts#L22-L31', 'ml.post_calendar_events.Request': 'ml/post_calendar_events/MlPostCalendarEventsRequest.ts#L24-L40', 'ml.post_calendar_events.Response': 'ml/post_calendar_events/MlPostCalendarEventsResponse.ts#L22-L24', 'ml.preview_data_frame_analytics.DataframePreviewConfig': 'ml/preview_data_frame_analytics/types.ts#L27-L33', -'ml.preview_data_frame_analytics.Request': 'ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsRequest.ts#L24-L47', +'ml.preview_data_frame_analytics.Request': 'ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsRequest.ts#L24-L48', 'ml.preview_data_frame_analytics.Response': 'ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsResponse.ts#L23-L28', 'ml.preview_datafeed.Request': 'ml/preview_datafeed/MlPreviewDatafeedRequest.ts#L26-L69', 'ml.preview_datafeed.Response': 'ml/preview_datafeed/MlPreviewDatafeedResponse.ts#L20-L23', @@ -1449,14 +1583,14 @@ 'ml.put_trained_model.Input': 'ml/put_trained_model/types.ts#L56-L58', 'ml.put_trained_model.OneHotEncodingPreprocessor': 'ml/put_trained_model/types.ts#L44-L47', 'ml.put_trained_model.Preprocessor': 'ml/put_trained_model/types.ts#L31-L36', -'ml.put_trained_model.Request': 'ml/put_trained_model/MlPutTrainedModelRequest.ts#L29-L124', +'ml.put_trained_model.Request': 'ml/put_trained_model/MlPutTrainedModelRequest.ts#L31-L127', 'ml.put_trained_model.Response': 'ml/put_trained_model/MlPutTrainedModelResponse.ts#L22-L24', 'ml.put_trained_model.TargetMeanEncodingPreprocessor': 'ml/put_trained_model/types.ts#L49-L54', 'ml.put_trained_model.TrainedModel': 'ml/put_trained_model/types.ts#L60-L72', 'ml.put_trained_model.TrainedModelTree': 'ml/put_trained_model/types.ts#L74-L79', 'ml.put_trained_model.TrainedModelTreeNode': 'ml/put_trained_model/types.ts#L81-L91', 'ml.put_trained_model.Weights': 'ml/put_trained_model/types.ts#L108-L110', -'ml.put_trained_model_alias.Request': 'ml/put_trained_model_alias/MlPutTrainedModelAliasRequest.ts#L23-L65', +'ml.put_trained_model_alias.Request': 'ml/put_trained_model_alias/MlPutTrainedModelAliasRequest.ts#L23-L66', 'ml.put_trained_model_alias.Response': 'ml/put_trained_model_alias/MlPutTrainedModelAliasResponse.ts#L22-L24', 'ml.put_trained_model_definition_part.Request': 'ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartRequest.ts#L24-L57', 'ml.put_trained_model_definition_part.Response': 'ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartResponse.ts#L22-L24', @@ -1468,7 +1602,7 @@ 'ml.start_data_frame_analytics.Response': 'ml/start_data_frame_analytics/MlStartDataFrameAnalyticsResponse.ts#L22-L34', 'ml.start_datafeed.Request': 'ml/start_datafeed/MlStartDatafeedRequest.ts#L24-L91', 'ml.start_datafeed.Response': 'ml/start_datafeed/MlStartDatafeedResponse.ts#L22-L34', -'ml.start_trained_model_deployment.Request': 'ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L29-L92', +'ml.start_trained_model_deployment.Request': 'ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L29-L93', 'ml.start_trained_model_deployment.Response': 'ml/start_trained_model_deployment/MlStartTrainedModelDeploymentResponse.ts#L22-L26', 'ml.stop_data_frame_analytics.Request': 'ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsRequest.ts#L24-L70', 'ml.stop_data_frame_analytics.Response': 'ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsResponse.ts#L20-L22', @@ -1480,9 +1614,9 @@ 'ml.update_data_frame_analytics.Response': 'ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsResponse.ts#L30-L45', 'ml.update_datafeed.Request': 'ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L162', 'ml.update_datafeed.Response': 'ml/update_datafeed/MlUpdateDatafeedResponse.ts#L31-L49', -'ml.update_filter.Request': 'ml/update_filter/MlUpdateFilterRequest.ts#L23-L51', +'ml.update_filter.Request': 'ml/update_filter/MlUpdateFilterRequest.ts#L23-L52', 'ml.update_filter.Response': 'ml/update_filter/MlUpdateFilterResponse.ts#L22-L28', -'ml.update_job.Request': 'ml/update_job/MlUpdateJobRequest.ts#L33-L138', +'ml.update_job.Request': 'ml/update_job/MlUpdateJobRequest.ts#L33-L139', 'ml.update_job.Response': 'ml/update_job/MlUpdateJobResponse.ts#L29-L53', 'ml.update_trained_model_deployment.Request': 'ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts#L24-L62', 'ml.update_trained_model_deployment.Response': 'ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentResponse.ts#L22-L26', @@ -1496,10 +1630,10 @@ 'nodes._types.Scripting': 'nodes/_types/Stats.ts#L977-L995', 'nodes._types.ThreadCount': 'nodes/_types/Stats.ts#L1004-L1029', 'query_rules._types.QueryRule': 'query_rules/_types/QueryRuleset.ts#L36-L42', -'query_rules._types.QueryRuleActions': 'query_rules/_types/QueryRuleset.ts#L69-L72', -'query_rules._types.QueryRuleCriteria': 'query_rules/_types/QueryRuleset.ts#L48-L52', -'query_rules._types.QueryRuleCriteriaType': 'query_rules/_types/QueryRuleset.ts#L54-L67', -'query_rules._types.QueryRuleType': 'query_rules/_types/QueryRuleset.ts#L44-L46', +'query_rules._types.QueryRuleActions': 'query_rules/_types/QueryRuleset.ts#L70-L73', +'query_rules._types.QueryRuleCriteria': 'query_rules/_types/QueryRuleset.ts#L49-L53', +'query_rules._types.QueryRuleCriteriaType': 'query_rules/_types/QueryRuleset.ts#L55-L68', +'query_rules._types.QueryRuleType': 'query_rules/_types/QueryRuleset.ts#L44-L47', 'query_rules._types.QueryRuleset': 'query_rules/_types/QueryRuleset.ts#L25-L34', 'query_rules.delete_rule.Request': 'query_rules/delete_rule/QueryRuleDeleteRequest.ts#L22-L40', 'query_rules.delete_rule.Response': 'query_rules/delete_rule/QueryRuleDeleteResponse.ts#L22-L24', @@ -1533,41 +1667,41 @@ 'search_application.list.SearchApplicationListItem': 'search_application/list/SearchApplicationsListResponse.ts#L31-L48', 'search_application.put.Request': 'search_application/put/SearchApplicationsPutRequest.ts#L23-L48', 'search_application.put.Response': 'search_application/put/SearchApplicationsPutResponse.ts#L22-L26', -'search_application.put_behavioral_analytics.AnalyticsAcknowledgeResponseBase': 'search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L28-L33', +'search_application.put_behavioral_analytics.AnalyticsAcknowledgeResponseBase': 'search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L27-L32', 'search_application.put_behavioral_analytics.Request': 'search_application/put_behavioral_analytics/BehavioralAnalyticsPutRequest.ts#L22-L35', -'search_application.put_behavioral_analytics.Response': 'search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L24-L26', +'search_application.put_behavioral_analytics.Response': 'search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L23-L25', 'search_application.search.Request': 'search_application/search/SearchApplicationsSearchRequest.ts#L24-L52', -'search_application.search.Response': 'search_application/search/SearchApplicationsSearchResponse.ts#L23-L25', -'security._types.ApiKey': 'security/_types/ApiKey.ts#L27-L89', +'search_application.search.Response': 'search_application/search/SearchApplicationsSearchResponse.ts#L22-L24', +'security._types.ApiKey': 'security/_types/ApiKey.ts#L26-L88', 'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L27-L40', 'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L42-L195', 'security._types.FieldSecurity': 'security/_types/FieldSecurity.ts#L22-L25', 'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L292-L334', 'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L197-L221', 'security._types.RealmInfo': 'security/_types/RealmInfo.ts#L22-L25', -'security._types.RoleDescriptor': 'security/_types/RoleDescriptor.ts#L28-L61', +'security._types.RoleDescriptor': 'security/_types/RoleDescriptor.ts#L31-L64', 'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L289-L290', 'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L269-L287', -'security.authenticate.Request': 'security/authenticate/SecurityAuthenticateRequest.ts#L22-L30', +'security.authenticate.Request': 'security/authenticate/SecurityAuthenticateRequest.ts#L22-L32', 'security.authenticate.Response': 'security/authenticate/SecurityAuthenticateResponse.ts#L25-L43', 'security.authenticate.Token': 'security/authenticate/types.ts#L22-L29', -'security.create_api_key.Request': 'security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L58', +'security.create_api_key.Request': 'security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L59', 'security.create_api_key.Response': 'security/create_api_key/SecurityCreateApiKeyResponse.ts#L23-L50', -'security.get_api_key.Request': 'security/get_api_key/SecurityGetApiKeyRequest.ts#L23-L86', +'security.get_api_key.Request': 'security/get_api_key/SecurityGetApiKeyRequest.ts#L23-L87', 'security.get_api_key.Response': 'security/get_api_key/SecurityGetApiKeyResponse.ts#L22-L24', 'security.has_privileges.ApplicationPrivilegesCheck': 'security/has_privileges/types.ts#L24-L31', 'security.has_privileges.IndexPrivilegesCheck': 'security/has_privileges/types.ts#L33-L44', -'security.has_privileges.Request': 'security/has_privileges/SecurityHasPrivilegesRequest.ts#L25-L42', +'security.has_privileges.Request': 'security/has_privileges/SecurityHasPrivilegesRequest.ts#L25-L44', 'security.has_privileges.Response': 'security/has_privileges/SecurityHasPrivilegesResponse.ts#L24-L32', -'security.invalidate_api_key.Request': 'security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L66', +'security.invalidate_api_key.Request': 'security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L67', 'security.invalidate_api_key.Response': 'security/invalidate_api_key/SecurityInvalidateApiKeyResponse.ts#L23-L30', -'security.query_api_keys.ApiKeyAggregate': 'security/query_api_keys/types.ts#L123-L140', -'security.query_api_keys.ApiKeyAggregationContainer': 'security/query_api_keys/types.ts#L64-L121', -'security.query_api_keys.ApiKeyFiltersAggregation': 'security/query_api_keys/types.ts#L208-L228', -'security.query_api_keys.ApiKeyQueryContainer': 'security/query_api_keys/types.ts#L142-L206', -'security.query_api_keys.Request': 'security/query_api_keys/QueryApiKeysRequest.ts#L26-L99', +'security.query_api_keys.ApiKeyAggregate': 'security/query_api_keys/types.ts#L122-L139', +'security.query_api_keys.ApiKeyAggregationContainer': 'security/query_api_keys/types.ts#L63-L120', +'security.query_api_keys.ApiKeyFiltersAggregation': 'security/query_api_keys/types.ts#L207-L227', +'security.query_api_keys.ApiKeyQueryContainer': 'security/query_api_keys/types.ts#L141-L205', +'security.query_api_keys.Request': 'security/query_api_keys/QueryApiKeysRequest.ts#L26-L100', 'security.query_api_keys.Response': 'security/query_api_keys/QueryApiKeysResponse.ts#L26-L45', -'security.update_api_key.Request': 'security/update_api_key/Request.ts#L26-L65', +'security.update_api_key.Request': 'security/update_api_key/Request.ts#L26-L66', 'security.update_api_key.Response': 'security/update_api_key/Response.ts#L20-L28', 'sql.Column': 'sql/types.ts#L23-L26', 'sql.clear_cursor.Request': 'sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L34', @@ -1576,12 +1710,12 @@ 'sql.delete_async.Response': 'sql/delete_async/SqlDeleteAsyncResponse.ts#L22-L24', 'sql.get_async.Request': 'sql/get_async/SqlGetAsyncRequest.ts#L24-L58', 'sql.get_async.Response': 'sql/get_async/SqlGetAsyncResponse.ts#L23-L60', -'sql.get_async_status.Request': 'sql/get_async_status/SqlGetAsyncStatusRequest.ts#L24-L36', +'sql.get_async_status.Request': 'sql/get_async_status/SqlGetAsyncStatusRequest.ts#L23-L35', 'sql.get_async_status.Response': 'sql/get_async_status/SqlGetAsyncStatusResponse.ts#L23-L55', 'sql.query.Request': 'sql/query/QuerySqlRequest.ts#L28-L122', 'sql.query.Response': 'sql/query/QuerySqlResponse.ts#L23-L60', 'sql.translate.Request': 'sql/translate/TranslateSqlRequest.ts#L25-L54', -'sql.translate.Response': 'sql/translate/TranslateSqlResponse.ts#L28-L38', +'sql.translate.Response': 'sql/translate/TranslateSqlResponse.ts#L27-L37', 'synonyms._types.SynonymRule': 'synonyms/_types/SynonymRule.ts#L26-L35', 'synonyms._types.SynonymRuleRead': 'synonyms/_types/SynonymRule.ts#L38-L47', 'synonyms._types.SynonymsUpdateResult': 'synonyms/_types/SynonymsUpdateResult.ts#L23-L34', @@ -1601,7 +1735,7 @@ 'synonyms.put_synonym_rule.Request': 'synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L47', 'synonyms.put_synonym_rule.Response': 'synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L24', 'tasks._types.TaskInfo': 'tasks/_types/TaskInfo.ts#L32-L47', -'tasks.get.Request': 'tasks/get/GetTaskRequest.ts#L24-L50', +'tasks.get.Request': 'tasks/get/GetTaskRequest.ts#L24-L52', 'tasks.get.Response': 'tasks/get/GetTaskResponse.ts#L24-L31', 'transform._types.Destination': 'transform/_types/Transform.ts#L34-L45', 'transform._types.Latest': 'transform/_types/Transform.ts#L47-L52', @@ -1613,43 +1747,43 @@ 'transform._types.Source': 'transform/_types/Transform.ts#L146-L165', 'transform._types.SyncContainer': 'transform/_types/Transform.ts#L169-L175', 'transform._types.TimeSync': 'transform/_types/Transform.ts#L177-L189', -'transform.delete_transform.Request': 'transform/delete_transform/DeleteTransformRequest.ts#L24-L57', +'transform.delete_transform.Request': 'transform/delete_transform/DeleteTransformRequest.ts#L24-L58', 'transform.delete_transform.Response': 'transform/delete_transform/DeleteTransformResponse.ts#L22-L24', -'transform.get_transform.Request': 'transform/get_transform/GetTransformRequest.ts#L24-L72', +'transform.get_transform.Request': 'transform/get_transform/GetTransformRequest.ts#L24-L73', 'transform.get_transform.Response': 'transform/get_transform/GetTransformResponse.ts#L23-L25', 'transform.get_transform.TransformSummary': 'transform/get_transform/types.ts#L33-L61', 'transform.get_transform_stats.CheckpointStats': 'transform/get_transform_stats/types.ts#L76-L83', 'transform.get_transform_stats.Checkpointing': 'transform/get_transform_stats/types.ts#L85-L92', -'transform.get_transform_stats.Request': 'transform/get_transform_stats/GetTransformStatsRequest.ts#L25-L68', +'transform.get_transform_stats.Request': 'transform/get_transform_stats/GetTransformStatsRequest.ts#L25-L69', 'transform.get_transform_stats.Response': 'transform/get_transform_stats/GetTransformStatsResponse.ts#L23-L25', 'transform.get_transform_stats.TransformIndexerStats': 'transform/get_transform_stats/types.ts#L56-L74', 'transform.get_transform_stats.TransformProgress': 'transform/get_transform_stats/types.ts#L48-L54', 'transform.get_transform_stats.TransformStats': 'transform/get_transform_stats/types.ts#L31-L42', 'transform.get_transform_stats.TransformStatsHealth': 'transform/get_transform_stats/types.ts#L44-L46', -'transform.preview_transform.Request': 'transform/preview_transform/PreviewTransformRequest.ts#L33-L107', +'transform.preview_transform.Request': 'transform/preview_transform/PreviewTransformRequest.ts#L33-L108', 'transform.preview_transform.Response': 'transform/preview_transform/PreviewTransformResponse.ts#L22-L27', -'transform.put_transform.Request': 'transform/put_transform/PutTransformRequest.ts#L33-L122', +'transform.put_transform.Request': 'transform/put_transform/PutTransformRequest.ts#L33-L123', 'transform.put_transform.Response': 'transform/put_transform/PutTransformResponse.ts#L22-L24', -'transform.reset_transform.Request': 'transform/reset_transform/ResetTransformRequest.ts#L23-L48', +'transform.reset_transform.Request': 'transform/reset_transform/ResetTransformRequest.ts#L23-L49', 'transform.reset_transform.Response': 'transform/reset_transform/ResetTransformResponse.ts#L22-L24', -'transform.schedule_now_transform.Request': 'transform/schedule_now_transform/ScheduleNowTransformRequest.ts#L23-L49', +'transform.schedule_now_transform.Request': 'transform/schedule_now_transform/ScheduleNowTransformRequest.ts#L23-L50', 'transform.schedule_now_transform.Response': 'transform/schedule_now_transform/ScheduleNowTransformResponse.ts#L21-L23', -'transform.start_transform.Request': 'transform/start_transform/StartTransformRequest.ts#L24-L65', +'transform.start_transform.Request': 'transform/start_transform/StartTransformRequest.ts#L24-L66', 'transform.start_transform.Response': 'transform/start_transform/StartTransformResponse.ts#L22-L24', -'transform.stop_transform.Request': 'transform/stop_transform/StopTransformRequest.ts#L24-L76', +'transform.stop_transform.Request': 'transform/stop_transform/StopTransformRequest.ts#L24-L77', 'transform.stop_transform.Response': 'transform/stop_transform/StopTransformResponse.ts#L22-L24', -'transform.update_transform.Request': 'transform/update_transform/UpdateTransformRequest.ts#L31-L105', +'transform.update_transform.Request': 'transform/update_transform/UpdateTransformRequest.ts#L31-L106', 'transform.update_transform.Response': 'transform/update_transform/UpdateTransformResponse.ts#L33-L51', -'watcher._types.ActionStatusOptions': 'watcher/_types/Action.ts#L102-L107' +'watcher._types.ActionStatusOptions': 'watcher/_types/Action.ts#L96-L101' }; var hash = window.location.hash; if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/90fe7e26253312b8efb4cad3fcb5c49e02bb325d/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/b2ad2265c9a6469efee4426abbc45df5b0fe1c54/specification/" + (paths[hash] || ""); - Please see the Elasticsearch API specification. + Please see the Elasticsearch API specification. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java index c1b4e04ce..28832bdab 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java @@ -56,7 +56,8 @@ // typedef: enrich.delete_policy.Request /** - * Deletes an existing enrich policy and its enrich index. + * Delete an enrich policy. Deletes an existing enrich policy and its enrich + * index. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java index 93027966e..c624e1a58 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java @@ -68,7 +68,8 @@ public ElasticsearchEnrichAsyncClient withTransportOptions(@Nullable TransportOp // ----- Endpoint: enrich.delete_policy /** - * Deletes an existing enrich policy and its enrich index. + * Delete an enrich policy. Deletes an existing enrich policy and its enrich + * index. * * @see Documentation @@ -83,7 +84,8 @@ public CompletableFuture deletePolicy(DeletePolicyRequest } /** - * Deletes an existing enrich policy and its enrich index. + * Delete an enrich policy. Deletes an existing enrich policy and its enrich + * index. * * @param fn * a function that initializes a builder to create the @@ -134,7 +136,7 @@ public final CompletableFuture executePolicy( // ----- Endpoint: enrich.get_policy /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @see Documentation @@ -149,7 +151,7 @@ public CompletableFuture getPolicy(GetPolicyRequest request) } /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @param fn * a function that initializes a builder to create the @@ -165,7 +167,7 @@ public final CompletableFuture getPolicy( } /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @see Documentation @@ -180,7 +182,7 @@ public CompletableFuture getPolicy() { // ----- Endpoint: enrich.put_policy /** - * Creates an enrich policy. + * Create an enrich policy. Creates an enrich policy. * * @see Documentation @@ -195,7 +197,7 @@ public CompletableFuture putPolicy(PutPolicyRequest request) } /** - * Creates an enrich policy. + * Create an enrich policy. Creates an enrich policy. * * @param fn * a function that initializes a builder to create the @@ -213,8 +215,8 @@ public final CompletableFuture putPolicy( // ----- Endpoint: enrich.stats /** - * Returns enrich coordinator statistics and information about enrich policies - * that are currently executing. + * Get enrich stats. Returns enrich coordinator statistics and information about + * enrich policies that are currently executing. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java index f0780f16a..3201966b0 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java @@ -68,7 +68,8 @@ public ElasticsearchEnrichClient withTransportOptions(@Nullable TransportOptions // ----- Endpoint: enrich.delete_policy /** - * Deletes an existing enrich policy and its enrich index. + * Delete an enrich policy. Deletes an existing enrich policy and its enrich + * index. * * @see Documentation @@ -83,7 +84,8 @@ public DeletePolicyResponse deletePolicy(DeletePolicyRequest request) throws IOE } /** - * Deletes an existing enrich policy and its enrich index. + * Delete an enrich policy. Deletes an existing enrich policy and its enrich + * index. * * @param fn * a function that initializes a builder to create the @@ -137,7 +139,7 @@ public final ExecutePolicyResponse executePolicy( // ----- Endpoint: enrich.get_policy /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @see Documentation @@ -152,7 +154,7 @@ public GetPolicyResponse getPolicy(GetPolicyRequest request) throws IOException, } /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @param fn * a function that initializes a builder to create the @@ -168,7 +170,7 @@ public final GetPolicyResponse getPolicy(FunctionDocumentation @@ -183,7 +185,7 @@ public GetPolicyResponse getPolicy() throws IOException, ElasticsearchException // ----- Endpoint: enrich.put_policy /** - * Creates an enrich policy. + * Create an enrich policy. Creates an enrich policy. * * @see Documentation @@ -198,7 +200,7 @@ public PutPolicyResponse putPolicy(PutPolicyRequest request) throws IOException, } /** - * Creates an enrich policy. + * Create an enrich policy. Creates an enrich policy. * * @param fn * a function that initializes a builder to create the @@ -216,8 +218,8 @@ public final PutPolicyResponse putPolicy(FunctionDocumentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java index 83e037115..4415912ef 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java @@ -50,8 +50,8 @@ // typedef: enrich.stats.Request /** - * Returns enrich coordinator statistics and information about enrich policies - * that are currently executing. + * Get enrich stats. Returns enrich coordinator statistics and information about + * enrich policies that are currently executing. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java index 11d5ce276..c7f0bc30a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java @@ -58,7 +58,7 @@ // typedef: enrich.get_policy.Request /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java index 6f7d87a50..c7382272b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java @@ -58,7 +58,7 @@ // typedef: enrich.put_policy.Request /** - * Creates an enrich policy. + * Create an enrich policy. Creates an enrich policy. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CacheStats.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CacheStats.java index 61ad1fe41..37723bd0e 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CacheStats.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CacheStats.java @@ -31,6 +31,7 @@ import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; +import java.lang.Long; import java.lang.String; import java.util.Objects; import java.util.function.Function; @@ -66,10 +67,16 @@ public class CacheStats implements JsonpSerializable { private final int hits; + private final long hitsTimeInMillis; + private final int misses; + private final long missesTimeInMillis; + private final int evictions; + private final long sizeInBytes; + // --------------------------------------------------------------------------------------------- private CacheStats(Builder builder) { @@ -77,8 +84,11 @@ private CacheStats(Builder builder) { this.nodeId = ApiTypeHelper.requireNonNull(builder.nodeId, this, "nodeId"); this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count"); this.hits = ApiTypeHelper.requireNonNull(builder.hits, this, "hits"); + this.hitsTimeInMillis = ApiTypeHelper.requireNonNull(builder.hitsTimeInMillis, this, "hitsTimeInMillis"); this.misses = ApiTypeHelper.requireNonNull(builder.misses, this, "misses"); + this.missesTimeInMillis = ApiTypeHelper.requireNonNull(builder.missesTimeInMillis, this, "missesTimeInMillis"); this.evictions = ApiTypeHelper.requireNonNull(builder.evictions, this, "evictions"); + this.sizeInBytes = ApiTypeHelper.requireNonNull(builder.sizeInBytes, this, "sizeInBytes"); } @@ -107,6 +117,13 @@ public final int hits() { return this.hits; } + /** + * Required - API name: {@code hits_time_in_millis} + */ + public final long hitsTimeInMillis() { + return this.hitsTimeInMillis; + } + /** * Required - API name: {@code misses} */ @@ -114,6 +131,13 @@ public final int misses() { return this.misses; } + /** + * Required - API name: {@code misses_time_in_millis} + */ + public final long missesTimeInMillis() { + return this.missesTimeInMillis; + } + /** * Required - API name: {@code evictions} */ @@ -121,6 +145,13 @@ public final int evictions() { return this.evictions; } + /** + * Required - API name: {@code size_in_bytes} + */ + public final long sizeInBytes() { + return this.sizeInBytes; + } + /** * Serialize this object to JSON. */ @@ -141,12 +172,21 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("hits"); generator.write(this.hits); + generator.writeKey("hits_time_in_millis"); + generator.write(this.hitsTimeInMillis); + generator.writeKey("misses"); generator.write(this.misses); + generator.writeKey("misses_time_in_millis"); + generator.write(this.missesTimeInMillis); + generator.writeKey("evictions"); generator.write(this.evictions); + generator.writeKey("size_in_bytes"); + generator.write(this.sizeInBytes); + } @Override @@ -167,10 +207,16 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Integer hits; + private Long hitsTimeInMillis; + private Integer misses; + private Long missesTimeInMillis; + private Integer evictions; + private Long sizeInBytes; + /** * Required - API name: {@code node_id} */ @@ -195,6 +241,14 @@ public final Builder hits(int value) { return this; } + /** + * Required - API name: {@code hits_time_in_millis} + */ + public final Builder hitsTimeInMillis(long value) { + this.hitsTimeInMillis = value; + return this; + } + /** * Required - API name: {@code misses} */ @@ -203,6 +257,14 @@ public final Builder misses(int value) { return this; } + /** + * Required - API name: {@code misses_time_in_millis} + */ + public final Builder missesTimeInMillis(long value) { + this.missesTimeInMillis = value; + return this; + } + /** * Required - API name: {@code evictions} */ @@ -211,6 +273,14 @@ public final Builder evictions(int value) { return this; } + /** + * Required - API name: {@code size_in_bytes} + */ + public final Builder sizeInBytes(long value) { + this.sizeInBytes = value; + return this; + } + @Override protected Builder self() { return this; @@ -242,8 +312,11 @@ protected static void setupCacheStatsDeserializer(ObjectDeserializer> tables; + // --------------------------------------------------------------------------------------------- private QueryRequest(Builder builder) { @@ -110,6 +113,7 @@ private QueryRequest(Builder builder) { this.params = ApiTypeHelper.unmodifiable(builder.params); this.profile = builder.profile; this.query = ApiTypeHelper.requireNonNull(builder.query, this, "query"); + this.tables = ApiTypeHelper.unmodifiable(builder.tables); } @@ -172,7 +176,7 @@ public final Query filter() { * API name: {@code format} */ @Nullable - public final String format() { + public final EsqlFormat format() { return this.format; } @@ -196,6 +200,11 @@ public final List params() { } /** + * If provided and true the response will include an extra + * profile object with information on how the query was executed. + * This information is for human debugging and its format can change at any time + * but it can give some insight into the performance of each part of the query. + *

* API name: {@code profile} */ @Nullable @@ -213,6 +222,16 @@ public final String query() { return this.query; } + /** + * Tables to use with the LOOKUP operation. The top level key is the table name + * and the next level key is the column name. + *

+ * API name: {@code tables} + */ + public final Map> tables() { + return this.tables; + } + /** * Serialize this object to JSON. */ @@ -257,6 +276,26 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("query"); generator.write(this.query); + if (ApiTypeHelper.isDefined(this.tables)) { + generator.writeKey("tables"); + generator.writeStartObject(); + for (Map.Entry> item0 : this.tables.entrySet()) { + generator.writeKey(item0.getKey()); + generator.writeStartObject(); + if (item0.getValue() != null) { + for (Map.Entry item1 : item0.getValue().entrySet()) { + generator.writeKey(item1.getKey()); + item1.getValue().serialize(generator, mapper); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + } + } // --------------------------------------------------------------------------------------------- @@ -279,7 +318,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Query filter; @Nullable - private String format; + private EsqlFormat format; @Nullable private String locale; @@ -292,6 +331,9 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private String query; + @Nullable + private Map> tables; + /** * By default, ES|QL returns results as rows. For example, FROM returns each * individual document as one row. For the JSON, YAML, CBOR and smile formats, @@ -356,7 +398,7 @@ public final Builder filter(Function> fn) { *

* API name: {@code format} */ - public final Builder format(@Nullable String value) { + public final Builder format(@Nullable EsqlFormat value) { this.format = value; return this; } @@ -487,6 +529,11 @@ public final Builder params(Functiontrue the response will include an extra + * profile object with information on how the query was executed. + * This information is for human debugging and its format can change at any time + * but it can give some insight into the performance of each part of the query. + *

* API name: {@code profile} */ public final Builder profile(@Nullable Boolean value) { @@ -505,6 +552,32 @@ public final Builder query(String value) { return this; } + /** + * Tables to use with the LOOKUP operation. The top level key is the table name + * and the next level key is the column name. + *

+ * API name: {@code tables} + *

+ * Adds all entries of map to tables. + */ + public final Builder tables(Map> map) { + this.tables = _mapPutAll(this.tables, map); + return this; + } + + /** + * Tables to use with the LOOKUP operation. The top level key is the table name + * and the next level key is the column name. + *

+ * API name: {@code tables} + *

+ * Adds an entry to tables. + */ + public final Builder tables(String key, Map value) { + this.tables = _mapPut(this.tables, key, value); + return this; + } + @Override protected Builder self() { return this; @@ -539,6 +612,8 @@ protected static void setupQueryRequestDeserializer(ObjectDeserializerAPI + * specification + */ +@JsonpDeserializable +public class TableValues implements TaggedUnion, JsonpSerializable { + + /** + * {@link TableValues} variant kinds. + * + * @see API + * specification + */ + + public enum Kind implements JsonEnum { + Integer("integer"), + + Keyword("keyword"), + + Long("long"), + + Double("double"), + + ; + + private final String jsonValue; + + Kind(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + } + + private final Kind _kind; + private final Object _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final Object _get() { + return _value; + } + + public TableValues(TableValuesVariant value) { + + this._kind = ApiTypeHelper.requireNonNull(value._tableValuesKind(), this, ""); + this._value = ApiTypeHelper.requireNonNull(value, this, ""); + + } + + private TableValues(Builder builder) { + + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + + } + + public static TableValues of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Is this variant instance of kind {@code integer}? + */ + public boolean isInteger() { + return _kind == Kind.Integer; + } + + /** + * Get the {@code integer} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code integer} kind. + */ + public List> integer() { + return TaggedUnionUtils.get(this, Kind.Integer); + } + + /** + * Is this variant instance of kind {@code keyword}? + */ + public boolean isKeyword() { + return _kind == Kind.Keyword; + } + + /** + * Get the {@code keyword} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code keyword} kind. + */ + public List> keyword() { + return TaggedUnionUtils.get(this, Kind.Keyword); + } + + /** + * Is this variant instance of kind {@code long}? + */ + public boolean isLong() { + return _kind == Kind.Long; + } + + /** + * Get the {@code long} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code long} kind. + */ + public List> long_() { + return TaggedUnionUtils.get(this, Kind.Long); + } + + /** + * Is this variant instance of kind {@code double}? + */ + public boolean isDouble() { + return _kind == Kind.Double; + } + + /** + * Get the {@code double} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code double} kind. + */ + public List> double_() { + return TaggedUnionUtils.get(this, Kind.Double); + } + + @Override + @SuppressWarnings("unchecked") + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeStartObject(); + + generator.writeKey(_kind.jsonValue()); + if (_value instanceof JsonpSerializable) { + ((JsonpSerializable) _value).serialize(generator, mapper); + } else { + switch (_kind) { + case Integer : + generator.writeStartArray(); + for (List item0 : ((List>) this._value)) { + generator.writeStartArray(); + if (item0 != null) { + for (Integer item1 : item0) { + generator.write(item1); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + break; + case Keyword : + generator.writeStartArray(); + for (List item0 : ((List>) this._value)) { + generator.writeStartArray(); + if (item0 != null) { + for (String item1 : item0) { + generator.write(item1); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + break; + case Long : + generator.writeStartArray(); + for (List item0 : ((List>) this._value)) { + generator.writeStartArray(); + if (item0 != null) { + for (Long item1 : item0) { + generator.write(item1); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + break; + case Double : + generator.writeStartArray(); + for (List item0 : ((List>) this._value)) { + generator.writeStartArray(); + if (item0 != null) { + for (Double item1 : item0) { + generator.write(item1); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + break; + } + } + + generator.writeEnd(); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + + @Override + protected Builder self() { + return this; + } + public ObjectBuilder integer(List> v) { + this._kind = Kind.Integer; + this._value = v; + return this; + } + + public ObjectBuilder keyword(List> v) { + this._kind = Kind.Keyword; + this._value = v; + return this; + } + + public ObjectBuilder long_(List> v) { + this._kind = Kind.Long; + this._value = v; + return this; + } + + public ObjectBuilder double_(List> v) { + this._kind = Kind.Double; + this._value = v; + return this; + } + + public TableValues build() { + _checkSingleUse(); + return new TableValues(this); + } + + } + + protected static void setupTableValuesDeserializer(ObjectDeserializer op) { + + op.add(Builder::integer, JsonpDeserializer.arrayDeserializer( + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.integerDeserializer())), "integer"); + op.add(Builder::keyword, JsonpDeserializer.arrayDeserializer( + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer())), "keyword"); + op.add(Builder::long_, JsonpDeserializer + .arrayDeserializer(JsonpDeserializer.arrayDeserializer(JsonpDeserializer.longDeserializer())), "long"); + op.add(Builder::double_, JsonpDeserializer.arrayDeserializer( + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.doubleDeserializer())), "double"); + + } + + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + TableValues::setupTableValuesDeserializer, Builder::build); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RankBuilders.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesBuilders.java similarity index 71% rename from java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RankBuilders.java rename to java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesBuilders.java index 6e2200c4b..54f740e44 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RankBuilders.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesBuilders.java @@ -17,9 +17,14 @@ * under the License. */ -package co.elastic.clients.elasticsearch._types; +package co.elastic.clients.elasticsearch.esql; import co.elastic.clients.util.ObjectBuilder; +import java.lang.Double; +import java.lang.Integer; +import java.lang.Long; +import java.lang.String; +import java.util.List; import java.util.function.Function; //---------------------------------------------------------------- @@ -38,26 +43,15 @@ //---------------------------------------------------------------- /** - * Builders for {@link Rank} variants. + * Builders for {@link TableValues} variants. + *

+ * Variants integer, keyword, long, + * double are not available here as they don't have a dedicated + * class. Use {@link TableValues}'s builder for these. + * */ -public class RankBuilders { - private RankBuilders() { - } - - /** - * Creates a builder for the {@link RrfRank rrf} {@code Rank} variant. - */ - public static RrfRank.Builder rrf() { - return new RrfRank.Builder(); - } - - /** - * Creates a Rank of the {@link RrfRank rrf} {@code Rank} variant. - */ - public static Rank rrf(Function> fn) { - Rank.Builder builder = new Rank.Builder(); - builder.rrf(fn.apply(new RrfRank.Builder()).build()); - return builder.build(); +public class TableValuesBuilders { + private TableValuesBuilders() { } } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RankVariant.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesVariant.java similarity index 85% rename from java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RankVariant.java rename to java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesVariant.java index 296815a42..7fc6bbd29 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/RankVariant.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesVariant.java @@ -17,7 +17,7 @@ * under the License. */ -package co.elastic.clients.elasticsearch._types; +package co.elastic.clients.elasticsearch.esql; //---------------------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. @@ -35,14 +35,14 @@ //---------------------------------------------------------------- /** - * Base interface for {@link Rank} variants. + * Base interface for {@link TableValues} variants. */ -public interface RankVariant { +public interface TableValuesVariant { - Rank.Kind _rankKind(); + TableValues.Kind _tableValuesKind(); - default Rank _toRank() { - return new Rank(this); + default TableValues _toTableValues() { + return new TableValues(this); } } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/query/EsqlFormat.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/query/EsqlFormat.java new file mode 100644 index 000000000..f8870ad48 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/query/EsqlFormat.java @@ -0,0 +1,78 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.esql.query; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum EsqlFormat implements JsonEnum { + Csv("csv"), + + Json("json"), + + Tsv("tsv"), + + Txt("txt"), + + Yaml("yaml"), + + Cbor("cbor"), + + Smile("smile"), + + Arrow("arrow"), + + ; + + private final String jsonValue; + + EsqlFormat(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + EsqlFormat.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java index 0ed0fb241..575697586 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java @@ -61,7 +61,8 @@ // typedef: indices.add_block.Request /** - * Adds a block to an index. + * Add an index block. Limits the operations allowed on an index by blocking + * specific operation types. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java index 79ae44f41..a93f1bbe0 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java @@ -21,6 +21,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -31,7 +32,6 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.String; -import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -56,8 +56,8 @@ // typedef: indices.create_data_stream.Request /** - * Creates a data stream. You must have a matching index template with data - * stream enabled. + * Create a data stream. Creates a data stream. You must have a matching index + * template with data stream enabled. * * @see API @@ -65,13 +65,21 @@ */ public class CreateDataStreamRequest extends RequestBase { + @Nullable + private final Time masterTimeout; + private final String name; + @Nullable + private final Time timeout; + // --------------------------------------------------------------------------------------------- private CreateDataStreamRequest(Builder builder) { + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.timeout = builder.timeout; } @@ -79,6 +87,17 @@ public static CreateDataStreamRequest of(Function + * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - Name of the data stream, which must meet the following criteria: * Lowercase only; Cannot include \, /, @@ -95,6 +114,17 @@ public final String name() { return this.name; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + @Nullable + public final Time timeout() { + return this.timeout; + } + // --------------------------------------------------------------------------------------------- /** @@ -104,8 +134,35 @@ public final String name() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Time masterTimeout; + private String name; + @Nullable + private Time timeout; + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - Name of the data stream, which must meet the following criteria: * Lowercase only; Cannot include \, /, @@ -123,6 +180,27 @@ public final Builder name(String value) { return this; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(@Nullable Time value) { + this.timeout = value; + return this; + } + + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(Function> fn) { + return this.timeout(fn.apply(new Time.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -191,7 +269,14 @@ public CreateDataStreamRequest build() { // Request parameters request -> { - return Collections.emptyMap(); + Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } + if (request.timeout != null) { + params.put("timeout", request.timeout._toJsonString()); + } + return params; }, SimpleEndpoint.emptyMap(), false, CreateDataStreamResponse._DESERIALIZER); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java index 8f227b173..1a9e5011e 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java @@ -60,7 +60,7 @@ // typedef: indices.create.Request /** - * Creates a new index. + * Create an index. Creates a new index. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java index 9515531df..caedfe618 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java @@ -70,6 +70,9 @@ public class DataStream implements JsonpSerializable { @Nullable private final Boolean allowCustomRouting; + @Nullable + private final FailureStore failureStore; + private final int generation; private final boolean hidden; @@ -91,6 +94,8 @@ public class DataStream implements JsonpSerializable { @Nullable private final Boolean replicated; + private final boolean rolloverOnWrite; + private final HealthStatus status; @Nullable @@ -106,6 +111,7 @@ private DataStream(Builder builder) { this.meta = ApiTypeHelper.unmodifiable(builder.meta); this.allowCustomRouting = builder.allowCustomRouting; + this.failureStore = builder.failureStore; this.generation = ApiTypeHelper.requireNonNull(builder.generation, this, "generation"); this.hidden = ApiTypeHelper.requireNonNull(builder.hidden, this, "hidden"); this.ilmPolicy = builder.ilmPolicy; @@ -116,6 +122,7 @@ private DataStream(Builder builder) { this.lifecycle = builder.lifecycle; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); this.replicated = builder.replicated; + this.rolloverOnWrite = ApiTypeHelper.requireNonNull(builder.rolloverOnWrite, this, "rolloverOnWrite"); this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); this.system = builder.system; this.template = ApiTypeHelper.requireNonNull(builder.template, this, "template"); @@ -148,6 +155,16 @@ public final Boolean allowCustomRouting() { return this.allowCustomRouting; } + /** + * Information about failure store backing indices + *

+ * API name: {@code failure_store} + */ + @Nullable + public final FailureStore failureStore() { + return this.failureStore; + } + /** * Required - Current generation for the data stream. This number acts as a * cumulative count of the stream’s rollovers, starting at 1. @@ -215,8 +232,7 @@ public final List indices() { } /** - * Contains the configuration for the data lifecycle management of this data - * stream. + * Contains the configuration for the data stream lifecycle of this data stream. *

* API name: {@code lifecycle} */ @@ -246,6 +262,17 @@ public final Boolean replicated() { return this.replicated; } + /** + * Required - If true, the next write to this data stream will + * trigger a rollover first and the document will be indexed in the new backing + * index. If the rollover fails the indexing request will fail too. + *

+ * API name: {@code rollover_on_write} + */ + public final boolean rolloverOnWrite() { + return this.rolloverOnWrite; + } + /** * Required - Health status of the data stream. This health status is based on * the state of the primary and replica shards of the stream’s backing indices. @@ -314,6 +341,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("allow_custom_routing"); generator.write(this.allowCustomRouting); + } + if (this.failureStore != null) { + generator.writeKey("failure_store"); + this.failureStore.serialize(generator, mapper); + } generator.writeKey("generation"); generator.write(this.generation); @@ -354,6 +386,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.replicated); } + generator.writeKey("rollover_on_write"); + generator.write(this.rolloverOnWrite); + generator.writeKey("status"); this.status.serialize(generator, mapper); if (this.system != null) { @@ -387,6 +422,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private Boolean allowCustomRouting; + @Nullable + private FailureStore failureStore; + private Integer generation; private Boolean hidden; @@ -408,6 +446,8 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private Boolean replicated; + private Boolean rolloverOnWrite; + private HealthStatus status; @Nullable @@ -455,6 +495,25 @@ public final Builder allowCustomRouting(@Nullable Boolean value) { return this; } + /** + * Information about failure store backing indices + *

+ * API name: {@code failure_store} + */ + public final Builder failureStore(@Nullable FailureStore value) { + this.failureStore = value; + return this; + } + + /** + * Information about failure store backing indices + *

+ * API name: {@code failure_store} + */ + public final Builder failureStore(Function> fn) { + return this.failureStore(fn.apply(new FailureStore.Builder()).build()); + } + /** * Required - Current generation for the data stream. This number acts as a * cumulative count of the stream’s rollovers, starting at 1. @@ -556,8 +615,7 @@ public final Builder indices(Function * API name: {@code lifecycle} */ @@ -567,8 +625,7 @@ public final Builder lifecycle(@Nullable DataStreamLifecycleWithRollover value) } /** - * Contains the configuration for the data lifecycle management of this data - * stream. + * Contains the configuration for the data stream lifecycle of this data stream. *

* API name: {@code lifecycle} */ @@ -599,6 +656,18 @@ public final Builder replicated(@Nullable Boolean value) { return this; } + /** + * Required - If true, the next write to this data stream will + * trigger a rollover first and the document will be indexed in the new backing + * index. If the rollover fails the indexing request will fail too. + *

+ * API name: {@code rollover_on_write} + */ + public final Builder rolloverOnWrite(boolean value) { + this.rolloverOnWrite = value; + return this; + } + /** * Required - Health status of the data stream. This health status is based on * the state of the primary and replica shards of the stream’s backing indices. @@ -685,6 +754,7 @@ protected static void setupDataStreamDeserializer(ObjectDeserializer * API name: {@code managed_by} */ + @Nullable public final ManagedBy managedBy() { return this.managedBy; } /** - * Required - Indicates if ILM should take precedence over DSL in case both are - * configured to manage this index. + * Indicates if ILM should take precedence over DSL in case both are configured + * to manage this index. *

* API name: {@code prefer_ilm} */ - public final boolean preferIlm() { + @Nullable + public final Boolean preferIlm() { return this.preferIlm; } @@ -157,10 +160,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.ilmPolicy); } - generator.writeKey("managed_by"); - this.managedBy.serialize(generator, mapper); - generator.writeKey("prefer_ilm"); - generator.write(this.preferIlm); + if (this.managedBy != null) { + generator.writeKey("managed_by"); + this.managedBy.serialize(generator, mapper); + } + if (this.preferIlm != null) { + generator.writeKey("prefer_ilm"); + generator.write(this.preferIlm); + + } } @@ -183,8 +191,10 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private String ilmPolicy; + @Nullable private ManagedBy managedBy; + @Nullable private Boolean preferIlm; /** @@ -218,23 +228,22 @@ public final Builder ilmPolicy(@Nullable String value) { } /** - * Required - Name of the lifecycle system that's currently managing this - * backing index. + * Name of the lifecycle system that's currently managing this backing index. *

* API name: {@code managed_by} */ - public final Builder managedBy(ManagedBy value) { + public final Builder managedBy(@Nullable ManagedBy value) { this.managedBy = value; return this; } /** - * Required - Indicates if ILM should take precedence over DSL in case both are - * configured to manage this index. + * Indicates if ILM should take precedence over DSL in case both are configured + * to manage this index. *

* API name: {@code prefer_ilm} */ - public final Builder preferIlm(boolean value) { + public final Builder preferIlm(@Nullable Boolean value) { this.preferIlm = value; return this; } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java index d3d6f4040..7d8973e75 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java @@ -52,8 +52,8 @@ // typedef: indices._types.DataStreamLifecycle /** - * Data lifecycle denotes that a data stream is managed by the data stream - * lifecycle and contains the configuration. + * Data stream lifecycle denotes that a data stream is managed by the data + * stream lifecycle and contains the configuration. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycleWithRollover.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycleWithRollover.java index d1eb39b7f..14e94e6e1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycleWithRollover.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycleWithRollover.java @@ -52,7 +52,7 @@ // typedef: indices._types.DataStreamLifecycleWithRollover /** - * Data lifecycle with rollover can be used to display the configuration + * Data stream lifecycle with rollover can be used to display the configuration * including the default rollover conditions, if asked. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java index 379766b9e..711ef9bb2 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java @@ -58,7 +58,7 @@ // typedef: indices.delete_alias.Request /** - * Removes a data stream or index from an alias. + * Delete an alias. Removes a data stream or index from an alias. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java index 8da922024..806db4c28 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java @@ -59,8 +59,8 @@ // typedef: indices.delete_data_lifecycle.Request /** - * Removes the data lifecycle from a data stream rendering it not managed by the - * data stream lifecycle + * Delete data stream lifecycles. Removes the data stream lifecycle from a data + * stream, rendering it not managed by the data stream lifecycle. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java index a8cb9e4f4..4b048ef15 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java @@ -22,6 +22,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.ExpandWildcard; import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -58,7 +59,8 @@ // typedef: indices.delete_data_stream.Request /** - * Deletes one or more data streams and their backing indices. + * Delete data streams. Deletes one or more data streams and their backing + * indices. * * @see API @@ -68,6 +70,9 @@ public class DeleteDataStreamRequest extends RequestBase { private final List expandWildcards; + @Nullable + private final Time masterTimeout; + private final List name; // --------------------------------------------------------------------------------------------- @@ -75,6 +80,7 @@ public class DeleteDataStreamRequest extends RequestBase { private DeleteDataStreamRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.unmodifiableRequired(builder.name, this, "name"); } @@ -93,6 +99,17 @@ public final List expandWildcards() { return this.expandWildcards; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - Comma-separated list of data streams to delete. Wildcard * (*) expressions are supported. @@ -115,6 +132,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private List expandWildcards; + @Nullable + private Time masterTimeout; + private List name; /** @@ -143,6 +163,27 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val return this; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - Comma-separated list of data streams to delete. Wildcard * (*) expressions are supported. @@ -238,6 +279,9 @@ public DeleteDataStreamRequest build() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } if (ApiTypeHelper.isDefined(request.expandWildcards)) { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java index a82af788c..65b550b03 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java @@ -60,7 +60,7 @@ // typedef: indices.delete.Request /** - * Deletes one or more indices. + * Delete indices. Deletes one or more indices. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java index e9c68d0cf..fe5ed34cb 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java @@ -71,7 +71,8 @@ public ElasticsearchIndicesAsyncClient withTransportOptions(@Nullable TransportO // ----- Endpoint: indices.add_block /** - * Adds a block to an index. + * Add an index block. Limits the operations allowed on an index by blocking + * specific operation types. * * @see Documentation @@ -86,7 +87,8 @@ public CompletableFuture addBlock(AddBlockRequest request) { } /** - * Adds a block to an index. + * Add an index block. Limits the operations allowed on an index by blocking + * specific operation types. * * @param fn * a function that initializes a builder to create the @@ -150,7 +152,7 @@ public CompletableFuture analyze() { // ----- Endpoint: indices.create /** - * Creates a new index. + * Create an index. Creates a new index. * * @see Documentation @@ -165,7 +167,7 @@ public CompletableFuture create(CreateIndexRequest request) } /** - * Creates a new index. + * Create an index. Creates a new index. * * @param fn * a function that initializes a builder to create the @@ -183,8 +185,8 @@ public final CompletableFuture create( // ----- Endpoint: indices.create_data_stream /** - * Creates a data stream. You must have a matching index template with data - * stream enabled. + * Create a data stream. Creates a data stream. You must have a matching index + * template with data stream enabled. * * @see Documentation @@ -199,8 +201,8 @@ public CompletableFuture createDataStream(CreateDataSt } /** - * Creates a data stream. You must have a matching index template with data - * stream enabled. + * Create a data stream. Creates a data stream. You must have a matching index + * template with data stream enabled. * * @param fn * a function that initializes a builder to create the @@ -218,7 +220,7 @@ public final CompletableFuture createDataStream( // ----- Endpoint: indices.data_streams_stats /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @see Documentation @@ -233,7 +235,7 @@ public CompletableFuture dataStreamsStats(DataStreamsS } /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -249,7 +251,7 @@ public final CompletableFuture dataStreamsStats( } /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @see Documentation @@ -264,7 +266,7 @@ public CompletableFuture dataStreamsStats() { // ----- Endpoint: indices.delete /** - * Deletes one or more indices. + * Delete indices. Deletes one or more indices. * * @see Documentation @@ -279,7 +281,7 @@ public CompletableFuture delete(DeleteIndexRequest request) } /** - * Deletes one or more indices. + * Delete indices. Deletes one or more indices. * * @param fn * a function that initializes a builder to create the @@ -297,7 +299,7 @@ public final CompletableFuture delete( // ----- Endpoint: indices.delete_alias /** - * Removes a data stream or index from an alias. + * Delete an alias. Removes a data stream or index from an alias. * * @see Documentation @@ -312,7 +314,7 @@ public CompletableFuture deleteAlias(DeleteAliasRequest req } /** - * Removes a data stream or index from an alias. + * Delete an alias. Removes a data stream or index from an alias. * * @param fn * a function that initializes a builder to create the @@ -330,8 +332,8 @@ public final CompletableFuture deleteAlias( // ----- Endpoint: indices.delete_data_lifecycle /** - * Removes the data lifecycle from a data stream rendering it not managed by the - * data stream lifecycle + * Delete data stream lifecycles. Removes the data stream lifecycle from a data + * stream, rendering it not managed by the data stream lifecycle. * * @see Documentation @@ -346,8 +348,8 @@ public CompletableFuture deleteDataLifecycle(Delete } /** - * Removes the data lifecycle from a data stream rendering it not managed by the - * data stream lifecycle + * Delete data stream lifecycles. Removes the data stream lifecycle from a data + * stream, rendering it not managed by the data stream lifecycle. * * @param fn * a function that initializes a builder to create the @@ -365,7 +367,8 @@ public final CompletableFuture deleteDataLifecycle( // ----- Endpoint: indices.delete_data_stream /** - * Deletes one or more data streams and their backing indices. + * Delete data streams. Deletes one or more data streams and their backing + * indices. * * @see Documentation @@ -380,7 +383,8 @@ public CompletableFuture deleteDataStream(DeleteDataSt } /** - * Deletes one or more data streams and their backing indices. + * Delete data streams. Deletes one or more data streams and their backing + * indices. * * @param fn * a function that initializes a builder to create the @@ -437,7 +441,8 @@ public final CompletableFuture deleteIndexTemplate( // ----- Endpoint: indices.exists /** - * Checks if a data stream, index, or alias exists. + * Check indices. Checks if one or more indices, index aliases, or data streams + * exist. * * @see Documentation @@ -452,7 +457,8 @@ public CompletableFuture exists(ExistsRequest request) { } /** - * Checks if a data stream, index, or alias exists. + * Check indices. Checks if one or more indices, index aliases, or data streams + * exist. * * @param fn * a function that initializes a builder to create the @@ -470,7 +476,7 @@ public final CompletableFuture exists( // ----- Endpoint: indices.exists_alias /** - * Checks if an alias exists. + * Check aliases. Checks if one or more data stream or index aliases exist. * * @see Documentation @@ -485,7 +491,7 @@ public CompletableFuture existsAlias(ExistsAliasRequest request } /** - * Checks if an alias exists. + * Check aliases. Checks if one or more data stream or index aliases exist. * * @param fn * a function that initializes a builder to create the @@ -536,8 +542,10 @@ public final CompletableFuture existsIndexTemplate( // ----- Endpoint: indices.explain_data_lifecycle /** - * Retrieves information about the index's current data stream lifecycle, such - * as any potential encountered error, time since creation etc. + * Get the status for a data stream lifecycle. Retrieves information about an + * index or data stream’s current data stream lifecycle status, such as time + * since index creation, time since rollover, the lifecycle configuration + * managing the index, or any errors encountered during lifecycle execution. * * @see Documentation @@ -552,8 +560,10 @@ public CompletableFuture explainDataLifecycle(Expl } /** - * Retrieves information about the index's current data stream lifecycle, such - * as any potential encountered error, time since creation etc. + * Get the status for a data stream lifecycle. Retrieves information about an + * index or data stream’s current data stream lifecycle status, such as time + * since index creation, time since rollover, the lifecycle configuration + * managing the index, or any errors encountered during lifecycle execution. * * @param fn * a function that initializes a builder to create the @@ -571,8 +581,8 @@ public final CompletableFuture explainDataLifecycl // ----- Endpoint: indices.get /** - * Returns information about one or more indices. For data streams, the API - * returns information about the stream’s backing indices. + * Get index information. Returns information about one or more indices. For + * data streams, the API returns information about the stream’s backing indices. * * @see Documentation @@ -587,8 +597,8 @@ public CompletableFuture get(GetIndexRequest request) { } /** - * Returns information about one or more indices. For data streams, the API - * returns information about the stream’s backing indices. + * Get index information. Returns information about one or more indices. For + * data streams, the API returns information about the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -606,7 +616,8 @@ public final CompletableFuture get( // ----- Endpoint: indices.get_alias /** - * Retrieves information for one or more aliases. + * Get aliases. Retrieves information for one or more data stream or index + * aliases. * * @see Documentation @@ -621,7 +632,8 @@ public CompletableFuture getAlias(GetAliasRequest request) { } /** - * Retrieves information for one or more aliases. + * Get aliases. Retrieves information for one or more data stream or index + * aliases. * * @param fn * a function that initializes a builder to create the @@ -637,7 +649,8 @@ public final CompletableFuture getAlias( } /** - * Retrieves information for one or more aliases. + * Get aliases. Retrieves information for one or more data stream or index + * aliases. * * @see Documentation @@ -652,8 +665,8 @@ public CompletableFuture getAlias() { // ----- Endpoint: indices.get_data_lifecycle /** - * Retrieves the data stream lifecycle configuration of one or more data - * streams. + * Get data stream lifecycles. Retrieves the data stream lifecycle configuration + * of one or more data streams. * * @see Documentation @@ -668,8 +681,8 @@ public CompletableFuture getDataLifecycle(GetDataLifec } /** - * Retrieves the data stream lifecycle configuration of one or more data - * streams. + * Get data stream lifecycles. Retrieves the data stream lifecycle configuration + * of one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -687,7 +700,7 @@ public final CompletableFuture getDataLifecycle( // ----- Endpoint: indices.get_data_stream /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @see Documentation @@ -702,7 +715,7 @@ public CompletableFuture getDataStream(GetDataStreamReque } /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -718,7 +731,7 @@ public final CompletableFuture getDataStream( } /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @see Documentation @@ -779,8 +792,9 @@ public CompletableFuture getIndexTemplate() { // ----- Endpoint: indices.get_mapping /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @see Documentation @@ -795,8 +809,9 @@ public CompletableFuture getMapping(GetMappingRequest reques } /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @param fn * a function that initializes a builder to create the @@ -812,8 +827,9 @@ public final CompletableFuture getMapping( } /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @see Documentation @@ -828,8 +844,8 @@ public CompletableFuture getMapping() { // ----- Endpoint: indices.get_settings /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @see Documentation @@ -844,8 +860,8 @@ public CompletableFuture getSettings(GetIndicesSetti } /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -861,8 +877,8 @@ public final CompletableFuture getSettings( } /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @see Documentation @@ -877,15 +893,15 @@ public CompletableFuture getSettings() { // ----- Endpoint: indices.migrate_to_data_stream /** - * Converts an index alias to a data stream. You must have a matching index - * template that is data stream enabled. The alias must meet the following - * criteria: The alias must have a write index; All indices for the alias must - * have a @timestamp field mapping of a date or - * date_nanos field type; The alias must not have any filters; The - * alias must not use custom routing. If successful, the request removes the - * alias and creates a data stream with the same name. The indices for the alias - * become hidden backing indices for the stream. The write index for the alias - * becomes the write index for the stream. + * Convert an index alias to a data stream. Converts an index alias to a data + * stream. You must have a matching index template that is data stream enabled. + * The alias must meet the following criteria: The alias must have a write + * index; All indices for the alias must have a @timestamp field + * mapping of a date or date_nanos field type; The + * alias must not have any filters; The alias must not use custom routing. If + * successful, the request removes the alias and creates a data stream with the + * same name. The indices for the alias become hidden backing indices for the + * stream. The write index for the alias becomes the write index for the stream. * * @see Documentation @@ -900,15 +916,15 @@ public CompletableFuture migrateToDataStream(Migrat } /** - * Converts an index alias to a data stream. You must have a matching index - * template that is data stream enabled. The alias must meet the following - * criteria: The alias must have a write index; All indices for the alias must - * have a @timestamp field mapping of a date or - * date_nanos field type; The alias must not have any filters; The - * alias must not use custom routing. If successful, the request removes the - * alias and creates a data stream with the same name. The indices for the alias - * become hidden backing indices for the stream. The write index for the alias - * becomes the write index for the stream. + * Convert an index alias to a data stream. Converts an index alias to a data + * stream. You must have a matching index template that is data stream enabled. + * The alias must meet the following criteria: The alias must have a write + * index; All indices for the alias must have a @timestamp field + * mapping of a date or date_nanos field type; The + * alias must not have any filters; The alias must not use custom routing. If + * successful, the request removes the alias and creates a data stream with the + * same name. The indices for the alias become hidden backing indices for the + * stream. The write index for the alias becomes the write index for the stream. * * @param fn * a function that initializes a builder to create the @@ -926,8 +942,8 @@ public final CompletableFuture migrateToDataStream( // ----- Endpoint: indices.modify_data_stream /** - * Performs one or more data stream modification actions in a single atomic - * operation. + * Update data streams. Performs one or more data stream modification actions in + * a single atomic operation. * * @see Documentation @@ -942,8 +958,8 @@ public CompletableFuture modifyDataStream(ModifyDataSt } /** - * Performs one or more data stream modification actions in a single atomic - * operation. + * Update data streams. Performs one or more data stream modification actions in + * a single atomic operation. * * @param fn * a function that initializes a builder to create the @@ -961,7 +977,7 @@ public final CompletableFuture modifyDataStream( // ----- Endpoint: indices.put_alias /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -976,7 +992,7 @@ public CompletableFuture putAlias(PutAliasRequest request) { } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @param fn * a function that initializes a builder to create the @@ -994,7 +1010,8 @@ public final CompletableFuture putAlias( // ----- Endpoint: indices.put_data_lifecycle /** - * Update the data lifecycle of the specified data streams. + * Update data stream lifecycles. Update the data stream lifecycle of the + * specified data streams. * * @see Documentation @@ -1009,7 +1026,8 @@ public CompletableFuture putDataLifecycle(PutDataLifec } /** - * Update the data lifecycle of the specified data streams. + * Update data stream lifecycles. Update the data stream lifecycle of the + * specified data streams. * * @param fn * a function that initializes a builder to create the @@ -1062,9 +1080,10 @@ public final CompletableFuture putIndexTemplate( // ----- Endpoint: indices.put_mapping /** - * Adds new fields to an existing data stream or index. You can also use this - * API to change the search settings of existing fields. For data streams, these - * changes are applied to all backing indices by default. + * Update field mappings. Adds new fields to an existing data stream or index. + * You can also use this API to change the search settings of existing fields. + * For data streams, these changes are applied to all backing indices by + * default. * * @see Documentation @@ -1079,9 +1098,10 @@ public CompletableFuture putMapping(PutMappingRequest reques } /** - * Adds new fields to an existing data stream or index. You can also use this - * API to change the search settings of existing fields. For data streams, these - * changes are applied to all backing indices by default. + * Update field mappings. Adds new fields to an existing data stream or index. + * You can also use this API to change the search settings of existing fields. + * For data streams, these changes are applied to all backing indices by + * default. * * @param fn * a function that initializes a builder to create the @@ -1099,8 +1119,8 @@ public final CompletableFuture putMapping( // ----- Endpoint: indices.put_settings /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @see Documentation @@ -1115,8 +1135,8 @@ public CompletableFuture putSettings(PutIndicesSetti } /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @param fn * a function that initializes a builder to create the @@ -1132,8 +1152,8 @@ public final CompletableFuture putSettings( } /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @see Documentation @@ -1183,9 +1203,9 @@ public final CompletableFuture putTemplate( // ----- Endpoint: indices.refresh /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @see Documentation @@ -1200,9 +1220,9 @@ public CompletableFuture refresh(RefreshRequest request) { } /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -1218,9 +1238,9 @@ public final CompletableFuture refresh( } /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @see Documentation @@ -1270,7 +1290,8 @@ public final CompletableFuture resolveIndex( // ----- Endpoint: indices.rollover /** - * Creates a new index for a data stream or index alias. + * Roll over to a new index. Creates a new index for a data stream or index + * alias. * * @see Documentation @@ -1285,7 +1306,8 @@ public CompletableFuture rollover(RolloverRequest request) { } /** - * Creates a new index for a data stream or index alias. + * Roll over to a new index. Creates a new index for a data stream or index + * alias. * * @param fn * a function that initializes a builder to create the @@ -1388,7 +1410,7 @@ public CompletableFuture simulateTemplate() { // ----- Endpoint: indices.update_aliases /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -1403,7 +1425,7 @@ public CompletableFuture updateAliases(UpdateAliasesReque } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @param fn * a function that initializes a builder to create the @@ -1419,7 +1441,7 @@ public final CompletableFuture updateAliases( } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -1434,7 +1456,7 @@ public CompletableFuture updateAliases() { // ----- Endpoint: indices.validate_query /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @see Documentation @@ -1449,7 +1471,7 @@ public CompletableFuture validateQuery(ValidateQueryReque } /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @param fn * a function that initializes a builder to create the @@ -1465,7 +1487,7 @@ public final CompletableFuture validateQuery( } /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java index bc75ef401..f9c544a6a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java @@ -69,7 +69,8 @@ public ElasticsearchIndicesClient withTransportOptions(@Nullable TransportOption // ----- Endpoint: indices.add_block /** - * Adds a block to an index. + * Add an index block. Limits the operations allowed on an index by blocking + * specific operation types. * * @see Documentation @@ -84,7 +85,8 @@ public AddBlockResponse addBlock(AddBlockRequest request) throws IOException, El } /** - * Adds a block to an index. + * Add an index block. Limits the operations allowed on an index by blocking + * specific operation types. * * @param fn * a function that initializes a builder to create the @@ -148,7 +150,7 @@ public AnalyzeResponse analyze() throws IOException, ElasticsearchException { // ----- Endpoint: indices.create /** - * Creates a new index. + * Create an index. Creates a new index. * * @see Documentation @@ -163,7 +165,7 @@ public CreateIndexResponse create(CreateIndexRequest request) throws IOException } /** - * Creates a new index. + * Create an index. Creates a new index. * * @param fn * a function that initializes a builder to create the @@ -181,8 +183,8 @@ public final CreateIndexResponse create(FunctionDocumentation @@ -198,8 +200,8 @@ public CreateDataStreamResponse createDataStream(CreateDataStreamRequest request } /** - * Creates a data stream. You must have a matching index template with data - * stream enabled. + * Create a data stream. Creates a data stream. You must have a matching index + * template with data stream enabled. * * @param fn * a function that initializes a builder to create the @@ -218,7 +220,7 @@ public final CreateDataStreamResponse createDataStream( // ----- Endpoint: indices.data_streams_stats /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @see Documentation @@ -234,7 +236,7 @@ public DataStreamsStatsResponse dataStreamsStats(DataStreamsStatsRequest request } /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -251,7 +253,7 @@ public final DataStreamsStatsResponse dataStreamsStats( } /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @see Documentation @@ -266,7 +268,7 @@ public DataStreamsStatsResponse dataStreamsStats() throws IOException, Elasticse // ----- Endpoint: indices.delete /** - * Deletes one or more indices. + * Delete indices. Deletes one or more indices. * * @see Documentation @@ -281,7 +283,7 @@ public DeleteIndexResponse delete(DeleteIndexRequest request) throws IOException } /** - * Deletes one or more indices. + * Delete indices. Deletes one or more indices. * * @param fn * a function that initializes a builder to create the @@ -299,7 +301,7 @@ public final DeleteIndexResponse delete(FunctionDocumentation @@ -314,7 +316,7 @@ public DeleteAliasResponse deleteAlias(DeleteAliasRequest request) throws IOExce } /** - * Removes a data stream or index from an alias. + * Delete an alias. Removes a data stream or index from an alias. * * @param fn * a function that initializes a builder to create the @@ -333,8 +335,8 @@ public final DeleteAliasResponse deleteAlias( // ----- Endpoint: indices.delete_data_lifecycle /** - * Removes the data lifecycle from a data stream rendering it not managed by the - * data stream lifecycle + * Delete data stream lifecycles. Removes the data stream lifecycle from a data + * stream, rendering it not managed by the data stream lifecycle. * * @see Documentation @@ -350,8 +352,8 @@ public DeleteDataLifecycleResponse deleteDataLifecycle(DeleteDataLifecycleReques } /** - * Removes the data lifecycle from a data stream rendering it not managed by the - * data stream lifecycle + * Delete data stream lifecycles. Removes the data stream lifecycle from a data + * stream, rendering it not managed by the data stream lifecycle. * * @param fn * a function that initializes a builder to create the @@ -370,7 +372,8 @@ public final DeleteDataLifecycleResponse deleteDataLifecycle( // ----- Endpoint: indices.delete_data_stream /** - * Deletes one or more data streams and their backing indices. + * Delete data streams. Deletes one or more data streams and their backing + * indices. * * @see Documentation @@ -386,7 +389,8 @@ public DeleteDataStreamResponse deleteDataStream(DeleteDataStreamRequest request } /** - * Deletes one or more data streams and their backing indices. + * Delete data streams. Deletes one or more data streams and their backing + * indices. * * @param fn * a function that initializes a builder to create the @@ -446,7 +450,8 @@ public final DeleteIndexTemplateResponse deleteIndexTemplate( // ----- Endpoint: indices.exists /** - * Checks if a data stream, index, or alias exists. + * Check indices. Checks if one or more indices, index aliases, or data streams + * exist. * * @see Documentation @@ -461,7 +466,8 @@ public BooleanResponse exists(ExistsRequest request) throws IOException, Elastic } /** - * Checks if a data stream, index, or alias exists. + * Check indices. Checks if one or more indices, index aliases, or data streams + * exist. * * @param fn * a function that initializes a builder to create the @@ -479,7 +485,7 @@ public final BooleanResponse exists(FunctionDocumentation @@ -494,7 +500,7 @@ public BooleanResponse existsAlias(ExistsAliasRequest request) throws IOExceptio } /** - * Checks if an alias exists. + * Check aliases. Checks if one or more data stream or index aliases exist. * * @param fn * a function that initializes a builder to create the @@ -547,8 +553,10 @@ public final BooleanResponse existsIndexTemplate( // ----- Endpoint: indices.explain_data_lifecycle /** - * Retrieves information about the index's current data stream lifecycle, such - * as any potential encountered error, time since creation etc. + * Get the status for a data stream lifecycle. Retrieves information about an + * index or data stream’s current data stream lifecycle status, such as time + * since index creation, time since rollover, the lifecycle configuration + * managing the index, or any errors encountered during lifecycle execution. * * @see Documentation @@ -564,8 +572,10 @@ public ExplainDataLifecycleResponse explainDataLifecycle(ExplainDataLifecycleReq } /** - * Retrieves information about the index's current data stream lifecycle, such - * as any potential encountered error, time since creation etc. + * Get the status for a data stream lifecycle. Retrieves information about an + * index or data stream’s current data stream lifecycle status, such as time + * since index creation, time since rollover, the lifecycle configuration + * managing the index, or any errors encountered during lifecycle execution. * * @param fn * a function that initializes a builder to create the @@ -584,8 +594,8 @@ public final ExplainDataLifecycleResponse explainDataLifecycle( // ----- Endpoint: indices.get /** - * Returns information about one or more indices. For data streams, the API - * returns information about the stream’s backing indices. + * Get index information. Returns information about one or more indices. For + * data streams, the API returns information about the stream’s backing indices. * * @see Documentation @@ -600,8 +610,8 @@ public GetIndexResponse get(GetIndexRequest request) throws IOException, Elastic } /** - * Returns information about one or more indices. For data streams, the API - * returns information about the stream’s backing indices. + * Get index information. Returns information about one or more indices. For + * data streams, the API returns information about the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -619,7 +629,8 @@ public final GetIndexResponse get(FunctionDocumentation @@ -634,7 +645,8 @@ public GetAliasResponse getAlias(GetAliasRequest request) throws IOException, El } /** - * Retrieves information for one or more aliases. + * Get aliases. Retrieves information for one or more data stream or index + * aliases. * * @param fn * a function that initializes a builder to create the @@ -650,7 +662,8 @@ public final GetAliasResponse getAlias(FunctionDocumentation @@ -665,8 +678,8 @@ public GetAliasResponse getAlias() throws IOException, ElasticsearchException { // ----- Endpoint: indices.get_data_lifecycle /** - * Retrieves the data stream lifecycle configuration of one or more data - * streams. + * Get data stream lifecycles. Retrieves the data stream lifecycle configuration + * of one or more data streams. * * @see Documentation @@ -682,8 +695,8 @@ public GetDataLifecycleResponse getDataLifecycle(GetDataLifecycleRequest request } /** - * Retrieves the data stream lifecycle configuration of one or more data - * streams. + * Get data stream lifecycles. Retrieves the data stream lifecycle configuration + * of one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -702,7 +715,7 @@ public final GetDataLifecycleResponse getDataLifecycle( // ----- Endpoint: indices.get_data_stream /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @see Documentation @@ -718,7 +731,7 @@ public GetDataStreamResponse getDataStream(GetDataStreamRequest request) } /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -735,7 +748,7 @@ public final GetDataStreamResponse getDataStream( } /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @see Documentation @@ -798,8 +811,9 @@ public GetIndexTemplateResponse getIndexTemplate() throws IOException, Elasticse // ----- Endpoint: indices.get_mapping /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @see Documentation @@ -814,8 +828,9 @@ public GetMappingResponse getMapping(GetMappingRequest request) throws IOExcepti } /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @param fn * a function that initializes a builder to create the @@ -831,8 +846,9 @@ public final GetMappingResponse getMapping(FunctionDocumentation @@ -847,8 +863,8 @@ public GetMappingResponse getMapping() throws IOException, ElasticsearchExceptio // ----- Endpoint: indices.get_settings /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @see Documentation @@ -864,8 +880,8 @@ public GetIndicesSettingsResponse getSettings(GetIndicesSettingsRequest request) } /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -882,8 +898,8 @@ public final GetIndicesSettingsResponse getSettings( } /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @see Documentation @@ -898,15 +914,15 @@ public GetIndicesSettingsResponse getSettings() throws IOException, Elasticsearc // ----- Endpoint: indices.migrate_to_data_stream /** - * Converts an index alias to a data stream. You must have a matching index - * template that is data stream enabled. The alias must meet the following - * criteria: The alias must have a write index; All indices for the alias must - * have a @timestamp field mapping of a date or - * date_nanos field type; The alias must not have any filters; The - * alias must not use custom routing. If successful, the request removes the - * alias and creates a data stream with the same name. The indices for the alias - * become hidden backing indices for the stream. The write index for the alias - * becomes the write index for the stream. + * Convert an index alias to a data stream. Converts an index alias to a data + * stream. You must have a matching index template that is data stream enabled. + * The alias must meet the following criteria: The alias must have a write + * index; All indices for the alias must have a @timestamp field + * mapping of a date or date_nanos field type; The + * alias must not have any filters; The alias must not use custom routing. If + * successful, the request removes the alias and creates a data stream with the + * same name. The indices for the alias become hidden backing indices for the + * stream. The write index for the alias becomes the write index for the stream. * * @see Documentation @@ -922,15 +938,15 @@ public MigrateToDataStreamResponse migrateToDataStream(MigrateToDataStreamReques } /** - * Converts an index alias to a data stream. You must have a matching index - * template that is data stream enabled. The alias must meet the following - * criteria: The alias must have a write index; All indices for the alias must - * have a @timestamp field mapping of a date or - * date_nanos field type; The alias must not have any filters; The - * alias must not use custom routing. If successful, the request removes the - * alias and creates a data stream with the same name. The indices for the alias - * become hidden backing indices for the stream. The write index for the alias - * becomes the write index for the stream. + * Convert an index alias to a data stream. Converts an index alias to a data + * stream. You must have a matching index template that is data stream enabled. + * The alias must meet the following criteria: The alias must have a write + * index; All indices for the alias must have a @timestamp field + * mapping of a date or date_nanos field type; The + * alias must not have any filters; The alias must not use custom routing. If + * successful, the request removes the alias and creates a data stream with the + * same name. The indices for the alias become hidden backing indices for the + * stream. The write index for the alias becomes the write index for the stream. * * @param fn * a function that initializes a builder to create the @@ -949,8 +965,8 @@ public final MigrateToDataStreamResponse migrateToDataStream( // ----- Endpoint: indices.modify_data_stream /** - * Performs one or more data stream modification actions in a single atomic - * operation. + * Update data streams. Performs one or more data stream modification actions in + * a single atomic operation. * * @see Documentation @@ -966,8 +982,8 @@ public ModifyDataStreamResponse modifyDataStream(ModifyDataStreamRequest request } /** - * Performs one or more data stream modification actions in a single atomic - * operation. + * Update data streams. Performs one or more data stream modification actions in + * a single atomic operation. * * @param fn * a function that initializes a builder to create the @@ -986,7 +1002,7 @@ public final ModifyDataStreamResponse modifyDataStream( // ----- Endpoint: indices.put_alias /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -1001,7 +1017,7 @@ public PutAliasResponse putAlias(PutAliasRequest request) throws IOException, El } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @param fn * a function that initializes a builder to create the @@ -1019,7 +1035,8 @@ public final PutAliasResponse putAlias(FunctionDocumentation @@ -1035,7 +1052,8 @@ public PutDataLifecycleResponse putDataLifecycle(PutDataLifecycleRequest request } /** - * Update the data lifecycle of the specified data streams. + * Update data stream lifecycles. Update the data stream lifecycle of the + * specified data streams. * * @param fn * a function that initializes a builder to create the @@ -1091,9 +1109,10 @@ public final PutIndexTemplateResponse putIndexTemplate( // ----- Endpoint: indices.put_mapping /** - * Adds new fields to an existing data stream or index. You can also use this - * API to change the search settings of existing fields. For data streams, these - * changes are applied to all backing indices by default. + * Update field mappings. Adds new fields to an existing data stream or index. + * You can also use this API to change the search settings of existing fields. + * For data streams, these changes are applied to all backing indices by + * default. * * @see Documentation @@ -1108,9 +1127,10 @@ public PutMappingResponse putMapping(PutMappingRequest request) throws IOExcepti } /** - * Adds new fields to an existing data stream or index. You can also use this - * API to change the search settings of existing fields. For data streams, these - * changes are applied to all backing indices by default. + * Update field mappings. Adds new fields to an existing data stream or index. + * You can also use this API to change the search settings of existing fields. + * For data streams, these changes are applied to all backing indices by + * default. * * @param fn * a function that initializes a builder to create the @@ -1128,8 +1148,8 @@ public final PutMappingResponse putMapping(FunctionDocumentation @@ -1145,8 +1165,8 @@ public PutIndicesSettingsResponse putSettings(PutIndicesSettingsRequest request) } /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @param fn * a function that initializes a builder to create the @@ -1163,8 +1183,8 @@ public final PutIndicesSettingsResponse putSettings( } /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @see Documentation @@ -1215,9 +1235,9 @@ public final PutTemplateResponse putTemplate( // ----- Endpoint: indices.refresh /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @see Documentation @@ -1232,9 +1252,9 @@ public RefreshResponse refresh(RefreshRequest request) throws IOException, Elast } /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -1250,9 +1270,9 @@ public final RefreshResponse refresh(FunctionDocumentation @@ -1303,7 +1323,8 @@ public final ResolveIndexResponse resolveIndex( // ----- Endpoint: indices.rollover /** - * Creates a new index for a data stream or index alias. + * Roll over to a new index. Creates a new index for a data stream or index + * alias. * * @see Documentation @@ -1318,7 +1339,8 @@ public RolloverResponse rollover(RolloverRequest request) throws IOException, El } /** - * Creates a new index for a data stream or index alias. + * Roll over to a new index. Creates a new index for a data stream or index + * alias. * * @param fn * a function that initializes a builder to create the @@ -1424,7 +1446,7 @@ public SimulateTemplateResponse simulateTemplate() throws IOException, Elasticse // ----- Endpoint: indices.update_aliases /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -1440,7 +1462,7 @@ public UpdateAliasesResponse updateAliases(UpdateAliasesRequest request) } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @param fn * a function that initializes a builder to create the @@ -1457,7 +1479,7 @@ public final UpdateAliasesResponse updateAliases( } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -1472,7 +1494,7 @@ public UpdateAliasesResponse updateAliases() throws IOException, ElasticsearchEx // ----- Endpoint: indices.validate_query /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @see Documentation @@ -1488,7 +1510,7 @@ public ValidateQueryResponse validateQuery(ValidateQueryRequest request) } /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @param fn * a function that initializes a builder to create the @@ -1505,7 +1527,7 @@ public final ValidateQueryResponse validateQuery( } /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java index 63a5accac..b86cd677b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java @@ -61,7 +61,7 @@ // typedef: indices.exists_alias.Request /** - * Checks if an alias exists. + * Check aliases. Checks if one or more data stream or index aliases exist. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java index 351959e8c..1e11e63ea 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java @@ -61,7 +61,8 @@ // typedef: indices.exists.Request /** - * Checks if a data stream, index, or alias exists. + * Check indices. Checks if one or more indices, index aliases, or data streams + * exist. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java index 0de719315..1af1f6e3d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java @@ -59,8 +59,10 @@ // typedef: indices.explain_data_lifecycle.Request /** - * Retrieves information about the index's current data stream lifecycle, such - * as any potential encountered error, time since creation etc. + * Get the status for a data stream lifecycle. Retrieves information about an + * index or data stream’s current data stream lifecycle status, such as time + * since index creation, time since rollover, the lifecycle configuration + * managing the index, or any errors encountered during lifecycle execution. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/FailureStore.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/FailureStore.java new file mode 100644 index 000000000..c43ae6b1c --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/FailureStore.java @@ -0,0 +1,230 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.indices; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: indices._types.FailureStore + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FailureStore implements JsonpSerializable { + private final boolean enabled; + + private final List indices; + + private final boolean rolloverOnWrite; + + // --------------------------------------------------------------------------------------------- + + private FailureStore(Builder builder) { + + this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled"); + this.indices = ApiTypeHelper.unmodifiableRequired(builder.indices, this, "indices"); + this.rolloverOnWrite = ApiTypeHelper.requireNonNull(builder.rolloverOnWrite, this, "rolloverOnWrite"); + + } + + public static FailureStore of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code enabled} + */ + public final boolean enabled() { + return this.enabled; + } + + /** + * Required - API name: {@code indices} + */ + public final List indices() { + return this.indices; + } + + /** + * Required - API name: {@code rollover_on_write} + */ + public final boolean rolloverOnWrite() { + return this.rolloverOnWrite; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("enabled"); + generator.write(this.enabled); + + if (ApiTypeHelper.isDefined(this.indices)) { + generator.writeKey("indices"); + generator.writeStartArray(); + for (DataStreamIndex item0 : this.indices) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("rollover_on_write"); + generator.write(this.rolloverOnWrite); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FailureStore}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Boolean enabled; + + private List indices; + + private Boolean rolloverOnWrite; + + /** + * Required - API name: {@code enabled} + */ + public final Builder enabled(boolean value) { + this.enabled = value; + return this; + } + + /** + * Required - API name: {@code indices} + *

+ * Adds all elements of list to indices. + */ + public final Builder indices(List list) { + this.indices = _listAddAll(this.indices, list); + return this; + } + + /** + * Required - API name: {@code indices} + *

+ * Adds one or more values to indices. + */ + public final Builder indices(DataStreamIndex value, DataStreamIndex... values) { + this.indices = _listAdd(this.indices, value, values); + return this; + } + + /** + * Required - API name: {@code indices} + *

+ * Adds a value to indices using a builder lambda. + */ + public final Builder indices(Function> fn) { + return indices(fn.apply(new DataStreamIndex.Builder()).build()); + } + + /** + * Required - API name: {@code rollover_on_write} + */ + public final Builder rolloverOnWrite(boolean value) { + this.rolloverOnWrite = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FailureStore}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FailureStore build() { + _checkSingleUse(); + + return new FailureStore(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FailureStore} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FailureStore::setupFailureStoreDeserializer); + + protected static void setupFailureStoreDeserializer(ObjectDeserializer op) { + + op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); + op.add(Builder::indices, JsonpDeserializer.arrayDeserializer(DataStreamIndex._DESERIALIZER), "indices"); + op.add(Builder::rolloverOnWrite, JsonpDeserializer.booleanDeserializer(), "rollover_on_write"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java index 6a93c4c30..1c2195539 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java @@ -59,7 +59,8 @@ // typedef: indices.get_alias.Request /** - * Retrieves information for one or more aliases. + * Get aliases. Retrieves information for one or more data stream or index + * aliases. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java index 1c05dd329..7ae7c3df5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java @@ -22,6 +22,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.ExpandWildcard; import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -59,8 +60,8 @@ // typedef: indices.get_data_lifecycle.Request /** - * Retrieves the data stream lifecycle configuration of one or more data - * streams. + * Get data stream lifecycles. Retrieves the data stream lifecycle configuration + * of one or more data streams. * * @see API @@ -73,6 +74,9 @@ public class GetDataLifecycleRequest extends RequestBase { @Nullable private final Boolean includeDefaults; + @Nullable + private final Time masterTimeout; + private final List name; // --------------------------------------------------------------------------------------------- @@ -81,6 +85,7 @@ private GetDataLifecycleRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.includeDefaults = builder.includeDefaults; + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.unmodifiableRequired(builder.name, this, "name"); } @@ -111,6 +116,17 @@ public final Boolean includeDefaults() { return this.includeDefaults; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - Comma-separated list of data streams to limit the request. * Supports wildcards (*). To target all data streams, omit this @@ -137,6 +153,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private Boolean includeDefaults; + @Nullable + private Time masterTimeout; + private List name; /** @@ -179,6 +198,27 @@ public final Builder includeDefaults(@Nullable Boolean value) { return this; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - Comma-separated list of data streams to limit the request. * Supports wildcards (*). To target all data streams, omit this @@ -277,6 +317,9 @@ public GetDataLifecycleRequest build() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } if (ApiTypeHelper.isDefined(request.expandWildcards)) { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java index ebf90196a..18fb316d6 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java @@ -22,6 +22,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.ExpandWildcard; import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -59,7 +60,7 @@ // typedef: indices.get_data_stream.Request /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @see API * specification @@ -71,15 +72,23 @@ public class GetDataStreamRequest extends RequestBase { @Nullable private final Boolean includeDefaults; + @Nullable + private final Time masterTimeout; + private final List name; + @Nullable + private final Boolean verbose; + // --------------------------------------------------------------------------------------------- private GetDataStreamRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.includeDefaults = builder.includeDefaults; + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.unmodifiable(builder.name); + this.verbose = builder.verbose; } @@ -107,6 +116,17 @@ public final Boolean includeDefaults() { return this.includeDefaults; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Comma-separated list of data stream names used to limit the request. Wildcard * (*) expressions are supported. If omitted, all data streams are @@ -118,6 +138,17 @@ public final List name() { return this.name; } + /** + * Whether the maximum timestamp for each data stream should be calculated and + * returned. + *

+ * API name: {@code verbose} + */ + @Nullable + public final Boolean verbose() { + return this.verbose; + } + // --------------------------------------------------------------------------------------------- /** @@ -133,9 +164,15 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private Boolean includeDefaults; + @Nullable + private Time masterTimeout; + @Nullable private List name; + @Nullable + private Boolean verbose; + /** * Type of data stream that wildcard patterns can match. Supports * comma-separated values, such as open,hidden. @@ -172,6 +209,27 @@ public final Builder includeDefaults(@Nullable Boolean value) { return this; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Comma-separated list of data stream names used to limit the request. Wildcard * (*) expressions are supported. If omitted, all data streams are @@ -200,6 +258,17 @@ public final Builder name(String value, String... values) { return this; } + /** + * Whether the maximum timestamp for each data stream should be calculated and + * returned. + *

+ * API name: {@code verbose} + */ + public final Builder verbose(@Nullable Boolean value) { + this.verbose = value; + return this; + } + @Override protected Builder self() { return this; @@ -278,6 +347,9 @@ public GetDataStreamRequest build() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } if (ApiTypeHelper.isDefined(request.expandWildcards)) { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); @@ -285,6 +357,9 @@ public GetDataStreamRequest build() { if (request.includeDefaults != null) { params.put("include_defaults", String.valueOf(request.includeDefaults)); } + if (request.verbose != null) { + params.put("verbose", String.valueOf(request.verbose)); + } return params; }, SimpleEndpoint.emptyMap(), false, GetDataStreamResponse._DESERIALIZER); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java index 8cafaeecb..f25673cc9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java @@ -61,8 +61,8 @@ // typedef: indices.get.Request /** - * Returns information about one or more indices. For data streams, the API - * returns information about the stream’s backing indices. + * Get index information. Returns information about one or more indices. For + * data streams, the API returns information about the stream’s backing indices. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java index 3272fe22a..b24881456 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java @@ -60,8 +60,8 @@ // typedef: indices.get_settings.Request /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java index 26f6866f8..ea3bf519a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java @@ -60,8 +60,9 @@ // typedef: indices.get_mapping.Request /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java index 360b03380..b787c554a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java @@ -138,7 +138,7 @@ public final String dataStream() { } /** - * Data lifecycle applicable if this is a data stream. + * Data stream lifecycle applicable if this is a data stream. *

* API name: {@code lifecycle} */ @@ -316,7 +316,7 @@ public final Builder dataStream(@Nullable String value) { } /** - * Data lifecycle applicable if this is a data stream. + * Data stream lifecycle applicable if this is a data stream. *

* API name: {@code lifecycle} */ @@ -326,7 +326,7 @@ public final Builder lifecycle(@Nullable DataStreamLifecycle value) { } /** - * Data lifecycle applicable if this is a data stream. + * Data stream lifecycle applicable if this is a data stream. *

* API name: {@code lifecycle} */ diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java index 989103136..6ad2f1b32 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java @@ -21,6 +21,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -31,7 +32,6 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.String; -import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -56,15 +56,15 @@ // typedef: indices.migrate_to_data_stream.Request /** - * Converts an index alias to a data stream. You must have a matching index - * template that is data stream enabled. The alias must meet the following - * criteria: The alias must have a write index; All indices for the alias must - * have a @timestamp field mapping of a date or - * date_nanos field type; The alias must not have any filters; The - * alias must not use custom routing. If successful, the request removes the - * alias and creates a data stream with the same name. The indices for the alias - * become hidden backing indices for the stream. The write index for the alias - * becomes the write index for the stream. + * Convert an index alias to a data stream. Converts an index alias to a data + * stream. You must have a matching index template that is data stream enabled. + * The alias must meet the following criteria: The alias must have a write + * index; All indices for the alias must have a @timestamp field + * mapping of a date or date_nanos field type; The + * alias must not have any filters; The alias must not use custom routing. If + * successful, the request removes the alias and creates a data stream with the + * same name. The indices for the alias become hidden backing indices for the + * stream. The write index for the alias becomes the write index for the stream. * * @see API @@ -72,13 +72,21 @@ */ public class MigrateToDataStreamRequest extends RequestBase { + @Nullable + private final Time masterTimeout; + private final String name; + @Nullable + private final Time timeout; + // --------------------------------------------------------------------------------------------- private MigrateToDataStreamRequest(Builder builder) { + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.timeout = builder.timeout; } @@ -86,6 +94,17 @@ public static MigrateToDataStreamRequest of(Function + * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - Name of the index alias to convert to a data stream. *

@@ -95,6 +114,17 @@ public final String name() { return this.name; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + @Nullable + public final Time timeout() { + return this.timeout; + } + // --------------------------------------------------------------------------------------------- /** @@ -104,8 +134,35 @@ public final String name() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Time masterTimeout; + private String name; + @Nullable + private Time timeout; + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - Name of the index alias to convert to a data stream. *

@@ -116,6 +173,27 @@ public final Builder name(String value) { return this; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(@Nullable Time value) { + this.timeout = value; + return this; + } + + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(Function> fn) { + return this.timeout(fn.apply(new Time.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -185,7 +263,14 @@ public MigrateToDataStreamRequest build() { // Request parameters request -> { - return Collections.emptyMap(); + Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } + if (request.timeout != null) { + params.put("timeout", request.timeout._toJsonString()); + } + return params; }, SimpleEndpoint.emptyMap(), false, MigrateToDataStreamResponse._DESERIALIZER); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java index 211ff2c86..92b887ae5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java @@ -57,8 +57,8 @@ // typedef: indices.modify_data_stream.Request /** - * Performs one or more data stream modification actions in a single atomic - * operation. + * Update data streams. Performs one or more data stream modification actions in + * a single atomic operation. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java index d278fed41..75f743d04 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java @@ -62,7 +62,7 @@ // typedef: indices.put_alias.Request /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java index cb2b6c1d1..00ad95dc1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java @@ -61,7 +61,8 @@ // typedef: indices.put_data_lifecycle.Request /** - * Update the data lifecycle of the specified data streams. + * Update data stream lifecycles. Update the data stream lifecycle of the + * specified data streams. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java index aaecb4b99..860a3a0ff 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java @@ -63,8 +63,8 @@ // typedef: indices.put_settings.Request /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java index b9e0415d5..f818dc02d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java @@ -70,9 +70,10 @@ // typedef: indices.put_mapping.Request /** - * Adds new fields to an existing data stream or index. You can also use this - * API to change the search settings of existing fields. For data streams, these - * changes are applied to all backing indices by default. + * Update field mappings. Adds new fields to an existing data stream or index. + * You can also use this API to change the search settings of existing fields. + * For data streams, these changes are applied to all backing indices by + * default. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java index 9fa83be14..218b5a1c4 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java @@ -59,9 +59,9 @@ // typedef: indices.refresh.Request /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java index 3ce0ffc59..1e6af297b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java @@ -31,6 +31,7 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.String; import java.util.HashMap; import java.util.List; @@ -66,15 +67,23 @@ */ public class ResolveIndexRequest extends RequestBase { + @Nullable + private final Boolean allowNoIndices; + private final List expandWildcards; + @Nullable + private final Boolean ignoreUnavailable; + private final List name; // --------------------------------------------------------------------------------------------- private ResolveIndexRequest(Builder builder) { + this.allowNoIndices = builder.allowNoIndices; this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); + this.ignoreUnavailable = builder.ignoreUnavailable; this.name = ApiTypeHelper.unmodifiableRequired(builder.name, this, "name"); } @@ -83,6 +92,21 @@ public static ResolveIndexRequest of(Functionfalse, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. + *

+ * API name: {@code allow_no_indices} + */ + @Nullable + public final Boolean allowNoIndices() { + return this.allowNoIndices; + } + /** * Type of index that wildcard patterns can match. If the request can target * data streams, this argument determines whether wildcard expressions match @@ -97,6 +121,17 @@ public final List expandWildcards() { return this.expandWildcards; } + /** + * If false, the request returns an error if it targets a missing + * or closed index. + *

+ * API name: {@code ignore_unavailable} + */ + @Nullable + public final Boolean ignoreUnavailable() { + return this.ignoreUnavailable; + } + /** * Required - Comma-separated name(s) or index pattern(s) of the indices, * aliases, and data streams to resolve. Resources on remote clusters can be @@ -118,11 +153,32 @@ public final List name() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean allowNoIndices; + @Nullable private List expandWildcards; + @Nullable + private Boolean ignoreUnavailable; + private List name; + /** + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. + *

+ * API name: {@code allow_no_indices} + */ + public final Builder allowNoIndices(@Nullable Boolean value) { + this.allowNoIndices = value; + return this; + } + /** * Type of index that wildcard patterns can match. If the request can target * data streams, this argument determines whether wildcard expressions match @@ -157,6 +213,17 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val return this; } + /** + * If false, the request returns an error if it targets a missing + * or closed index. + *

+ * API name: {@code ignore_unavailable} + */ + public final Builder ignoreUnavailable(@Nullable Boolean value) { + this.ignoreUnavailable = value; + return this; + } + /** * Required - Comma-separated name(s) or index pattern(s) of the indices, * aliases, and data streams to resolve. Resources on remote clusters can be @@ -261,6 +328,12 @@ public ResolveIndexRequest build() { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); } + if (request.ignoreUnavailable != null) { + params.put("ignore_unavailable", String.valueOf(request.ignoreUnavailable)); + } + if (request.allowNoIndices != null) { + params.put("allow_no_indices", String.valueOf(request.allowNoIndices)); + } return params; }, SimpleEndpoint.emptyMap(), false, ResolveIndexResponse._DESERIALIZER); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java index 8d0c14bdc..6c6fb15d4 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java @@ -63,7 +63,8 @@ // typedef: indices.rollover.Request /** - * Creates a new index for a data stream or index alias. + * Roll over to a new index. Creates a new index for a data stream or index + * alias. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java index 4ec3536d5..8c5b888d7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java @@ -60,7 +60,7 @@ // typedef: indices.update_aliases.Request /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java index f6e932181..0d2ae4412 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java @@ -63,7 +63,7 @@ // typedef: indices.validate_query.Request /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/DotExpanderProcessor.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/DotExpanderProcessor.java index 8768dba42..05ba4dcef 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/DotExpanderProcessor.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/DotExpanderProcessor.java @@ -27,6 +27,7 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.String; import java.util.Objects; import java.util.function.Function; @@ -59,6 +60,9 @@ public class DotExpanderProcessor extends ProcessorBase implements ProcessorVariant { private final String field; + @Nullable + private final Boolean override; + @Nullable private final String path; @@ -68,6 +72,7 @@ private DotExpanderProcessor(Builder builder) { super(builder); this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.override = builder.override; this.path = builder.path; } @@ -94,6 +99,20 @@ public final String field() { return this.field; } + /** + * Controls the behavior when there is already an existing nested object that + * conflicts with the expanded field. When false, the processor + * will merge conflicts by combining the old and the new values into an array. + * When true, the value from the expanded field will overwrite the + * existing value. + *

+ * API name: {@code override} + */ + @Nullable + public final Boolean override() { + return this.override; + } + /** * The field that contains the field to expand. Only required if the field to * expand is part another object field, because the field option @@ -112,6 +131,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("field"); generator.write(this.field); + if (this.override != null) { + generator.writeKey("override"); + generator.write(this.override); + + } if (this.path != null) { generator.writeKey("path"); generator.write(this.path); @@ -131,6 +155,9 @@ public static class Builder extends ProcessorBase.AbstractBuilder ObjectBuilder { private String field; + @Nullable + private Boolean override; + @Nullable private String path; @@ -145,6 +172,20 @@ public final Builder field(String value) { return this; } + /** + * Controls the behavior when there is already an existing nested object that + * conflicts with the expanded field. When false, the processor + * will merge conflicts by combining the old and the new values into an array. + * When true, the value from the expanded field will overwrite the + * existing value. + *

+ * API name: {@code override} + */ + public final Builder override(@Nullable Boolean value) { + this.override = value; + return this; + } + /** * The field that contains the field to expand. Only required if the field to * expand is part another object field, because the field option @@ -186,6 +227,7 @@ public DotExpanderProcessor build() { protected static void setupDotExpanderProcessorDeserializer(ObjectDeserializer op) { ProcessorBase.setupProcessorBaseDeserializer(op); op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + op.add(Builder::override, JsonpDeserializer.booleanDeserializer(), "override"); op.add(Builder::path, JsonpDeserializer.stringDeserializer(), "path"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java index a5aeaa8e7..4aa683ffe 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java @@ -232,17 +232,4 @@ public final CompletableFuture simulate( return simulate(fn.apply(new SimulateRequest.Builder()).build()); } - /** - * Executes an ingest pipeline against a set of provided documents. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture simulate() { - return this.transport.performRequestAsync(new SimulateRequest.Builder().build(), SimulateRequest._ENDPOINT, - this.transportOptions); - } - } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java index b18f9d55f..b11034562 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java @@ -236,17 +236,4 @@ public final SimulateResponse simulate(FunctionDocumentation - * on elastic.co - */ - - public SimulateResponse simulate() throws IOException, ElasticsearchException { - return this.transport.performRequest(new SimulateRequest.Builder().build(), SimulateRequest._ENDPOINT, - this.transportOptions); - } - } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoGridProcessor.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoGridProcessor.java new file mode 100644 index 000000000..594eb2339 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoGridProcessor.java @@ -0,0 +1,421 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.ingest; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: ingest._types.GeoGridProcessor + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GeoGridProcessor extends ProcessorBase implements ProcessorVariant { + private final String field; + + private final GeoGridTileType tileType; + + @Nullable + private final String targetField; + + @Nullable + private final String parentField; + + @Nullable + private final String childrenField; + + @Nullable + private final String nonChildrenField; + + @Nullable + private final String precisionField; + + @Nullable + private final Boolean ignoreMissing; + + @Nullable + private final GeoGridTargetFormat targetFormat; + + // --------------------------------------------------------------------------------------------- + + private GeoGridProcessor(Builder builder) { + super(builder); + + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.tileType = ApiTypeHelper.requireNonNull(builder.tileType, this, "tileType"); + this.targetField = builder.targetField; + this.parentField = builder.parentField; + this.childrenField = builder.childrenField; + this.nonChildrenField = builder.nonChildrenField; + this.precisionField = builder.precisionField; + this.ignoreMissing = builder.ignoreMissing; + this.targetFormat = builder.targetFormat; + + } + + public static GeoGridProcessor of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Processor variant kind. + */ + @Override + public Processor.Kind _processorKind() { + return Processor.Kind.GeoGrid; + } + + /** + * Required - The field to interpret as a geo-tile.= The field format is + * determined by the tile_type. + *

+ * API name: {@code field} + */ + public final String field() { + return this.field; + } + + /** + * Required - Three tile formats are understood: geohash, geotile and geohex. + *

+ * API name: {@code tile_type} + */ + public final GeoGridTileType tileType() { + return this.tileType; + } + + /** + * The field to assign the polygon shape to, by default, the field + * is updated in-place. + *

+ * API name: {@code target_field} + */ + @Nullable + public final String targetField() { + return this.targetField; + } + + /** + * If specified and a parent tile exists, save that tile address to this field. + *

+ * API name: {@code parent_field} + */ + @Nullable + public final String parentField() { + return this.parentField; + } + + /** + * If specified and children tiles exist, save those tile addresses to this + * field as an array of strings. + *

+ * API name: {@code children_field} + */ + @Nullable + public final String childrenField() { + return this.childrenField; + } + + /** + * If specified and intersecting non-child tiles exist, save their addresses to + * this field as an array of strings. + *

+ * API name: {@code non_children_field} + */ + @Nullable + public final String nonChildrenField() { + return this.nonChildrenField; + } + + /** + * If specified, save the tile precision (zoom) as an integer to this field. + *

+ * API name: {@code precision_field} + */ + @Nullable + public final String precisionField() { + return this.precisionField; + } + + /** + * If true and field does not exist, the processor + * quietly exits without modifying the document. + *

+ * API name: {@code ignore_missing} + */ + @Nullable + public final Boolean ignoreMissing() { + return this.ignoreMissing; + } + + /** + * Which format to save the generated polygon in. + *

+ * API name: {@code target_format} + */ + @Nullable + public final GeoGridTargetFormat targetFormat() { + return this.targetFormat; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + generator.writeKey("field"); + generator.write(this.field); + + generator.writeKey("tile_type"); + this.tileType.serialize(generator, mapper); + if (this.targetField != null) { + generator.writeKey("target_field"); + generator.write(this.targetField); + + } + if (this.parentField != null) { + generator.writeKey("parent_field"); + generator.write(this.parentField); + + } + if (this.childrenField != null) { + generator.writeKey("children_field"); + generator.write(this.childrenField); + + } + if (this.nonChildrenField != null) { + generator.writeKey("non_children_field"); + generator.write(this.nonChildrenField); + + } + if (this.precisionField != null) { + generator.writeKey("precision_field"); + generator.write(this.precisionField); + + } + if (this.ignoreMissing != null) { + generator.writeKey("ignore_missing"); + generator.write(this.ignoreMissing); + + } + if (this.targetFormat != null) { + generator.writeKey("target_format"); + this.targetFormat.serialize(generator, mapper); + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GeoGridProcessor}. + */ + + public static class Builder extends ProcessorBase.AbstractBuilder + implements + ObjectBuilder { + private String field; + + private GeoGridTileType tileType; + + @Nullable + private String targetField; + + @Nullable + private String parentField; + + @Nullable + private String childrenField; + + @Nullable + private String nonChildrenField; + + @Nullable + private String precisionField; + + @Nullable + private Boolean ignoreMissing; + + @Nullable + private GeoGridTargetFormat targetFormat; + + /** + * Required - The field to interpret as a geo-tile.= The field format is + * determined by the tile_type. + *

+ * API name: {@code field} + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + /** + * Required - Three tile formats are understood: geohash, geotile and geohex. + *

+ * API name: {@code tile_type} + */ + public final Builder tileType(GeoGridTileType value) { + this.tileType = value; + return this; + } + + /** + * The field to assign the polygon shape to, by default, the field + * is updated in-place. + *

+ * API name: {@code target_field} + */ + public final Builder targetField(@Nullable String value) { + this.targetField = value; + return this; + } + + /** + * If specified and a parent tile exists, save that tile address to this field. + *

+ * API name: {@code parent_field} + */ + public final Builder parentField(@Nullable String value) { + this.parentField = value; + return this; + } + + /** + * If specified and children tiles exist, save those tile addresses to this + * field as an array of strings. + *

+ * API name: {@code children_field} + */ + public final Builder childrenField(@Nullable String value) { + this.childrenField = value; + return this; + } + + /** + * If specified and intersecting non-child tiles exist, save their addresses to + * this field as an array of strings. + *

+ * API name: {@code non_children_field} + */ + public final Builder nonChildrenField(@Nullable String value) { + this.nonChildrenField = value; + return this; + } + + /** + * If specified, save the tile precision (zoom) as an integer to this field. + *

+ * API name: {@code precision_field} + */ + public final Builder precisionField(@Nullable String value) { + this.precisionField = value; + return this; + } + + /** + * If true and field does not exist, the processor + * quietly exits without modifying the document. + *

+ * API name: {@code ignore_missing} + */ + public final Builder ignoreMissing(@Nullable Boolean value) { + this.ignoreMissing = value; + return this; + } + + /** + * Which format to save the generated polygon in. + *

+ * API name: {@code target_format} + */ + public final Builder targetFormat(@Nullable GeoGridTargetFormat value) { + this.targetFormat = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GeoGridProcessor}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GeoGridProcessor build() { + _checkSingleUse(); + + return new GeoGridProcessor(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GeoGridProcessor} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + GeoGridProcessor::setupGeoGridProcessorDeserializer); + + protected static void setupGeoGridProcessorDeserializer(ObjectDeserializer op) { + ProcessorBase.setupProcessorBaseDeserializer(op); + op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + op.add(Builder::tileType, GeoGridTileType._DESERIALIZER, "tile_type"); + op.add(Builder::targetField, JsonpDeserializer.stringDeserializer(), "target_field"); + op.add(Builder::parentField, JsonpDeserializer.stringDeserializer(), "parent_field"); + op.add(Builder::childrenField, JsonpDeserializer.stringDeserializer(), "children_field"); + op.add(Builder::nonChildrenField, JsonpDeserializer.stringDeserializer(), "non_children_field"); + op.add(Builder::precisionField, JsonpDeserializer.stringDeserializer(), "precision_field"); + op.add(Builder::ignoreMissing, JsonpDeserializer.booleanDeserializer(), "ignore_missing"); + op.add(Builder::targetFormat, GeoGridTargetFormat._DESERIALIZER, "target_format"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoGridTargetFormat.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoGridTargetFormat.java new file mode 100644 index 000000000..1ef6b3825 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoGridTargetFormat.java @@ -0,0 +1,67 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.ingest; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum GeoGridTargetFormat implements JsonEnum { + Geojson("geojson"), + + Wkt("wkt"), + + ; + + private final String jsonValue; + + GeoGridTargetFormat(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + GeoGridTargetFormat.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoGridTileType.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoGridTileType.java new file mode 100644 index 000000000..3bbc52e7f --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoGridTileType.java @@ -0,0 +1,68 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.ingest; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum GeoGridTileType implements JsonEnum { + Geotile("geotile"), + + Geohex("geohex"), + + Geohash("geohash"), + + ; + + private final String jsonValue; + + GeoGridTileType(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + GeoGridTileType.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpProcessor.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpProcessor.java index 3051a3ca6..13a0134f9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpProcessor.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpProcessor.java @@ -74,6 +74,9 @@ public class GeoIpProcessor extends ProcessorBase implements ProcessorVariant { @Nullable private final String targetField; + @Nullable + private final Boolean downloadDatabaseOnPipelineCreation; + // --------------------------------------------------------------------------------------------- private GeoIpProcessor(Builder builder) { @@ -85,6 +88,7 @@ private GeoIpProcessor(Builder builder) { this.ignoreMissing = builder.ignoreMissing; this.properties = ApiTypeHelper.unmodifiable(builder.properties); this.targetField = builder.targetField; + this.downloadDatabaseOnPipelineCreation = builder.downloadDatabaseOnPipelineCreation; } @@ -164,6 +168,20 @@ public final String targetField() { return this.targetField; } + /** + * If true (and if + * ingest.geoip.downloader.eager.download is false), + * the missing database is downloaded when the pipeline is created. Else, the + * download is triggered by when the pipeline is used as the + * default_pipeline or final_pipeline in an index. + *

+ * API name: {@code download_database_on_pipeline_creation} + */ + @Nullable + public final Boolean downloadDatabaseOnPipelineCreation() { + return this.downloadDatabaseOnPipelineCreation; + } + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { super.serializeInternal(generator, mapper); @@ -200,6 +218,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.targetField); } + if (this.downloadDatabaseOnPipelineCreation != null) { + generator.writeKey("download_database_on_pipeline_creation"); + generator.write(this.downloadDatabaseOnPipelineCreation); + + } } @@ -229,6 +252,9 @@ public static class Builder extends ProcessorBase.AbstractBuilder @Nullable private String targetField; + @Nullable + private Boolean downloadDatabaseOnPipelineCreation; + /** * The database filename referring to a database the module ships with * (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom @@ -310,6 +336,20 @@ public final Builder targetField(@Nullable String value) { return this; } + /** + * If true (and if + * ingest.geoip.downloader.eager.download is false), + * the missing database is downloaded when the pipeline is created. Else, the + * download is triggered by when the pipeline is used as the + * default_pipeline or final_pipeline in an index. + *

+ * API name: {@code download_database_on_pipeline_creation} + */ + public final Builder downloadDatabaseOnPipelineCreation(@Nullable Boolean value) { + this.downloadDatabaseOnPipelineCreation = value; + return this; + } + @Override protected Builder self() { return this; @@ -345,6 +385,8 @@ protected static void setupGeoIpProcessorDeserializer(ObjectDeserializerAPI + * specification + */ +@JsonpDeserializable +public class HtmlStripProcessor extends ProcessorBase implements ProcessorVariant { + private final String field; + + @Nullable + private final Boolean ignoreMissing; + + @Nullable + private final String targetField; + + // --------------------------------------------------------------------------------------------- + + private HtmlStripProcessor(Builder builder) { + super(builder); + + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.ignoreMissing = builder.ignoreMissing; + this.targetField = builder.targetField; + + } + + public static HtmlStripProcessor of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Processor variant kind. + */ + @Override + public Processor.Kind _processorKind() { + return Processor.Kind.HtmlStrip; + } + + /** + * Required - The string-valued field to remove HTML tags from. + *

+ * API name: {@code field} + */ + public final String field() { + return this.field; + } + + /** + * If true and field does not exist or is + * null, the processor quietly exits without modifying the + * document, + *

+ * API name: {@code ignore_missing} + */ + @Nullable + public final Boolean ignoreMissing() { + return this.ignoreMissing; + } + + /** + * The field to assign the converted value to By default, the field + * is updated in-place. + *

+ * API name: {@code target_field} + */ + @Nullable + public final String targetField() { + return this.targetField; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + generator.writeKey("field"); + generator.write(this.field); + + if (this.ignoreMissing != null) { + generator.writeKey("ignore_missing"); + generator.write(this.ignoreMissing); + + } + if (this.targetField != null) { + generator.writeKey("target_field"); + generator.write(this.targetField); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link HtmlStripProcessor}. + */ + + public static class Builder extends ProcessorBase.AbstractBuilder + implements + ObjectBuilder { + private String field; + + @Nullable + private Boolean ignoreMissing; + + @Nullable + private String targetField; + + /** + * Required - The string-valued field to remove HTML tags from. + *

+ * API name: {@code field} + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + /** + * If true and field does not exist or is + * null, the processor quietly exits without modifying the + * document, + *

+ * API name: {@code ignore_missing} + */ + public final Builder ignoreMissing(@Nullable Boolean value) { + this.ignoreMissing = value; + return this; + } + + /** + * The field to assign the converted value to By default, the field + * is updated in-place. + *

+ * API name: {@code target_field} + */ + public final Builder targetField(@Nullable String value) { + this.targetField = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link HtmlStripProcessor}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public HtmlStripProcessor build() { + _checkSingleUse(); + + return new HtmlStripProcessor(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link HtmlStripProcessor} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, HtmlStripProcessor::setupHtmlStripProcessorDeserializer); + + protected static void setupHtmlStripProcessorDeserializer(ObjectDeserializer op) { + ProcessorBase.setupProcessorBaseDeserializer(op); + op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + op.add(Builder::ignoreMissing, JsonpDeserializer.booleanDeserializer(), "ignore_missing"); + op.add(Builder::targetField, JsonpDeserializer.stringDeserializer(), "target_field"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/Pipeline.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/Pipeline.java index 4b79d2767..3122f6f6b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/Pipeline.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/Pipeline.java @@ -31,6 +31,7 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.Long; import java.lang.String; import java.util.List; @@ -73,6 +74,9 @@ public class Pipeline implements JsonpSerializable { @Nullable private final Long version; + @Nullable + private final Boolean deprecated; + private final Map meta; // --------------------------------------------------------------------------------------------- @@ -83,6 +87,7 @@ private Pipeline(Builder builder) { this.onFailure = ApiTypeHelper.unmodifiable(builder.onFailure); this.processors = ApiTypeHelper.unmodifiable(builder.processors); this.version = builder.version; + this.deprecated = builder.deprecated; this.meta = ApiTypeHelper.unmodifiable(builder.meta); } @@ -130,6 +135,18 @@ public final Long version() { return this.version; } + /** + * Marks this ingest pipeline as deprecated. When a deprecated ingest pipeline + * is referenced as the default or final pipeline when creating or updating a + * non-deprecated index template, Elasticsearch will emit a deprecation warning. + *

+ * API name: {@code deprecated} + */ + @Nullable + public final Boolean deprecated() { + return this.deprecated; + } + /** * Arbitrary metadata about the ingest pipeline. This map is not automatically * generated by Elasticsearch. @@ -180,6 +197,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("version"); generator.write(this.version); + } + if (this.deprecated != null) { + generator.writeKey("deprecated"); + generator.write(this.deprecated); + } if (ApiTypeHelper.isDefined(this.meta)) { generator.writeKey("_meta"); @@ -219,6 +241,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private Long version; + @Nullable + private Boolean deprecated; + @Nullable private Map meta; @@ -315,6 +340,18 @@ public final Builder version(@Nullable Long value) { return this; } + /** + * Marks this ingest pipeline as deprecated. When a deprecated ingest pipeline + * is referenced as the default or final pipeline when creating or updating a + * non-deprecated index template, Elasticsearch will emit a deprecation warning. + *

+ * API name: {@code deprecated} + */ + public final Builder deprecated(@Nullable Boolean value) { + this.deprecated = value; + return this; + } + /** * Arbitrary metadata about the ingest pipeline. This map is not automatically * generated by Elasticsearch. @@ -373,6 +410,7 @@ protected static void setupPipelineDeserializer(ObjectDeserializer foreach( return this.foreach(fn.apply(new ForeachProcessor.Builder()).build()); } + public ObjectBuilder geoGrid(GeoGridProcessor v) { + this._kind = Kind.GeoGrid; + this._value = v; + return this; + } + + public ObjectBuilder geoGrid( + Function> fn) { + return this.geoGrid(fn.apply(new GeoGridProcessor.Builder()).build()); + } + public ObjectBuilder geoip(GeoIpProcessor v) { this._kind = Kind.Geoip; this._value = v; @@ -1025,6 +1112,17 @@ public ObjectBuilder gsub(Function htmlStrip(HtmlStripProcessor v) { + this._kind = Kind.HtmlStrip; + this._value = v; + return this; + } + + public ObjectBuilder htmlStrip( + Function> fn) { + return this.htmlStrip(fn.apply(new HtmlStripProcessor.Builder()).build()); + } + public ObjectBuilder inference(InferenceProcessor v) { this._kind = Kind.Inference; this._value = v; @@ -1088,6 +1186,16 @@ public ObjectBuilder pipeline( return this.pipeline(fn.apply(new PipelineProcessor.Builder()).build()); } + public ObjectBuilder redact(RedactProcessor v) { + this._kind = Kind.Redact; + this._value = v; + return this; + } + + public ObjectBuilder redact(Function> fn) { + return this.redact(fn.apply(new RedactProcessor.Builder()).build()); + } + public ObjectBuilder remove(RemoveProcessor v) { this._kind = Kind.Remove; this._value = v; @@ -1202,6 +1310,17 @@ public ObjectBuilder urldecode( return this.urldecode(fn.apply(new UrlDecodeProcessor.Builder()).build()); } + public ObjectBuilder uriParts(UriPartsProcessor v) { + this._kind = Kind.UriParts; + this._value = v; + return this; + } + + public ObjectBuilder uriParts( + Function> fn) { + return this.uriParts(fn.apply(new UriPartsProcessor.Builder()).build()); + } + public ObjectBuilder userAgent(UserAgentProcessor v) { this._kind = Kind.UserAgent; this._value = v; @@ -1252,15 +1371,18 @@ protected static void setupProcessorDeserializer(ObjectDeserializer op) op.add(Builder::enrich, EnrichProcessor._DESERIALIZER, "enrich"); op.add(Builder::fail, FailProcessor._DESERIALIZER, "fail"); op.add(Builder::foreach, ForeachProcessor._DESERIALIZER, "foreach"); + op.add(Builder::geoGrid, GeoGridProcessor._DESERIALIZER, "geo_grid"); op.add(Builder::geoip, GeoIpProcessor._DESERIALIZER, "geoip"); op.add(Builder::grok, GrokProcessor._DESERIALIZER, "grok"); op.add(Builder::gsub, GsubProcessor._DESERIALIZER, "gsub"); + op.add(Builder::htmlStrip, HtmlStripProcessor._DESERIALIZER, "html_strip"); op.add(Builder::inference, InferenceProcessor._DESERIALIZER, "inference"); op.add(Builder::join, JoinProcessor._DESERIALIZER, "join"); op.add(Builder::json, JsonProcessor._DESERIALIZER, "json"); op.add(Builder::kv, KeyValueProcessor._DESERIALIZER, "kv"); op.add(Builder::lowercase, LowercaseProcessor._DESERIALIZER, "lowercase"); op.add(Builder::pipeline, PipelineProcessor._DESERIALIZER, "pipeline"); + op.add(Builder::redact, RedactProcessor._DESERIALIZER, "redact"); op.add(Builder::remove, RemoveProcessor._DESERIALIZER, "remove"); op.add(Builder::rename, RenameProcessor._DESERIALIZER, "rename"); op.add(Builder::reroute, RerouteProcessor._DESERIALIZER, "reroute"); @@ -1272,6 +1394,7 @@ protected static void setupProcessorDeserializer(ObjectDeserializer op) op.add(Builder::trim, TrimProcessor._DESERIALIZER, "trim"); op.add(Builder::uppercase, UppercaseProcessor._DESERIALIZER, "uppercase"); op.add(Builder::urldecode, UrlDecodeProcessor._DESERIALIZER, "urldecode"); + op.add(Builder::uriParts, UriPartsProcessor._DESERIALIZER, "uri_parts"); op.add(Builder::userAgent, UserAgentProcessor._DESERIALIZER, "user_agent"); op.setUnknownFieldHandler((builder, name, parser, mapper) -> { diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorBuilders.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorBuilders.java index 1c13f6724..efcb19263 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorBuilders.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorBuilders.java @@ -297,6 +297,24 @@ public static Processor foreach(Function> fn) { + Processor.Builder builder = new Processor.Builder(); + builder.geoGrid(fn.apply(new GeoGridProcessor.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link GeoIpProcessor geoip} {@code Processor} * variant. @@ -351,6 +369,24 @@ public static Processor gsub(Function> fn) { + Processor.Builder builder = new Processor.Builder(); + builder.htmlStrip(fn.apply(new HtmlStripProcessor.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link InferenceProcessor inference} * {@code Processor} variant. @@ -459,6 +495,24 @@ public static Processor pipeline(Function> fn) { + Processor.Builder builder = new Processor.Builder(); + builder.redact(fn.apply(new RedactProcessor.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link RemoveProcessor remove} {@code Processor} * variant. @@ -657,6 +711,24 @@ public static Processor urldecode(Function> fn) { + Processor.Builder builder = new Processor.Builder(); + builder.uriParts(fn.apply(new UriPartsProcessor.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link UserAgentProcessor user_agent} * {@code Processor} variant. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java index 4bace4a41..fc71a6ce2 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java @@ -34,6 +34,7 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.Long; import java.lang.String; import java.util.HashMap; @@ -71,6 +72,9 @@ public class PutPipelineRequest extends RequestBase implements JsonpSerializable { private final Map meta; + @Nullable + private final Boolean deprecated; + @Nullable private final String description; @@ -97,6 +101,7 @@ public class PutPipelineRequest extends RequestBase implements JsonpSerializable private PutPipelineRequest(Builder builder) { this.meta = ApiTypeHelper.unmodifiable(builder.meta); + this.deprecated = builder.deprecated; this.description = builder.description; this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); this.ifVersion = builder.ifVersion; @@ -122,6 +127,18 @@ public final Map meta() { return this.meta; } + /** + * Marks this ingest pipeline as deprecated. When a deprecated ingest pipeline + * is referenced as the default or final pipeline when creating or updating a + * non-deprecated index template, Elasticsearch will emit a deprecation warning. + *

+ * API name: {@code deprecated} + */ + @Nullable + public final Boolean deprecated() { + return this.deprecated; + } + /** * Description of the ingest pipeline. *

@@ -230,6 +247,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (this.deprecated != null) { + generator.writeKey("deprecated"); + generator.write(this.deprecated); + } if (this.description != null) { generator.writeKey("description"); @@ -276,6 +298,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private Map meta; + @Nullable + private Boolean deprecated; + @Nullable private String description; @@ -325,6 +350,18 @@ public final Builder meta(String key, JsonData value) { return this; } + /** + * Marks this ingest pipeline as deprecated. When a deprecated ingest pipeline + * is referenced as the default or final pipeline when creating or updating a + * non-deprecated index template, Elasticsearch will emit a deprecation warning. + *

+ * API name: {@code deprecated} + */ + public final Builder deprecated(@Nullable Boolean value) { + this.deprecated = value; + return this; + } + /** * Description of the ingest pipeline. *

@@ -526,6 +563,7 @@ public PutPipelineRequest build() { protected static void setupPutPipelineRequestDeserializer(ObjectDeserializer op) { op.add(Builder::meta, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "_meta"); + op.add(Builder::deprecated, JsonpDeserializer.booleanDeserializer(), "deprecated"); op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); op.add(Builder::onFailure, JsonpDeserializer.arrayDeserializer(Processor._DESERIALIZER), "on_failure"); op.add(Builder::processors, JsonpDeserializer.arrayDeserializer(Processor._DESERIALIZER), "processors"); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/RedactProcessor.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/RedactProcessor.java new file mode 100644 index 000000000..21a0fb763 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/RedactProcessor.java @@ -0,0 +1,390 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.ingest; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: ingest._types.RedactProcessor + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class RedactProcessor extends ProcessorBase implements ProcessorVariant { + private final String field; + + private final List patterns; + + private final Map patternDefinitions; + + @Nullable + private final String prefix; + + @Nullable + private final String suffix; + + @Nullable + private final Boolean ignoreMissing; + + @Nullable + private final Boolean skipIfUnlicensed; + + // --------------------------------------------------------------------------------------------- + + private RedactProcessor(Builder builder) { + super(builder); + + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.patterns = ApiTypeHelper.unmodifiableRequired(builder.patterns, this, "patterns"); + this.patternDefinitions = ApiTypeHelper.unmodifiable(builder.patternDefinitions); + this.prefix = builder.prefix; + this.suffix = builder.suffix; + this.ignoreMissing = builder.ignoreMissing; + this.skipIfUnlicensed = builder.skipIfUnlicensed; + + } + + public static RedactProcessor of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Processor variant kind. + */ + @Override + public Processor.Kind _processorKind() { + return Processor.Kind.Redact; + } + + /** + * Required - The field to be redacted + *

+ * API name: {@code field} + */ + public final String field() { + return this.field; + } + + /** + * Required - A list of grok expressions to match and redact named captures with + *

+ * API name: {@code patterns} + */ + public final List patterns() { + return this.patterns; + } + + /** + * API name: {@code pattern_definitions} + */ + public final Map patternDefinitions() { + return this.patternDefinitions; + } + + /** + * Start a redacted section with this token + *

+ * API name: {@code prefix} + */ + @Nullable + public final String prefix() { + return this.prefix; + } + + /** + * End a redacted section with this token + *

+ * API name: {@code suffix} + */ + @Nullable + public final String suffix() { + return this.suffix; + } + + /** + * If true and field does not exist or is + * null, the processor quietly exits without modifying the + * document. + *

+ * API name: {@code ignore_missing} + */ + @Nullable + public final Boolean ignoreMissing() { + return this.ignoreMissing; + } + + /** + * If true and the current license does not support running redact + * processors, then the processor quietly exits without modifying the document + *

+ * API name: {@code skip_if_unlicensed} + */ + @Nullable + public final Boolean skipIfUnlicensed() { + return this.skipIfUnlicensed; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + generator.writeKey("field"); + generator.write(this.field); + + if (ApiTypeHelper.isDefined(this.patterns)) { + generator.writeKey("patterns"); + generator.writeStartArray(); + for (String item0 : this.patterns) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.patternDefinitions)) { + generator.writeKey("pattern_definitions"); + generator.writeStartObject(); + for (Map.Entry item0 : this.patternDefinitions.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); + + } + if (this.prefix != null) { + generator.writeKey("prefix"); + generator.write(this.prefix); + + } + if (this.suffix != null) { + generator.writeKey("suffix"); + generator.write(this.suffix); + + } + if (this.ignoreMissing != null) { + generator.writeKey("ignore_missing"); + generator.write(this.ignoreMissing); + + } + if (this.skipIfUnlicensed != null) { + generator.writeKey("skip_if_unlicensed"); + generator.write(this.skipIfUnlicensed); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RedactProcessor}. + */ + + public static class Builder extends ProcessorBase.AbstractBuilder + implements + ObjectBuilder { + private String field; + + private List patterns; + + @Nullable + private Map patternDefinitions; + + @Nullable + private String prefix; + + @Nullable + private String suffix; + + @Nullable + private Boolean ignoreMissing; + + @Nullable + private Boolean skipIfUnlicensed; + + /** + * Required - The field to be redacted + *

+ * API name: {@code field} + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + /** + * Required - A list of grok expressions to match and redact named captures with + *

+ * API name: {@code patterns} + *

+ * Adds all elements of list to patterns. + */ + public final Builder patterns(List list) { + this.patterns = _listAddAll(this.patterns, list); + return this; + } + + /** + * Required - A list of grok expressions to match and redact named captures with + *

+ * API name: {@code patterns} + *

+ * Adds one or more values to patterns. + */ + public final Builder patterns(String value, String... values) { + this.patterns = _listAdd(this.patterns, value, values); + return this; + } + + /** + * API name: {@code pattern_definitions} + *

+ * Adds all entries of map to patternDefinitions. + */ + public final Builder patternDefinitions(Map map) { + this.patternDefinitions = _mapPutAll(this.patternDefinitions, map); + return this; + } + + /** + * API name: {@code pattern_definitions} + *

+ * Adds an entry to patternDefinitions. + */ + public final Builder patternDefinitions(String key, String value) { + this.patternDefinitions = _mapPut(this.patternDefinitions, key, value); + return this; + } + + /** + * Start a redacted section with this token + *

+ * API name: {@code prefix} + */ + public final Builder prefix(@Nullable String value) { + this.prefix = value; + return this; + } + + /** + * End a redacted section with this token + *

+ * API name: {@code suffix} + */ + public final Builder suffix(@Nullable String value) { + this.suffix = value; + return this; + } + + /** + * If true and field does not exist or is + * null, the processor quietly exits without modifying the + * document. + *

+ * API name: {@code ignore_missing} + */ + public final Builder ignoreMissing(@Nullable Boolean value) { + this.ignoreMissing = value; + return this; + } + + /** + * If true and the current license does not support running redact + * processors, then the processor quietly exits without modifying the document + *

+ * API name: {@code skip_if_unlicensed} + */ + public final Builder skipIfUnlicensed(@Nullable Boolean value) { + this.skipIfUnlicensed = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link RedactProcessor}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RedactProcessor build() { + _checkSingleUse(); + + return new RedactProcessor(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RedactProcessor} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + RedactProcessor::setupRedactProcessorDeserializer); + + protected static void setupRedactProcessorDeserializer(ObjectDeserializer op) { + ProcessorBase.setupProcessorBaseDeserializer(op); + op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + op.add(Builder::patterns, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "patterns"); + op.add(Builder::patternDefinitions, + JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), "pattern_definitions"); + op.add(Builder::prefix, JsonpDeserializer.stringDeserializer(), "prefix"); + op.add(Builder::suffix, JsonpDeserializer.stringDeserializer(), "suffix"); + op.add(Builder::ignoreMissing, JsonpDeserializer.booleanDeserializer(), "ignore_missing"); + op.add(Builder::skipIfUnlicensed, JsonpDeserializer.booleanDeserializer(), "skip_if_unlicensed"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java index 6ee2e9b3b..e38ed19e9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java @@ -82,7 +82,7 @@ public class SimulateRequest extends RequestBase implements JsonpSerializable { private SimulateRequest(Builder builder) { - this.docs = ApiTypeHelper.unmodifiable(builder.docs); + this.docs = ApiTypeHelper.unmodifiableRequired(builder.docs, this, "docs"); this.id = builder.id; this.pipeline = builder.pipeline; this.verbose = builder.verbose; @@ -94,7 +94,7 @@ public static SimulateRequest of(Function * API name: {@code docs} */ @@ -172,7 +172,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - @Nullable private List docs; @Nullable @@ -185,7 +184,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Boolean verbose; /** - * Sample documents to test in the pipeline. + * Required - Sample documents to test in the pipeline. *

* API name: {@code docs} *

@@ -197,7 +196,7 @@ public final Builder docs(List list) { } /** - * Sample documents to test in the pipeline. + * Required - Sample documents to test in the pipeline. *

* API name: {@code docs} *

@@ -209,7 +208,7 @@ public final Builder docs(Document value, Document... values) { } /** - * Sample documents to test in the pipeline. + * Required - Sample documents to test in the pipeline. *

* API name: {@code docs} *

diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateResponse.java index 1f55ab6dd..de711b3ec 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateResponse.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateResponse.java @@ -19,7 +19,7 @@ package co.elastic.clients.elasticsearch.ingest; -import co.elastic.clients.elasticsearch.ingest.simulate.PipelineSimulation; +import co.elastic.clients.elasticsearch.ingest.simulate.SimulateDocumentResult; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -60,7 +60,7 @@ */ @JsonpDeserializable public class SimulateResponse implements JsonpSerializable { - private final List docs; + private final List docs; // --------------------------------------------------------------------------------------------- @@ -77,7 +77,7 @@ public static SimulateResponse of(Function docs() { + public final List docs() { return this.docs; } @@ -95,7 +95,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (ApiTypeHelper.isDefined(this.docs)) { generator.writeKey("docs"); generator.writeStartArray(); - for (PipelineSimulation item0 : this.docs) { + for (SimulateDocumentResult item0 : this.docs) { item0.serialize(generator, mapper); } @@ -117,14 +117,14 @@ public String toString() { */ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private List docs; + private List docs; /** * Required - API name: {@code docs} *

* Adds all elements of list to docs. */ - public final Builder docs(List list) { + public final Builder docs(List list) { this.docs = _listAddAll(this.docs, list); return this; } @@ -134,7 +134,7 @@ public final Builder docs(List list) { *

* Adds one or more values to docs. */ - public final Builder docs(PipelineSimulation value, PipelineSimulation... values) { + public final Builder docs(SimulateDocumentResult value, SimulateDocumentResult... values) { this.docs = _listAdd(this.docs, value, values); return this; } @@ -144,8 +144,8 @@ public final Builder docs(PipelineSimulation value, PipelineSimulation... values *

* Adds a value to docs using a builder lambda. */ - public final Builder docs(Function> fn) { - return docs(fn.apply(new PipelineSimulation.Builder()).build()); + public final Builder docs(Function> fn) { + return docs(fn.apply(new SimulateDocumentResult.Builder()).build()); } @Override @@ -176,7 +176,7 @@ public SimulateResponse build() { protected static void setupSimulateResponseDeserializer(ObjectDeserializer op) { - op.add(Builder::docs, JsonpDeserializer.arrayDeserializer(PipelineSimulation._DESERIALIZER), "docs"); + op.add(Builder::docs, JsonpDeserializer.arrayDeserializer(SimulateDocumentResult._DESERIALIZER), "docs"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/UriPartsProcessor.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/UriPartsProcessor.java new file mode 100644 index 000000000..d9c01d76a --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/UriPartsProcessor.java @@ -0,0 +1,294 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.ingest; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: ingest._types.UriPartsProcessor + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UriPartsProcessor extends ProcessorBase implements ProcessorVariant { + private final String field; + + @Nullable + private final Boolean ignoreMissing; + + @Nullable + private final Boolean keepOriginal; + + @Nullable + private final Boolean removeIfSuccessful; + + @Nullable + private final String targetField; + + // --------------------------------------------------------------------------------------------- + + private UriPartsProcessor(Builder builder) { + super(builder); + + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.ignoreMissing = builder.ignoreMissing; + this.keepOriginal = builder.keepOriginal; + this.removeIfSuccessful = builder.removeIfSuccessful; + this.targetField = builder.targetField; + + } + + public static UriPartsProcessor of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Processor variant kind. + */ + @Override + public Processor.Kind _processorKind() { + return Processor.Kind.UriParts; + } + + /** + * Required - Field containing the URI string. + *

+ * API name: {@code field} + */ + public final String field() { + return this.field; + } + + /** + * If true and field does not exist, the processor + * quietly exits without modifying the document. + *

+ * API name: {@code ignore_missing} + */ + @Nullable + public final Boolean ignoreMissing() { + return this.ignoreMissing; + } + + /** + * If true, the processor copies the unparsed URI to + * <target_field>.original. + *

+ * API name: {@code keep_original} + */ + @Nullable + public final Boolean keepOriginal() { + return this.keepOriginal; + } + + /** + * If true, the processor removes the field after + * parsing the URI string. If parsing fails, the processor does not remove the + * field. + *

+ * API name: {@code remove_if_successful} + */ + @Nullable + public final Boolean removeIfSuccessful() { + return this.removeIfSuccessful; + } + + /** + * Output field for the URI object. + *

+ * API name: {@code target_field} + */ + @Nullable + public final String targetField() { + return this.targetField; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + generator.writeKey("field"); + generator.write(this.field); + + if (this.ignoreMissing != null) { + generator.writeKey("ignore_missing"); + generator.write(this.ignoreMissing); + + } + if (this.keepOriginal != null) { + generator.writeKey("keep_original"); + generator.write(this.keepOriginal); + + } + if (this.removeIfSuccessful != null) { + generator.writeKey("remove_if_successful"); + generator.write(this.removeIfSuccessful); + + } + if (this.targetField != null) { + generator.writeKey("target_field"); + generator.write(this.targetField); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UriPartsProcessor}. + */ + + public static class Builder extends ProcessorBase.AbstractBuilder + implements + ObjectBuilder { + private String field; + + @Nullable + private Boolean ignoreMissing; + + @Nullable + private Boolean keepOriginal; + + @Nullable + private Boolean removeIfSuccessful; + + @Nullable + private String targetField; + + /** + * Required - Field containing the URI string. + *

+ * API name: {@code field} + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + /** + * If true and field does not exist, the processor + * quietly exits without modifying the document. + *

+ * API name: {@code ignore_missing} + */ + public final Builder ignoreMissing(@Nullable Boolean value) { + this.ignoreMissing = value; + return this; + } + + /** + * If true, the processor copies the unparsed URI to + * <target_field>.original. + *

+ * API name: {@code keep_original} + */ + public final Builder keepOriginal(@Nullable Boolean value) { + this.keepOriginal = value; + return this; + } + + /** + * If true, the processor removes the field after + * parsing the URI string. If parsing fails, the processor does not remove the + * field. + *

+ * API name: {@code remove_if_successful} + */ + public final Builder removeIfSuccessful(@Nullable Boolean value) { + this.removeIfSuccessful = value; + return this; + } + + /** + * Output field for the URI object. + *

+ * API name: {@code target_field} + */ + public final Builder targetField(@Nullable String value) { + this.targetField = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UriPartsProcessor}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UriPartsProcessor build() { + _checkSingleUse(); + + return new UriPartsProcessor(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UriPartsProcessor} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UriPartsProcessor::setupUriPartsProcessorDeserializer); + + protected static void setupUriPartsProcessorDeserializer(ObjectDeserializer op) { + ProcessorBase.setupProcessorBaseDeserializer(op); + op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + op.add(Builder::ignoreMissing, JsonpDeserializer.booleanDeserializer(), "ignore_missing"); + op.add(Builder::keepOriginal, JsonpDeserializer.booleanDeserializer(), "keep_original"); + op.add(Builder::removeIfSuccessful, JsonpDeserializer.booleanDeserializer(), "remove_if_successful"); + op.add(Builder::targetField, JsonpDeserializer.stringDeserializer(), "target_field"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/UserAgentProcessor.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/UserAgentProcessor.java index d1ea73a5a..a02eaa72d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/UserAgentProcessor.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/UserAgentProcessor.java @@ -64,14 +64,17 @@ public class UserAgentProcessor extends ProcessorBase implements ProcessorVarian @Nullable private final Boolean ignoreMissing; - private final List options; - @Nullable private final String regexFile; @Nullable private final String targetField; + private final List properties; + + @Nullable + private final Boolean extractDeviceType; + // --------------------------------------------------------------------------------------------- private UserAgentProcessor(Builder builder) { @@ -79,9 +82,10 @@ private UserAgentProcessor(Builder builder) { this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); this.ignoreMissing = builder.ignoreMissing; - this.options = ApiTypeHelper.unmodifiable(builder.options); this.regexFile = builder.regexFile; this.targetField = builder.targetField; + this.properties = ApiTypeHelper.unmodifiable(builder.properties); + this.extractDeviceType = builder.extractDeviceType; } @@ -117,13 +121,6 @@ public final Boolean ignoreMissing() { return this.ignoreMissing; } - /** - * API name: {@code options} - */ - public final List options() { - return this.options; - } - /** * The name of the file in the config/ingest-user-agent directory * containing the regular expressions for parsing the user agent string. Both @@ -148,6 +145,25 @@ public final String targetField() { return this.targetField; } + /** + * Controls what properties are added to target_field. + *

+ * API name: {@code properties} + */ + public final List properties() { + return this.properties; + } + + /** + * Extracts device type from the user agent string on a best-effort basis. + *

+ * API name: {@code extract_device_type} + */ + @Nullable + public final Boolean extractDeviceType() { + return this.extractDeviceType; + } + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { super.serializeInternal(generator, mapper); @@ -158,15 +174,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("ignore_missing"); generator.write(this.ignoreMissing); - } - if (ApiTypeHelper.isDefined(this.options)) { - generator.writeKey("options"); - generator.writeStartArray(); - for (UserAgentProperty item0 : this.options) { - item0.serialize(generator, mapper); - } - generator.writeEnd(); - } if (this.regexFile != null) { generator.writeKey("regex_file"); @@ -178,6 +185,20 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.targetField); } + if (ApiTypeHelper.isDefined(this.properties)) { + generator.writeKey("properties"); + generator.writeStartArray(); + for (UserAgentProperty item0 : this.properties) { + item0.serialize(generator, mapper); + } + generator.writeEnd(); + + } + if (this.extractDeviceType != null) { + generator.writeKey("extract_device_type"); + generator.write(this.extractDeviceType); + + } } @@ -195,15 +216,18 @@ public static class Builder extends ProcessorBase.AbstractBuilder @Nullable private Boolean ignoreMissing; - @Nullable - private List options; - @Nullable private String regexFile; @Nullable private String targetField; + @Nullable + private List properties; + + @Nullable + private Boolean extractDeviceType; + /** * Required - The field containing the user agent string. *

@@ -225,26 +249,6 @@ public final Builder ignoreMissing(@Nullable Boolean value) { return this; } - /** - * API name: {@code options} - *

- * Adds all elements of list to options. - */ - public final Builder options(List list) { - this.options = _listAddAll(this.options, list); - return this; - } - - /** - * API name: {@code options} - *

- * Adds one or more values to options. - */ - public final Builder options(UserAgentProperty value, UserAgentProperty... values) { - this.options = _listAdd(this.options, value, values); - return this; - } - /** * The name of the file in the config/ingest-user-agent directory * containing the regular expressions for parsing the user agent string. Both @@ -269,6 +273,40 @@ public final Builder targetField(@Nullable String value) { return this; } + /** + * Controls what properties are added to target_field. + *

+ * API name: {@code properties} + *

+ * Adds all elements of list to properties. + */ + public final Builder properties(List list) { + this.properties = _listAddAll(this.properties, list); + return this; + } + + /** + * Controls what properties are added to target_field. + *

+ * API name: {@code properties} + *

+ * Adds one or more values to properties. + */ + public final Builder properties(UserAgentProperty value, UserAgentProperty... values) { + this.properties = _listAdd(this.properties, value, values); + return this; + } + + /** + * Extracts device type from the user agent string on a best-effort basis. + *

+ * API name: {@code extract_device_type} + */ + public final Builder extractDeviceType(@Nullable Boolean value) { + this.extractDeviceType = value; + return this; + } + @Override protected Builder self() { return this; @@ -299,9 +337,10 @@ protected static void setupUserAgentProcessorDeserializer(ObjectDeserializer processorResults; - @Nullable private final String tag; @@ -76,15 +73,26 @@ public class PipelineSimulation implements JsonpSerializable { @Nullable private final ActionStatusOptions status; + @Nullable + private final String description; + + @Nullable + private final ErrorCause ignoredError; + + @Nullable + private final ErrorCause error; + // --------------------------------------------------------------------------------------------- private PipelineSimulation(Builder builder) { this.doc = builder.doc; - this.processorResults = ApiTypeHelper.unmodifiable(builder.processorResults); this.tag = builder.tag; this.processorType = builder.processorType; this.status = builder.status; + this.description = builder.description; + this.ignoredError = builder.ignoredError; + this.error = builder.error; } @@ -100,13 +108,6 @@ public final DocumentSimulation doc() { return this.doc; } - /** - * API name: {@code processor_results} - */ - public final List processorResults() { - return this.processorResults; - } - /** * API name: {@code tag} */ @@ -131,6 +132,30 @@ public final ActionStatusOptions status() { return this.status; } + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * API name: {@code ignored_error} + */ + @Nullable + public final ErrorCause ignoredError() { + return this.ignoredError; + } + + /** + * API name: {@code error} + */ + @Nullable + public final ErrorCause error() { + return this.error; + } + /** * Serialize this object to JSON. */ @@ -146,16 +171,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("doc"); this.doc.serialize(generator, mapper); - } - if (ApiTypeHelper.isDefined(this.processorResults)) { - generator.writeKey("processor_results"); - generator.writeStartArray(); - for (PipelineSimulation item0 : this.processorResults) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - } if (this.tag != null) { generator.writeKey("tag"); @@ -171,6 +186,21 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("status"); this.status.serialize(generator, mapper); } + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + if (this.ignoredError != null) { + generator.writeKey("ignored_error"); + this.ignoredError.serialize(generator, mapper); + + } + if (this.error != null) { + generator.writeKey("error"); + this.error.serialize(generator, mapper); + + } } @@ -191,9 +221,6 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private DocumentSimulation doc; - @Nullable - private List processorResults; - @Nullable private String tag; @@ -203,6 +230,15 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private ActionStatusOptions status; + @Nullable + private String description; + + @Nullable + private ErrorCause ignoredError; + + @Nullable + private ErrorCause error; + /** * API name: {@code doc} */ @@ -219,59 +255,67 @@ public final Builder doc(Function - * Adds all elements of list to processorResults. + * API name: {@code tag} */ - public final Builder processorResults(List list) { - this.processorResults = _listAddAll(this.processorResults, list); + public final Builder tag(@Nullable String value) { + this.tag = value; return this; } /** - * API name: {@code processor_results} - *

- * Adds one or more values to processorResults. + * API name: {@code processor_type} */ - public final Builder processorResults(PipelineSimulation value, PipelineSimulation... values) { - this.processorResults = _listAdd(this.processorResults, value, values); + public final Builder processorType(@Nullable String value) { + this.processorType = value; return this; } /** - * API name: {@code processor_results} - *

- * Adds a value to processorResults using a builder lambda. + * API name: {@code status} */ - public final Builder processorResults( - Function> fn) { - return processorResults(fn.apply(new PipelineSimulation.Builder()).build()); + public final Builder status(@Nullable ActionStatusOptions value) { + this.status = value; + return this; } /** - * API name: {@code tag} + * API name: {@code description} */ - public final Builder tag(@Nullable String value) { - this.tag = value; + public final Builder description(@Nullable String value) { + this.description = value; return this; } /** - * API name: {@code processor_type} + * API name: {@code ignored_error} */ - public final Builder processorType(@Nullable String value) { - this.processorType = value; + public final Builder ignoredError(@Nullable ErrorCause value) { + this.ignoredError = value; return this; } /** - * API name: {@code status} + * API name: {@code ignored_error} */ - public final Builder status(@Nullable ActionStatusOptions value) { - this.status = value; + public final Builder ignoredError(Function> fn) { + return this.ignoredError(fn.apply(new ErrorCause.Builder()).build()); + } + + /** + * API name: {@code error} + */ + public final Builder error(@Nullable ErrorCause value) { + this.error = value; return this; } + /** + * API name: {@code error} + */ + public final Builder error(Function> fn) { + return this.error(fn.apply(new ErrorCause.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -301,11 +345,12 @@ public PipelineSimulation build() { protected static void setupPipelineSimulationDeserializer(ObjectDeserializer op) { op.add(Builder::doc, DocumentSimulation._DESERIALIZER, "doc"); - op.add(Builder::processorResults, JsonpDeserializer.arrayDeserializer(PipelineSimulation._DESERIALIZER), - "processor_results"); op.add(Builder::tag, JsonpDeserializer.stringDeserializer(), "tag"); op.add(Builder::processorType, JsonpDeserializer.stringDeserializer(), "processor_type"); op.add(Builder::status, ActionStatusOptions._DESERIALIZER, "status"); + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::ignoredError, ErrorCause._DESERIALIZER, "ignored_error"); + op.add(Builder::error, ErrorCause._DESERIALIZER, "error"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/simulate/SimulateDocumentResult.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/simulate/SimulateDocumentResult.java new file mode 100644 index 000000000..cd51807d4 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ingest/simulate/SimulateDocumentResult.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 co.elastic.clients.elasticsearch.ingest.simulate; + +import co.elastic.clients.elasticsearch._types.ErrorCause; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: ingest.simulate.SimulateDocumentResult + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SimulateDocumentResult implements JsonpSerializable { + @Nullable + private final DocumentSimulation doc; + + @Nullable + private final ErrorCause error; + + private final List processorResults; + + // --------------------------------------------------------------------------------------------- + + private SimulateDocumentResult(Builder builder) { + + this.doc = builder.doc; + this.error = builder.error; + this.processorResults = ApiTypeHelper.unmodifiable(builder.processorResults); + + } + + public static SimulateDocumentResult of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code doc} + */ + @Nullable + public final DocumentSimulation doc() { + return this.doc; + } + + /** + * API name: {@code error} + */ + @Nullable + public final ErrorCause error() { + return this.error; + } + + /** + * API name: {@code processor_results} + */ + public final List processorResults() { + return this.processorResults; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.doc != null) { + generator.writeKey("doc"); + this.doc.serialize(generator, mapper); + + } + if (this.error != null) { + generator.writeKey("error"); + this.error.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.processorResults)) { + generator.writeKey("processor_results"); + generator.writeStartArray(); + for (PipelineSimulation item0 : this.processorResults) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SimulateDocumentResult}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private DocumentSimulation doc; + + @Nullable + private ErrorCause error; + + @Nullable + private List processorResults; + + /** + * API name: {@code doc} + */ + public final Builder doc(@Nullable DocumentSimulation value) { + this.doc = value; + return this; + } + + /** + * API name: {@code doc} + */ + public final Builder doc(Function> fn) { + return this.doc(fn.apply(new DocumentSimulation.Builder()).build()); + } + + /** + * API name: {@code error} + */ + public final Builder error(@Nullable ErrorCause value) { + this.error = value; + return this; + } + + /** + * API name: {@code error} + */ + public final Builder error(Function> fn) { + return this.error(fn.apply(new ErrorCause.Builder()).build()); + } + + /** + * API name: {@code processor_results} + *

+ * Adds all elements of list to processorResults. + */ + public final Builder processorResults(List list) { + this.processorResults = _listAddAll(this.processorResults, list); + return this; + } + + /** + * API name: {@code processor_results} + *

+ * Adds one or more values to processorResults. + */ + public final Builder processorResults(PipelineSimulation value, PipelineSimulation... values) { + this.processorResults = _listAdd(this.processorResults, value, values); + return this; + } + + /** + * API name: {@code processor_results} + *

+ * Adds a value to processorResults using a builder lambda. + */ + public final Builder processorResults( + Function> fn) { + return processorResults(fn.apply(new PipelineSimulation.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SimulateDocumentResult}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SimulateDocumentResult build() { + _checkSingleUse(); + + return new SimulateDocumentResult(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SimulateDocumentResult} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SimulateDocumentResult::setupSimulateDocumentResultDeserializer); + + protected static void setupSimulateDocumentResultDeserializer( + ObjectDeserializer op) { + + op.add(Builder::doc, DocumentSimulation._DESERIALIZER, "doc"); + op.add(Builder::error, ErrorCause._DESERIALIZER, "error"); + op.add(Builder::processorResults, JsonpDeserializer.arrayDeserializer(PipelineSimulation._DESERIALIZER), + "processor_results"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseAsyncClient.java index a81e9b927..b9aad69f7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseAsyncClient.java @@ -70,10 +70,11 @@ public ElasticsearchLicenseAsyncClient withTransportOptions(@Nullable TransportO // ----- Endpoint: license.get /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @see Documentation @@ -88,10 +89,11 @@ public CompletableFuture get(GetLicenseRequest request) { } /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @param fn * a function that initializes a builder to create the @@ -107,10 +109,11 @@ public final CompletableFuture get( } /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseClient.java index 8accbf228..ed623eab1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseClient.java @@ -68,10 +68,11 @@ public ElasticsearchLicenseClient withTransportOptions(@Nullable TransportOption // ----- Endpoint: license.get /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @see Documentation @@ -86,10 +87,11 @@ public GetLicenseResponse get(GetLicenseRequest request) throws IOException, Ela } /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @param fn * a function that initializes a builder to create the @@ -105,10 +107,11 @@ public final GetLicenseResponse get(Functionhttps://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java index 2ab4a4bd9..029998023 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java @@ -55,10 +55,11 @@ // typedef: license.get.Request /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java index b8c9eff75..06eb75505 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java @@ -56,7 +56,7 @@ // typedef: ml.delete_calendar_event.Request /** - * Deletes scheduled events from a calendar. + * Delete events from a calendar. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java index 75d602b9c..ddd02337e 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java @@ -58,7 +58,7 @@ // typedef: ml.delete_calendar_job.Request /** - * Deletes anomaly detection jobs from a calendar. + * Delete anomaly jobs from a calendar. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java index 999db65fc..32b6dffca 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java @@ -56,7 +56,8 @@ // typedef: ml.delete_calendar.Request /** - * Removes all scheduled events from a calendar, then deletes it. + * Delete a calendar. Removes all scheduled events from a calendar, then deletes + * it. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java index 3bebfc2a1..b6e936935 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java @@ -57,7 +57,7 @@ // typedef: ml.delete_data_frame_analytics.Request /** - * Deletes a data frame analytics job. + * Delete a data frame analytics job. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java index b514864b7..437e97d70 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java @@ -56,7 +56,7 @@ // typedef: ml.delete_datafeed.Request /** - * Deletes an existing datafeed. + * Delete a datafeed. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java index 233573963..e5e0f459a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java @@ -56,7 +56,7 @@ // typedef: ml.delete_filter.Request /** - * Deletes a filter. If an anomaly detection job references the filter, you + * Delete a filter. If an anomaly detection job references the filter, you * cannot delete the filter. You must update or delete the job before you can * delete the filter. * diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java index 59e6c4d3d..89f3b32d7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java @@ -56,7 +56,7 @@ // typedef: ml.delete_trained_model_alias.Request /** - * Deletes a trained model alias. This API deletes an existing model alias that + * Delete a trained model alias. This API deletes an existing model alias that * refers to a trained model. If the model alias is missing or refers to a model * other than the one identified by the model_id, this API returns * an error. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java index 86e3d9f63..ff405eda3 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java @@ -56,8 +56,8 @@ // typedef: ml.delete_trained_model.Request /** - * Deletes an existing trained inference model that is currently not referenced - * by an ingest pipeline. + * Delete an unreferenced trained model. The request deletes a trained inference + * model that is not referenced by an ingest pipeline. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java index bc50996f8..2dd35f84b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java @@ -128,7 +128,8 @@ public final CompletableFuture closeJob( // ----- Endpoint: ml.delete_calendar /** - * Removes all scheduled events from a calendar, then deletes it. + * Delete a calendar. Removes all scheduled events from a calendar, then deletes + * it. * * @see Documentation @@ -143,7 +144,8 @@ public CompletableFuture deleteCalendar(DeleteCalendarRe } /** - * Removes all scheduled events from a calendar, then deletes it. + * Delete a calendar. Removes all scheduled events from a calendar, then deletes + * it. * * @param fn * a function that initializes a builder to create the @@ -161,7 +163,7 @@ public final CompletableFuture deleteCalendar( // ----- Endpoint: ml.delete_calendar_event /** - * Deletes scheduled events from a calendar. + * Delete events from a calendar. * * @see Documentation @@ -176,7 +178,7 @@ public CompletableFuture deleteCalendarEvent(Delete } /** - * Deletes scheduled events from a calendar. + * Delete events from a calendar. * * @param fn * a function that initializes a builder to create the @@ -194,7 +196,7 @@ public final CompletableFuture deleteCalendarEvent( // ----- Endpoint: ml.delete_calendar_job /** - * Deletes anomaly detection jobs from a calendar. + * Delete anomaly jobs from a calendar. * * @see Documentation @@ -209,7 +211,7 @@ public CompletableFuture deleteCalendarJob(DeleteCale } /** - * Deletes anomaly detection jobs from a calendar. + * Delete anomaly jobs from a calendar. * * @param fn * a function that initializes a builder to create the @@ -227,7 +229,7 @@ public final CompletableFuture deleteCalendarJob( // ----- Endpoint: ml.delete_data_frame_analytics /** - * Deletes a data frame analytics job. + * Delete a data frame analytics job. * * @see Documentation @@ -243,7 +245,7 @@ public CompletableFuture deleteDataFrameAnalyt } /** - * Deletes a data frame analytics job. + * Delete a data frame analytics job. * * @param fn * a function that initializes a builder to create the @@ -261,7 +263,7 @@ public final CompletableFuture deleteDataFrame // ----- Endpoint: ml.delete_datafeed /** - * Deletes an existing datafeed. + * Delete a datafeed. * * @see Documentation @@ -276,7 +278,7 @@ public CompletableFuture deleteDatafeed(DeleteDatafeedRe } /** - * Deletes an existing datafeed. + * Delete a datafeed. * * @param fn * a function that initializes a builder to create the @@ -294,7 +296,7 @@ public final CompletableFuture deleteDatafeed( // ----- Endpoint: ml.delete_filter /** - * Deletes a filter. If an anomaly detection job references the filter, you + * Delete a filter. If an anomaly detection job references the filter, you * cannot delete the filter. You must update or delete the job before you can * delete the filter. * @@ -311,7 +313,7 @@ public CompletableFuture deleteFilter(DeleteFilterRequest } /** - * Deletes a filter. If an anomaly detection job references the filter, you + * Delete a filter. If an anomaly detection job references the filter, you * cannot delete the filter. You must update or delete the job before you can * delete the filter. * @@ -374,8 +376,8 @@ public final CompletableFuture deleteJob( // ----- Endpoint: ml.delete_trained_model /** - * Deletes an existing trained inference model that is currently not referenced - * by an ingest pipeline. + * Delete an unreferenced trained model. The request deletes a trained inference + * model that is not referenced by an ingest pipeline. * * @see Documentation @@ -390,8 +392,8 @@ public CompletableFuture deleteTrainedModel(DeleteTr } /** - * Deletes an existing trained inference model that is currently not referenced - * by an ingest pipeline. + * Delete an unreferenced trained model. The request deletes a trained inference + * model that is not referenced by an ingest pipeline. * * @param fn * a function that initializes a builder to create the @@ -409,7 +411,7 @@ public final CompletableFuture deleteTrainedModel( // ----- Endpoint: ml.delete_trained_model_alias /** - * Deletes a trained model alias. This API deletes an existing model alias that + * Delete a trained model alias. This API deletes an existing model alias that * refers to a trained model. If the model alias is missing or refers to a model * other than the one identified by the model_id, this API returns * an error. @@ -428,7 +430,7 @@ public CompletableFuture deleteTrainedModelAlia } /** - * Deletes a trained model alias. This API deletes an existing model alias that + * Delete a trained model alias. This API deletes an existing model alias that * refers to a trained model. If the model alias is missing or refers to a model * other than the one identified by the model_id, this API returns * an error. @@ -449,9 +451,9 @@ public final CompletableFuture deleteTrainedMod // ----- Endpoint: ml.estimate_model_memory /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @see Documentation @@ -466,9 +468,9 @@ public CompletableFuture estimateModelMemory(Estima } /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @param fn * a function that initializes a builder to create the @@ -484,9 +486,9 @@ public final CompletableFuture estimateModelMemory( } /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @see Documentation @@ -501,11 +503,11 @@ public CompletableFuture estimateModelMemory() { // ----- Endpoint: ml.evaluate_data_frame /** - * Evaluates the data frame analytics for an annotated index. The API packages - * together commonly used evaluation metrics for various types of machine - * learning features. This has been designed for use on indexes created by data - * frame analytics. Evaluation requires both a ground truth field and an - * analytics result field to be present. + * Evaluate data frame analytics. The API packages together commonly used + * evaluation metrics for various types of machine learning features. This has + * been designed for use on indexes created by data frame analytics. Evaluation + * requires both a ground truth field and an analytics result field to be + * present. * * @see Documentation @@ -520,11 +522,11 @@ public CompletableFuture evaluateDataFrame(EvaluateDa } /** - * Evaluates the data frame analytics for an annotated index. The API packages - * together commonly used evaluation metrics for various types of machine - * learning features. This has been designed for use on indexes created by data - * frame analytics. Evaluation requires both a ground truth field and an - * analytics result field to be present. + * Evaluate data frame analytics. The API packages together commonly used + * evaluation metrics for various types of machine learning features. This has + * been designed for use on indexes created by data frame analytics. Evaluation + * requires both a ground truth field and an analytics result field to be + * present. * * @param fn * a function that initializes a builder to create the @@ -542,14 +544,14 @@ public final CompletableFuture evaluateDataFrame( // ----- Endpoint: ml.flush_job /** - * Forces any buffered data to be processed by the job. The flush jobs API is - * only applicable when sending data for analysis using the post data API. - * Depending on the content of the buffer, then it might additionally calculate - * new results. Both flush and close operations are similar, however the flush - * is more efficient if you are expecting to send more data for analysis. When - * flushing, the job remains open and is available to continue analyzing data. A - * close operation additionally prunes and persists the model state to disk and - * the job must be opened again before analyzing further data. + * Force buffered data to be processed. The flush jobs API is only applicable + * when sending data for analysis using the post data API. Depending on the + * content of the buffer, then it might additionally calculate new results. Both + * flush and close operations are similar, however the flush is more efficient + * if you are expecting to send more data for analysis. When flushing, the job + * remains open and is available to continue analyzing data. A close operation + * additionally prunes and persists the model state to disk and the job must be + * opened again before analyzing further data. * * @see Documentation @@ -564,14 +566,14 @@ public CompletableFuture flushJob(FlushJobRequest request) { } /** - * Forces any buffered data to be processed by the job. The flush jobs API is - * only applicable when sending data for analysis using the post data API. - * Depending on the content of the buffer, then it might additionally calculate - * new results. Both flush and close operations are similar, however the flush - * is more efficient if you are expecting to send more data for analysis. When - * flushing, the job remains open and is available to continue analyzing data. A - * close operation additionally prunes and persists the model state to disk and - * the job must be opened again before analyzing further data. + * Force buffered data to be processed. The flush jobs API is only applicable + * when sending data for analysis using the post data API. Depending on the + * content of the buffer, then it might additionally calculate new results. Both + * flush and close operations are similar, however the flush is more efficient + * if you are expecting to send more data for analysis. When flushing, the job + * remains open and is available to continue analyzing data. A close operation + * additionally prunes and persists the model state to disk and the job must be + * opened again before analyzing further data. * * @param fn * a function that initializes a builder to create the @@ -589,7 +591,7 @@ public final CompletableFuture flushJob( // ----- Endpoint: ml.get_calendar_events /** - * Retrieves information about the scheduled events in calendars. + * Get info about events in calendars. * * @see Documentation @@ -604,7 +606,7 @@ public CompletableFuture getCalendarEvents(GetCalenda } /** - * Retrieves information about the scheduled events in calendars. + * Get info about events in calendars. * * @param fn * a function that initializes a builder to create the @@ -622,7 +624,7 @@ public final CompletableFuture getCalendarEvents( // ----- Endpoint: ml.get_calendars /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @see Documentation @@ -637,7 +639,7 @@ public CompletableFuture getCalendars(GetCalendarsRequest } /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @param fn * a function that initializes a builder to create the @@ -653,7 +655,7 @@ public final CompletableFuture getCalendars( } /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @see Documentation @@ -668,10 +670,9 @@ public CompletableFuture getCalendars() { // ----- Endpoint: ml.get_data_frame_analytics /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @see Documentation @@ -687,10 +688,9 @@ public CompletableFuture getDataFrameAnalytics( } /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @param fn * a function that initializes a builder to create the @@ -706,10 +706,9 @@ public final CompletableFuture getDataFrameAnalyt } /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @see Documentation @@ -724,7 +723,7 @@ public CompletableFuture getDataFrameAnalytics() // ----- Endpoint: ml.get_data_frame_analytics_stats /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @see Documentation @@ -740,7 +739,7 @@ public CompletableFuture getDataFrameAnalyti } /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @param fn * a function that initializes a builder to create the @@ -756,7 +755,7 @@ public final CompletableFuture getDataFrameA } /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @see Documentation @@ -771,10 +770,10 @@ public CompletableFuture getDataFrameAnalyti // ----- Endpoint: ml.get_datafeed_stats /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -793,10 +792,10 @@ public CompletableFuture getDatafeedStats(GetDatafeedS } /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -816,10 +815,10 @@ public final CompletableFuture getDatafeedStats( } /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -838,10 +837,10 @@ public CompletableFuture getDatafeedStats() { // ----- Endpoint: ml.get_datafeeds /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -858,10 +857,10 @@ public CompletableFuture getDatafeeds(GetDatafeedsRequest } /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -879,10 +878,10 @@ public final CompletableFuture getDatafeeds( } /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -899,7 +898,7 @@ public CompletableFuture getDatafeeds() { // ----- Endpoint: ml.get_filters /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @see Documentation @@ -914,7 +913,7 @@ public CompletableFuture getFilters(GetFiltersRequest reques } /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @param fn * a function that initializes a builder to create the @@ -930,7 +929,7 @@ public final CompletableFuture getFilters( } /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @see Documentation @@ -945,7 +944,7 @@ public CompletableFuture getFilters() { // ----- Endpoint: ml.get_job_stats /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @see Documentation @@ -960,7 +959,7 @@ public CompletableFuture getJobStats(GetJobStatsRequest req } /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @param fn * a function that initializes a builder to create the @@ -976,7 +975,7 @@ public final CompletableFuture getJobStats( } /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @see Documentation @@ -991,12 +990,12 @@ public CompletableFuture getJobStats() { // ----- Endpoint: ml.get_jobs /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @see Documentation @@ -1011,12 +1010,12 @@ public CompletableFuture getJobs(GetJobsRequest request) { } /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @param fn * a function that initializes a builder to create the @@ -1032,12 +1031,12 @@ public final CompletableFuture getJobs( } /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @see Documentation @@ -1052,8 +1051,10 @@ public CompletableFuture getJobs() { // ----- Endpoint: ml.get_overall_buckets /** - * Retrieves overall bucket results that summarize the bucket results of - * multiple anomaly detection jobs. + * Get overall bucket results. + *

+ * Retrievs overall bucket results that summarize the bucket results of multiple + * anomaly detection jobs. *

* The overall_score is calculated by combining the scores of all * the buckets within the overall bucket span. First, the maximum @@ -1083,8 +1084,10 @@ public CompletableFuture getOverallBuckets(GetOverall } /** - * Retrieves overall bucket results that summarize the bucket results of - * multiple anomaly detection jobs. + * Get overall bucket results. + *

+ * Retrievs overall bucket results that summarize the bucket results of multiple + * anomaly detection jobs. *

* The overall_score is calculated by combining the scores of all * the buckets within the overall bucket span. First, the maximum @@ -1117,7 +1120,7 @@ public final CompletableFuture getOverallBuckets( // ----- Endpoint: ml.get_trained_models /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @see Documentation @@ -1132,7 +1135,7 @@ public CompletableFuture getTrainedModels(GetTrainedMo } /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @param fn * a function that initializes a builder to create the @@ -1148,7 +1151,7 @@ public final CompletableFuture getTrainedModels( } /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @see Documentation @@ -1163,9 +1166,9 @@ public CompletableFuture getTrainedModels() { // ----- Endpoint: ml.get_trained_models_stats /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @see Documentation @@ -1181,9 +1184,9 @@ public CompletableFuture getTrainedModelsStats( } /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @param fn * a function that initializes a builder to create the @@ -1199,9 +1202,9 @@ public final CompletableFuture getTrainedModelsSt } /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @see Documentation @@ -1216,7 +1219,7 @@ public CompletableFuture getTrainedModelsStats() // ----- Endpoint: ml.infer_trained_model /** - * Evaluates a trained model. + * Evaluate a trained model. * * @see Documentation @@ -1231,7 +1234,7 @@ public CompletableFuture inferTrainedModel(InferTrain } /** - * Evaluates a trained model. + * Evaluate a trained model. * * @param fn * a function that initializes a builder to create the @@ -1249,12 +1252,12 @@ public final CompletableFuture inferTrainedModel( // ----- Endpoint: ml.open_job /** - * Open anomaly detection jobs. An anomaly detection job must be opened in order - * for it to be ready to receive and analyze data. It can be opened and closed - * multiple times throughout its lifecycle. When you open a new job, it starts - * with an empty model. When you open an existing job, the most recent model - * state is automatically loaded. The job is ready to resume its analysis from - * where it left off, once new data is received. + * Open anomaly detection jobs. An anomaly detection job must be opened to be + * ready to receive and analyze data. It can be opened and closed multiple times + * throughout its lifecycle. When you open a new job, it starts with an empty + * model. When you open an existing job, the most recent model state is + * automatically loaded. The job is ready to resume its analysis from where it + * left off, once new data is received. * * @see Documentation @@ -1269,12 +1272,12 @@ public CompletableFuture openJob(OpenJobRequest request) { } /** - * Open anomaly detection jobs. An anomaly detection job must be opened in order - * for it to be ready to receive and analyze data. It can be opened and closed - * multiple times throughout its lifecycle. When you open a new job, it starts - * with an empty model. When you open an existing job, the most recent model - * state is automatically loaded. The job is ready to resume its analysis from - * where it left off, once new data is received. + * Open anomaly detection jobs. An anomaly detection job must be opened to be + * ready to receive and analyze data. It can be opened and closed multiple times + * throughout its lifecycle. When you open a new job, it starts with an empty + * model. When you open an existing job, the most recent model state is + * automatically loaded. The job is ready to resume its analysis from where it + * left off, once new data is received. * * @param fn * a function that initializes a builder to create the @@ -1292,7 +1295,7 @@ public final CompletableFuture openJob( // ----- Endpoint: ml.post_calendar_events /** - * Adds scheduled events to a calendar. + * Add scheduled events to the calendar. * * @see Documentation @@ -1307,7 +1310,7 @@ public CompletableFuture postCalendarEvents(PostCale } /** - * Adds scheduled events to a calendar. + * Add scheduled events to the calendar. * * @param fn * a function that initializes a builder to create the @@ -1325,7 +1328,8 @@ public final CompletableFuture postCalendarEvents( // ----- Endpoint: ml.preview_data_frame_analytics /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @see Documentation @@ -1341,7 +1345,8 @@ public CompletableFuture previewDataFrameAnal } /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @param fn * a function that initializes a builder to create the @@ -1357,7 +1362,8 @@ public final CompletableFuture previewDataFra } /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @see Documentation @@ -1372,7 +1378,7 @@ public CompletableFuture previewDataFrameAnal // ----- Endpoint: ml.preview_datafeed /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1400,7 +1406,7 @@ public CompletableFuture> preview } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1426,7 +1432,7 @@ public final CompletableFuture> p } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1454,7 +1460,7 @@ public CompletableFuture> preview } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1481,7 +1487,7 @@ public final CompletableFuture> p // ----- Endpoint: ml.put_calendar /** - * Creates a calendar. + * Create a calendar. * * @see Documentation @@ -1496,7 +1502,7 @@ public CompletableFuture putCalendar(PutCalendarRequest req } /** - * Creates a calendar. + * Create a calendar. * * @param fn * a function that initializes a builder to create the @@ -1514,7 +1520,7 @@ public final CompletableFuture putCalendar( // ----- Endpoint: ml.put_calendar_job /** - * Adds an anomaly detection job to a calendar. + * Add anomaly detection job to calendar. * * @see Documentation @@ -1529,7 +1535,7 @@ public CompletableFuture putCalendarJob(PutCalendarJobRe } /** - * Adds an anomaly detection job to a calendar. + * Add anomaly detection job to calendar. * * @param fn * a function that initializes a builder to create the @@ -1547,9 +1553,9 @@ public final CompletableFuture putCalendarJob( // ----- Endpoint: ml.put_data_frame_analytics /** - * Instantiates a data frame analytics job. This API creates a data frame - * analytics job that performs an analysis on the source indices and stores the - * outcome in a destination index. + * Create a data frame analytics job. This API creates a data frame analytics + * job that performs an analysis on the source indices and stores the outcome in + * a destination index. * * @see Documentation @@ -1565,9 +1571,9 @@ public CompletableFuture putDataFrameAnalytics( } /** - * Instantiates a data frame analytics job. This API creates a data frame - * analytics job that performs an analysis on the source indices and stores the - * outcome in a destination index. + * Create a data frame analytics job. This API creates a data frame analytics + * job that performs an analysis on the source indices and stores the outcome in + * a destination index. * * @param fn * a function that initializes a builder to create the @@ -1585,11 +1591,11 @@ public final CompletableFuture putDataFrameAnalyt // ----- Endpoint: ml.put_datafeed /** - * Instantiates a datafeed. Datafeeds retrieve data from Elasticsearch for - * analysis by an anomaly detection job. You can associate only one datafeed - * with each anomaly detection job. The datafeed contains a query that runs at a - * defined interval (frequency). If you are concerned about delayed - * data, you can add a delay + * Create a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by + * an anomaly detection job. You can associate only one datafeed with each + * anomaly detection job. The datafeed contains a query that runs at a defined + * interval (frequency). If you are concerned about delayed data, + * you can add a delay * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` * index. * @@ -1606,11 +1612,11 @@ public CompletableFuture putDatafeed(PutDatafeedRequest req } /** - * Instantiates a datafeed. Datafeeds retrieve data from Elasticsearch for - * analysis by an anomaly detection job. You can associate only one datafeed - * with each anomaly detection job. The datafeed contains a query that runs at a - * defined interval (frequency). If you are concerned about delayed - * data, you can add a delay + * Create a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by + * an anomaly detection job. You can associate only one datafeed with each + * anomaly detection job. The datafeed contains a query that runs at a defined + * interval (frequency). If you are concerned about delayed data, + * you can add a delay * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` * index. * @@ -1630,9 +1636,9 @@ public final CompletableFuture putDatafeed( // ----- Endpoint: ml.put_filter /** - * Instantiates a filter. A filter contains a list of strings. It can be used by - * one or more anomaly detection jobs. Specifically, filters are referenced in - * the custom_rules property of detector configuration objects. + * Create a filter. A filter contains a list of strings. It can be used by one + * or more anomaly detection jobs. Specifically, filters are referenced in the + * custom_rules property of detector configuration objects. * * @see Documentation @@ -1647,9 +1653,9 @@ public CompletableFuture putFilter(PutFilterRequest request) } /** - * Instantiates a filter. A filter contains a list of strings. It can be used by - * one or more anomaly detection jobs. Specifically, filters are referenced in - * the custom_rules property of detector configuration objects. + * Create a filter. A filter contains a list of strings. It can be used by one + * or more anomaly detection jobs. Specifically, filters are referenced in the + * custom_rules property of detector configuration objects. * * @param fn * a function that initializes a builder to create the @@ -1704,8 +1710,8 @@ public final CompletableFuture putJob( // ----- Endpoint: ml.put_trained_model /** - * Enables you to supply a trained model that is not created by data frame - * analytics. + * Create a trained model. Enable you to supply a trained model that is not + * created by data frame analytics. * * @see Documentation @@ -1720,8 +1726,8 @@ public CompletableFuture putTrainedModel(PutTrainedMode } /** - * Enables you to supply a trained model that is not created by data frame - * analytics. + * Create a trained model. Enable you to supply a trained model that is not + * created by data frame analytics. * * @param fn * a function that initializes a builder to create the @@ -1739,7 +1745,7 @@ public final CompletableFuture putTrainedModel( // ----- Endpoint: ml.put_trained_model_alias /** - * Creates or updates a trained model alias. A trained model alias is a logical + * Create or update a trained model alias. A trained model alias is a logical * name used to reference a single trained model. You can use aliases instead of * trained model identifiers to make it easier to reference your models. For * example, you can use aliases in inference aggregations and processors. An @@ -1766,7 +1772,7 @@ public CompletableFuture putTrainedModelAlias(PutT } /** - * Creates or updates a trained model alias. A trained model alias is a logical + * Create or update a trained model alias. A trained model alias is a logical * name used to reference a single trained model. You can use aliases instead of * trained model identifiers to make it easier to reference your models. For * example, you can use aliases in inference aggregations and processors. An @@ -1796,7 +1802,7 @@ public final CompletableFuture putTrainedModelAlia // ----- Endpoint: ml.put_trained_model_definition_part /** - * Creates part of a trained model definition. + * Create part of a trained model definition. * * @see Documentation @@ -1812,7 +1818,7 @@ public CompletableFuture putTrainedModelD } /** - * Creates part of a trained model definition. + * Create part of a trained model definition. * * @param fn * a function that initializes a builder to create the @@ -1830,7 +1836,7 @@ public final CompletableFuture putTrained // ----- Endpoint: ml.put_trained_model_vocabulary /** - * Creates a trained model vocabulary. This API is supported only for natural + * Create a trained model vocabulary. This API is supported only for natural * language processing (NLP) models. The vocabulary is stored in the index as * described in inference_config.*.vocabulary of the trained model * definition. @@ -1849,7 +1855,7 @@ public CompletableFuture putTrainedModelVocab } /** - * Creates a trained model vocabulary. This API is supported only for natural + * Create a trained model vocabulary. This API is supported only for natural * language processing (NLP) models. The vocabulary is stored in the index as * described in inference_config.*.vocabulary of the trained model * definition. @@ -1870,7 +1876,7 @@ public final CompletableFuture putTrainedMode // ----- Endpoint: ml.reset_job /** - * Resets an anomaly detection job. All model state and results are deleted. The + * Reset an anomaly detection job. All model state and results are deleted. The * job is ready to start over as if it had just been created. It is not * currently possible to reset multiple jobs using wildcards or a comma * separated list. @@ -1888,7 +1894,7 @@ public CompletableFuture resetJob(ResetJobRequest request) { } /** - * Resets an anomaly detection job. All model state and results are deleted. The + * Reset an anomaly detection job. All model state and results are deleted. The * job is ready to start over as if it had just been created. It is not * currently possible to reset multiple jobs using wildcards or a comma * separated list. @@ -1909,7 +1915,7 @@ public final CompletableFuture resetJob( // ----- Endpoint: ml.start_data_frame_analytics /** - * Starts a data frame analytics job. A data frame analytics job can be started + * Start a data frame analytics job. A data frame analytics job can be started * and stopped multiple times throughout its lifecycle. If the destination index * does not exist, it is created automatically the first time you start the data * frame analytics job. The index.number_of_shards and @@ -1935,7 +1941,7 @@ public CompletableFuture startDataFrameAnalytic } /** - * Starts a data frame analytics job. A data frame analytics job can be started + * Start a data frame analytics job. A data frame analytics job can be started * and stopped multiple times throughout its lifecycle. If the destination index * does not exist, it is created automatically the first time you start the data * frame analytics job. The index.number_of_shards and @@ -1963,7 +1969,7 @@ public final CompletableFuture startDataFrameAn // ----- Endpoint: ml.start_datafeed /** - * Starts one or more datafeeds. + * Start datafeeds. *

* A datafeed must be started in order to retrieve data from Elasticsearch. A * datafeed can be started and stopped multiple times throughout its lifecycle. @@ -1994,7 +2000,7 @@ public CompletableFuture startDatafeed(StartDatafeedReque } /** - * Starts one or more datafeeds. + * Start datafeeds. *

* A datafeed must be started in order to retrieve data from Elasticsearch. A * datafeed can be started and stopped multiple times throughout its lifecycle. @@ -2028,7 +2034,7 @@ public final CompletableFuture startDatafeed( // ----- Endpoint: ml.start_trained_model_deployment /** - * Starts a trained model deployment, which allocates the model to every machine + * Start a trained model deployment. It allocates the model to every machine * learning node. * * @see startTrainedModelD } /** - * Starts a trained model deployment, which allocates the model to every machine + * Start a trained model deployment. It allocates the model to every machine * learning node. * * @param fn @@ -2064,8 +2070,8 @@ public final CompletableFuture startTrained // ----- Endpoint: ml.stop_data_frame_analytics /** - * Stops one or more data frame analytics jobs. A data frame analytics job can - * be started and stopped multiple times throughout its lifecycle. + * Stop data frame analytics jobs. A data frame analytics job can be started and + * stopped multiple times throughout its lifecycle. * * @see Documentation @@ -2081,8 +2087,8 @@ public CompletableFuture stopDataFrameAnalytics( } /** - * Stops one or more data frame analytics jobs. A data frame analytics job can - * be started and stopped multiple times throughout its lifecycle. + * Stop data frame analytics jobs. A data frame analytics job can be started and + * stopped multiple times throughout its lifecycle. * * @param fn * a function that initializes a builder to create the @@ -2100,8 +2106,8 @@ public final CompletableFuture stopDataFrameAnal // ----- Endpoint: ml.stop_datafeed /** - * Stops one or more datafeeds. A datafeed that is stopped ceases to retrieve - * data from Elasticsearch. A datafeed can be started and stopped multiple times + * Stop datafeeds. A datafeed that is stopped ceases to retrieve data from + * Elasticsearch. A datafeed can be started and stopped multiple times * throughout its lifecycle. * * @see stopDatafeed(StopDatafeedRequest } /** - * Stops one or more datafeeds. A datafeed that is stopped ceases to retrieve - * data from Elasticsearch. A datafeed can be started and stopped multiple times + * Stop datafeeds. A datafeed that is stopped ceases to retrieve data from + * Elasticsearch. A datafeed can be started and stopped multiple times * throughout its lifecycle. * * @param fn @@ -2137,7 +2143,7 @@ public final CompletableFuture stopDatafeed( // ----- Endpoint: ml.stop_trained_model_deployment /** - * Stops a trained model deployment. + * Stop a trained model deployment. * * @see Documentation @@ -2153,7 +2159,7 @@ public CompletableFuture stopTrainedModelDep } /** - * Stops a trained model deployment. + * Stop a trained model deployment. * * @param fn * a function that initializes a builder to create the @@ -2171,7 +2177,7 @@ public final CompletableFuture stopTrainedMo // ----- Endpoint: ml.update_data_frame_analytics /** - * Updates an existing data frame analytics job. + * Update a data frame analytics job. * * @see Documentation @@ -2187,7 +2193,7 @@ public CompletableFuture updateDataFrameAnalyt } /** - * Updates an existing data frame analytics job. + * Update a data frame analytics job. * * @param fn * a function that initializes a builder to create the @@ -2205,11 +2211,11 @@ public final CompletableFuture updateDataFrame // ----- Endpoint: ml.update_datafeed /** - * Updates the properties of a datafeed. You must stop and start the datafeed - * for the changes to be applied. When Elasticsearch security features are - * enabled, your datafeed remembers which roles the user who updated it had at - * the time of the update and runs the query using those same roles. If you - * provide secondary authorization headers, those credentials are used instead. + * Update a datafeed. You must stop and start the datafeed for the changes to be + * applied. When Elasticsearch security features are enabled, your datafeed + * remembers which roles the user who updated it had at the time of the update + * and runs the query using those same roles. If you provide secondary + * authorization headers, those credentials are used instead. * * @see Documentation @@ -2224,11 +2230,11 @@ public CompletableFuture updateDatafeed(UpdateDatafeedRe } /** - * Updates the properties of a datafeed. You must stop and start the datafeed - * for the changes to be applied. When Elasticsearch security features are - * enabled, your datafeed remembers which roles the user who updated it had at - * the time of the update and runs the query using those same roles. If you - * provide secondary authorization headers, those credentials are used instead. + * Update a datafeed. You must stop and start the datafeed for the changes to be + * applied. When Elasticsearch security features are enabled, your datafeed + * remembers which roles the user who updated it had at the time of the update + * and runs the query using those same roles. If you provide secondary + * authorization headers, those credentials are used instead. * * @param fn * a function that initializes a builder to create the @@ -2246,8 +2252,8 @@ public final CompletableFuture updateDatafeed( // ----- Endpoint: ml.update_filter /** - * Updates the description of a filter, adds items, or removes items from the - * list. + * Update a filter. Updates the description of a filter, adds items, or removes + * items from the list. * * @see Documentation @@ -2262,8 +2268,8 @@ public CompletableFuture updateFilter(UpdateFilterRequest } /** - * Updates the description of a filter, adds items, or removes items from the - * list. + * Update a filter. Updates the description of a filter, adds items, or removes + * items from the list. * * @param fn * a function that initializes a builder to create the @@ -2281,7 +2287,8 @@ public final CompletableFuture updateFilter( // ----- Endpoint: ml.update_job /** - * Updates certain properties of an anomaly detection job. + * Update an anomaly detection job. Updates certain properties of an anomaly + * detection job. * * @see Documentation @@ -2296,7 +2303,8 @@ public CompletableFuture updateJob(UpdateJobRequest request) } /** - * Updates certain properties of an anomaly detection job. + * Update an anomaly detection job. Updates certain properties of an anomaly + * detection job. * * @param fn * a function that initializes a builder to create the @@ -2314,8 +2322,7 @@ public final CompletableFuture updateJob( // ----- Endpoint: ml.update_trained_model_deployment /** - * Starts a trained model deployment, which allocates the model to every machine - * learning node. + * Update a trained model deployment. * * @see Documentation @@ -2331,8 +2338,7 @@ public CompletableFuture updateTrainedMode } /** - * Starts a trained model deployment, which allocates the model to every machine - * learning node. + * Update a trained model deployment. * * @param fn * a function that initializes a builder to create the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java index 9e320ec2f..2eac026f6 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java @@ -129,7 +129,8 @@ public final CloseJobResponse closeJob(FunctionDocumentation @@ -145,7 +146,8 @@ public DeleteCalendarResponse deleteCalendar(DeleteCalendarRequest request) } /** - * Removes all scheduled events from a calendar, then deletes it. + * Delete a calendar. Removes all scheduled events from a calendar, then deletes + * it. * * @param fn * a function that initializes a builder to create the @@ -164,7 +166,7 @@ public final DeleteCalendarResponse deleteCalendar( // ----- Endpoint: ml.delete_calendar_event /** - * Deletes scheduled events from a calendar. + * Delete events from a calendar. * * @see Documentation @@ -180,7 +182,7 @@ public DeleteCalendarEventResponse deleteCalendarEvent(DeleteCalendarEventReques } /** - * Deletes scheduled events from a calendar. + * Delete events from a calendar. * * @param fn * a function that initializes a builder to create the @@ -199,7 +201,7 @@ public final DeleteCalendarEventResponse deleteCalendarEvent( // ----- Endpoint: ml.delete_calendar_job /** - * Deletes anomaly detection jobs from a calendar. + * Delete anomaly jobs from a calendar. * * @see Documentation @@ -215,7 +217,7 @@ public DeleteCalendarJobResponse deleteCalendarJob(DeleteCalendarJobRequest requ } /** - * Deletes anomaly detection jobs from a calendar. + * Delete anomaly jobs from a calendar. * * @param fn * a function that initializes a builder to create the @@ -234,7 +236,7 @@ public final DeleteCalendarJobResponse deleteCalendarJob( // ----- Endpoint: ml.delete_data_frame_analytics /** - * Deletes a data frame analytics job. + * Delete a data frame analytics job. * * @see Documentation @@ -250,7 +252,7 @@ public DeleteDataFrameAnalyticsResponse deleteDataFrameAnalytics(DeleteDataFrame } /** - * Deletes a data frame analytics job. + * Delete a data frame analytics job. * * @param fn * a function that initializes a builder to create the @@ -269,7 +271,7 @@ public final DeleteDataFrameAnalyticsResponse deleteDataFrameAnalytics( // ----- Endpoint: ml.delete_datafeed /** - * Deletes an existing datafeed. + * Delete a datafeed. * * @see Documentation @@ -285,7 +287,7 @@ public DeleteDatafeedResponse deleteDatafeed(DeleteDatafeedRequest request) } /** - * Deletes an existing datafeed. + * Delete a datafeed. * * @param fn * a function that initializes a builder to create the @@ -304,7 +306,7 @@ public final DeleteDatafeedResponse deleteDatafeed( // ----- Endpoint: ml.delete_filter /** - * Deletes a filter. If an anomaly detection job references the filter, you + * Delete a filter. If an anomaly detection job references the filter, you * cannot delete the filter. You must update or delete the job before you can * delete the filter. * @@ -321,7 +323,7 @@ public DeleteFilterResponse deleteFilter(DeleteFilterRequest request) throws IOE } /** - * Deletes a filter. If an anomaly detection job references the filter, you + * Delete a filter. If an anomaly detection job references the filter, you * cannot delete the filter. You must update or delete the job before you can * delete the filter. * @@ -385,8 +387,8 @@ public final DeleteJobResponse deleteJob(FunctionDocumentation @@ -402,8 +404,8 @@ public DeleteTrainedModelResponse deleteTrainedModel(DeleteTrainedModelRequest r } /** - * Deletes an existing trained inference model that is currently not referenced - * by an ingest pipeline. + * Delete an unreferenced trained model. The request deletes a trained inference + * model that is not referenced by an ingest pipeline. * * @param fn * a function that initializes a builder to create the @@ -422,7 +424,7 @@ public final DeleteTrainedModelResponse deleteTrainedModel( // ----- Endpoint: ml.delete_trained_model_alias /** - * Deletes a trained model alias. This API deletes an existing model alias that + * Delete a trained model alias. This API deletes an existing model alias that * refers to a trained model. If the model alias is missing or refers to a model * other than the one identified by the model_id, this API returns * an error. @@ -441,7 +443,7 @@ public DeleteTrainedModelAliasResponse deleteTrainedModelAlias(DeleteTrainedMode } /** - * Deletes a trained model alias. This API deletes an existing model alias that + * Delete a trained model alias. This API deletes an existing model alias that * refers to a trained model. If the model alias is missing or refers to a model * other than the one identified by the model_id, this API returns * an error. @@ -463,9 +465,9 @@ public final DeleteTrainedModelAliasResponse deleteTrainedModelAlias( // ----- Endpoint: ml.estimate_model_memory /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @see Documentation @@ -481,9 +483,9 @@ public EstimateModelMemoryResponse estimateModelMemory(EstimateModelMemoryReques } /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @param fn * a function that initializes a builder to create the @@ -500,9 +502,9 @@ public final EstimateModelMemoryResponse estimateModelMemory( } /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @see Documentation @@ -517,11 +519,11 @@ public EstimateModelMemoryResponse estimateModelMemory() throws IOException, Ela // ----- Endpoint: ml.evaluate_data_frame /** - * Evaluates the data frame analytics for an annotated index. The API packages - * together commonly used evaluation metrics for various types of machine - * learning features. This has been designed for use on indexes created by data - * frame analytics. Evaluation requires both a ground truth field and an - * analytics result field to be present. + * Evaluate data frame analytics. The API packages together commonly used + * evaluation metrics for various types of machine learning features. This has + * been designed for use on indexes created by data frame analytics. Evaluation + * requires both a ground truth field and an analytics result field to be + * present. * * @see Documentation @@ -537,11 +539,11 @@ public EvaluateDataFrameResponse evaluateDataFrame(EvaluateDataFrameRequest requ } /** - * Evaluates the data frame analytics for an annotated index. The API packages - * together commonly used evaluation metrics for various types of machine - * learning features. This has been designed for use on indexes created by data - * frame analytics. Evaluation requires both a ground truth field and an - * analytics result field to be present. + * Evaluate data frame analytics. The API packages together commonly used + * evaluation metrics for various types of machine learning features. This has + * been designed for use on indexes created by data frame analytics. Evaluation + * requires both a ground truth field and an analytics result field to be + * present. * * @param fn * a function that initializes a builder to create the @@ -560,14 +562,14 @@ public final EvaluateDataFrameResponse evaluateDataFrame( // ----- Endpoint: ml.flush_job /** - * Forces any buffered data to be processed by the job. The flush jobs API is - * only applicable when sending data for analysis using the post data API. - * Depending on the content of the buffer, then it might additionally calculate - * new results. Both flush and close operations are similar, however the flush - * is more efficient if you are expecting to send more data for analysis. When - * flushing, the job remains open and is available to continue analyzing data. A - * close operation additionally prunes and persists the model state to disk and - * the job must be opened again before analyzing further data. + * Force buffered data to be processed. The flush jobs API is only applicable + * when sending data for analysis using the post data API. Depending on the + * content of the buffer, then it might additionally calculate new results. Both + * flush and close operations are similar, however the flush is more efficient + * if you are expecting to send more data for analysis. When flushing, the job + * remains open and is available to continue analyzing data. A close operation + * additionally prunes and persists the model state to disk and the job must be + * opened again before analyzing further data. * * @see Documentation @@ -582,14 +584,14 @@ public FlushJobResponse flushJob(FlushJobRequest request) throws IOException, El } /** - * Forces any buffered data to be processed by the job. The flush jobs API is - * only applicable when sending data for analysis using the post data API. - * Depending on the content of the buffer, then it might additionally calculate - * new results. Both flush and close operations are similar, however the flush - * is more efficient if you are expecting to send more data for analysis. When - * flushing, the job remains open and is available to continue analyzing data. A - * close operation additionally prunes and persists the model state to disk and - * the job must be opened again before analyzing further data. + * Force buffered data to be processed. The flush jobs API is only applicable + * when sending data for analysis using the post data API. Depending on the + * content of the buffer, then it might additionally calculate new results. Both + * flush and close operations are similar, however the flush is more efficient + * if you are expecting to send more data for analysis. When flushing, the job + * remains open and is available to continue analyzing data. A close operation + * additionally prunes and persists the model state to disk and the job must be + * opened again before analyzing further data. * * @param fn * a function that initializes a builder to create the @@ -607,7 +609,7 @@ public final FlushJobResponse flushJob(FunctionDocumentation @@ -623,7 +625,7 @@ public GetCalendarEventsResponse getCalendarEvents(GetCalendarEventsRequest requ } /** - * Retrieves information about the scheduled events in calendars. + * Get info about events in calendars. * * @param fn * a function that initializes a builder to create the @@ -642,7 +644,7 @@ public final GetCalendarEventsResponse getCalendarEvents( // ----- Endpoint: ml.get_calendars /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @see Documentation @@ -657,7 +659,7 @@ public GetCalendarsResponse getCalendars(GetCalendarsRequest request) throws IOE } /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @param fn * a function that initializes a builder to create the @@ -674,7 +676,7 @@ public final GetCalendarsResponse getCalendars( } /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @see Documentation @@ -689,10 +691,9 @@ public GetCalendarsResponse getCalendars() throws IOException, ElasticsearchExce // ----- Endpoint: ml.get_data_frame_analytics /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @see Documentation @@ -708,10 +709,9 @@ public GetDataFrameAnalyticsResponse getDataFrameAnalytics(GetDataFrameAnalytics } /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @param fn * a function that initializes a builder to create the @@ -728,10 +728,9 @@ public final GetDataFrameAnalyticsResponse getDataFrameAnalytics( } /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @see Documentation @@ -746,7 +745,7 @@ public GetDataFrameAnalyticsResponse getDataFrameAnalytics() throws IOException, // ----- Endpoint: ml.get_data_frame_analytics_stats /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @see Documentation @@ -762,7 +761,7 @@ public GetDataFrameAnalyticsStatsResponse getDataFrameAnalyticsStats(GetDataFram } /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @param fn * a function that initializes a builder to create the @@ -779,7 +778,7 @@ public final GetDataFrameAnalyticsStatsResponse getDataFrameAnalyticsStats( } /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @see Documentation @@ -794,10 +793,10 @@ public GetDataFrameAnalyticsStatsResponse getDataFrameAnalyticsStats() throws IO // ----- Endpoint: ml.get_datafeed_stats /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -817,10 +816,10 @@ public GetDatafeedStatsResponse getDatafeedStats(GetDatafeedStatsRequest request } /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -841,10 +840,10 @@ public final GetDatafeedStatsResponse getDatafeedStats( } /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -863,10 +862,10 @@ public GetDatafeedStatsResponse getDatafeedStats() throws IOException, Elasticse // ----- Endpoint: ml.get_datafeeds /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -883,10 +882,10 @@ public GetDatafeedsResponse getDatafeeds(GetDatafeedsRequest request) throws IOE } /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -905,10 +904,10 @@ public final GetDatafeedsResponse getDatafeeds( } /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -925,7 +924,7 @@ public GetDatafeedsResponse getDatafeeds() throws IOException, ElasticsearchExce // ----- Endpoint: ml.get_filters /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @see Documentation @@ -940,7 +939,7 @@ public GetFiltersResponse getFilters(GetFiltersRequest request) throws IOExcepti } /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @param fn * a function that initializes a builder to create the @@ -956,7 +955,7 @@ public final GetFiltersResponse getFilters(FunctionDocumentation @@ -971,7 +970,7 @@ public GetFiltersResponse getFilters() throws IOException, ElasticsearchExceptio // ----- Endpoint: ml.get_job_stats /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @see Documentation @@ -986,7 +985,7 @@ public GetJobStatsResponse getJobStats(GetJobStatsRequest request) throws IOExce } /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @param fn * a function that initializes a builder to create the @@ -1003,7 +1002,7 @@ public final GetJobStatsResponse getJobStats( } /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @see Documentation @@ -1018,12 +1017,12 @@ public GetJobStatsResponse getJobStats() throws IOException, ElasticsearchExcept // ----- Endpoint: ml.get_jobs /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @see Documentation @@ -1038,12 +1037,12 @@ public GetJobsResponse getJobs(GetJobsRequest request) throws IOException, Elast } /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @param fn * a function that initializes a builder to create the @@ -1059,12 +1058,12 @@ public final GetJobsResponse getJobs(Function_all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @see Documentation @@ -1079,8 +1078,10 @@ public GetJobsResponse getJobs() throws IOException, ElasticsearchException { // ----- Endpoint: ml.get_overall_buckets /** - * Retrieves overall bucket results that summarize the bucket results of - * multiple anomaly detection jobs. + * Get overall bucket results. + *

+ * Retrievs overall bucket results that summarize the bucket results of multiple + * anomaly detection jobs. *

* The overall_score is calculated by combining the scores of all * the buckets within the overall bucket span. First, the maximum @@ -1111,8 +1112,10 @@ public GetOverallBucketsResponse getOverallBuckets(GetOverallBucketsRequest requ } /** - * Retrieves overall bucket results that summarize the bucket results of - * multiple anomaly detection jobs. + * Get overall bucket results. + *

+ * Retrievs overall bucket results that summarize the bucket results of multiple + * anomaly detection jobs. *

* The overall_score is calculated by combining the scores of all * the buckets within the overall bucket span. First, the maximum @@ -1146,7 +1149,7 @@ public final GetOverallBucketsResponse getOverallBuckets( // ----- Endpoint: ml.get_trained_models /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @see Documentation @@ -1162,7 +1165,7 @@ public GetTrainedModelsResponse getTrainedModels(GetTrainedModelsRequest request } /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @param fn * a function that initializes a builder to create the @@ -1179,7 +1182,7 @@ public final GetTrainedModelsResponse getTrainedModels( } /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @see Documentation @@ -1194,9 +1197,9 @@ public GetTrainedModelsResponse getTrainedModels() throws IOException, Elasticse // ----- Endpoint: ml.get_trained_models_stats /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @see Documentation @@ -1212,9 +1215,9 @@ public GetTrainedModelsStatsResponse getTrainedModelsStats(GetTrainedModelsStats } /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @param fn * a function that initializes a builder to create the @@ -1231,9 +1234,9 @@ public final GetTrainedModelsStatsResponse getTrainedModelsStats( } /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @see Documentation @@ -1248,7 +1251,7 @@ public GetTrainedModelsStatsResponse getTrainedModelsStats() throws IOException, // ----- Endpoint: ml.infer_trained_model /** - * Evaluates a trained model. + * Evaluate a trained model. * * @see Documentation @@ -1264,7 +1267,7 @@ public InferTrainedModelResponse inferTrainedModel(InferTrainedModelRequest requ } /** - * Evaluates a trained model. + * Evaluate a trained model. * * @param fn * a function that initializes a builder to create the @@ -1283,12 +1286,12 @@ public final InferTrainedModelResponse inferTrainedModel( // ----- Endpoint: ml.open_job /** - * Open anomaly detection jobs. An anomaly detection job must be opened in order - * for it to be ready to receive and analyze data. It can be opened and closed - * multiple times throughout its lifecycle. When you open a new job, it starts - * with an empty model. When you open an existing job, the most recent model - * state is automatically loaded. The job is ready to resume its analysis from - * where it left off, once new data is received. + * Open anomaly detection jobs. An anomaly detection job must be opened to be + * ready to receive and analyze data. It can be opened and closed multiple times + * throughout its lifecycle. When you open a new job, it starts with an empty + * model. When you open an existing job, the most recent model state is + * automatically loaded. The job is ready to resume its analysis from where it + * left off, once new data is received. * * @see Documentation @@ -1303,12 +1306,12 @@ public OpenJobResponse openJob(OpenJobRequest request) throws IOException, Elast } /** - * Open anomaly detection jobs. An anomaly detection job must be opened in order - * for it to be ready to receive and analyze data. It can be opened and closed - * multiple times throughout its lifecycle. When you open a new job, it starts - * with an empty model. When you open an existing job, the most recent model - * state is automatically loaded. The job is ready to resume its analysis from - * where it left off, once new data is received. + * Open anomaly detection jobs. An anomaly detection job must be opened to be + * ready to receive and analyze data. It can be opened and closed multiple times + * throughout its lifecycle. When you open a new job, it starts with an empty + * model. When you open an existing job, the most recent model state is + * automatically loaded. The job is ready to resume its analysis from where it + * left off, once new data is received. * * @param fn * a function that initializes a builder to create the @@ -1326,7 +1329,7 @@ public final OpenJobResponse openJob(FunctionDocumentation @@ -1342,7 +1345,7 @@ public PostCalendarEventsResponse postCalendarEvents(PostCalendarEventsRequest r } /** - * Adds scheduled events to a calendar. + * Add scheduled events to the calendar. * * @param fn * a function that initializes a builder to create the @@ -1361,7 +1364,8 @@ public final PostCalendarEventsResponse postCalendarEvents( // ----- Endpoint: ml.preview_data_frame_analytics /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @see Documentation @@ -1377,7 +1381,8 @@ public PreviewDataFrameAnalyticsResponse previewDataFrameAnalytics(PreviewDataFr } /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @param fn * a function that initializes a builder to create the @@ -1394,7 +1399,8 @@ public final PreviewDataFrameAnalyticsResponse previewDataFrameAnalytics( } /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @see Documentation @@ -1409,7 +1415,7 @@ public PreviewDataFrameAnalyticsResponse previewDataFrameAnalytics() throws IOEx // ----- Endpoint: ml.preview_datafeed /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1437,7 +1443,7 @@ public PreviewDatafeedResponse previewDatafeed(PreviewDat } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1463,7 +1469,7 @@ public final PreviewDatafeedResponse previewDatafeed( } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1491,7 +1497,7 @@ public PreviewDatafeedResponse previewDatafeed(PreviewDat } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1519,7 +1525,7 @@ public final PreviewDatafeedResponse previewDatafeed( // ----- Endpoint: ml.put_calendar /** - * Creates a calendar. + * Create a calendar. * * @see Documentation @@ -1534,7 +1540,7 @@ public PutCalendarResponse putCalendar(PutCalendarRequest request) throws IOExce } /** - * Creates a calendar. + * Create a calendar. * * @param fn * a function that initializes a builder to create the @@ -1553,7 +1559,7 @@ public final PutCalendarResponse putCalendar( // ----- Endpoint: ml.put_calendar_job /** - * Adds an anomaly detection job to a calendar. + * Add anomaly detection job to calendar. * * @see Documentation @@ -1569,7 +1575,7 @@ public PutCalendarJobResponse putCalendarJob(PutCalendarJobRequest request) } /** - * Adds an anomaly detection job to a calendar. + * Add anomaly detection job to calendar. * * @param fn * a function that initializes a builder to create the @@ -1588,9 +1594,9 @@ public final PutCalendarJobResponse putCalendarJob( // ----- Endpoint: ml.put_data_frame_analytics /** - * Instantiates a data frame analytics job. This API creates a data frame - * analytics job that performs an analysis on the source indices and stores the - * outcome in a destination index. + * Create a data frame analytics job. This API creates a data frame analytics + * job that performs an analysis on the source indices and stores the outcome in + * a destination index. * * @see Documentation @@ -1606,9 +1612,9 @@ public PutDataFrameAnalyticsResponse putDataFrameAnalytics(PutDataFrameAnalytics } /** - * Instantiates a data frame analytics job. This API creates a data frame - * analytics job that performs an analysis on the source indices and stores the - * outcome in a destination index. + * Create a data frame analytics job. This API creates a data frame analytics + * job that performs an analysis on the source indices and stores the outcome in + * a destination index. * * @param fn * a function that initializes a builder to create the @@ -1627,11 +1633,11 @@ public final PutDataFrameAnalyticsResponse putDataFrameAnalytics( // ----- Endpoint: ml.put_datafeed /** - * Instantiates a datafeed. Datafeeds retrieve data from Elasticsearch for - * analysis by an anomaly detection job. You can associate only one datafeed - * with each anomaly detection job. The datafeed contains a query that runs at a - * defined interval (frequency). If you are concerned about delayed - * data, you can add a delay + * Create a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by + * an anomaly detection job. You can associate only one datafeed with each + * anomaly detection job. The datafeed contains a query that runs at a defined + * interval (frequency). If you are concerned about delayed data, + * you can add a delay * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` * index. * @@ -1648,11 +1654,11 @@ public PutDatafeedResponse putDatafeed(PutDatafeedRequest request) throws IOExce } /** - * Instantiates a datafeed. Datafeeds retrieve data from Elasticsearch for - * analysis by an anomaly detection job. You can associate only one datafeed - * with each anomaly detection job. The datafeed contains a query that runs at a - * defined interval (frequency). If you are concerned about delayed - * data, you can add a delay + * Create a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by + * an anomaly detection job. You can associate only one datafeed with each + * anomaly detection job. The datafeed contains a query that runs at a defined + * interval (frequency). If you are concerned about delayed data, + * you can add a delay * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` * index. * @@ -1673,9 +1679,9 @@ public final PutDatafeedResponse putDatafeed( // ----- Endpoint: ml.put_filter /** - * Instantiates a filter. A filter contains a list of strings. It can be used by - * one or more anomaly detection jobs. Specifically, filters are referenced in - * the custom_rules property of detector configuration objects. + * Create a filter. A filter contains a list of strings. It can be used by one + * or more anomaly detection jobs. Specifically, filters are referenced in the + * custom_rules property of detector configuration objects. * * @see Documentation @@ -1690,9 +1696,9 @@ public PutFilterResponse putFilter(PutFilterRequest request) throws IOException, } /** - * Instantiates a filter. A filter contains a list of strings. It can be used by - * one or more anomaly detection jobs. Specifically, filters are referenced in - * the custom_rules property of detector configuration objects. + * Create a filter. A filter contains a list of strings. It can be used by one + * or more anomaly detection jobs. Specifically, filters are referenced in the + * custom_rules property of detector configuration objects. * * @param fn * a function that initializes a builder to create the @@ -1747,8 +1753,8 @@ public final PutJobResponse putJob(FunctionDocumentation @@ -1764,8 +1770,8 @@ public PutTrainedModelResponse putTrainedModel(PutTrainedModelRequest request) } /** - * Enables you to supply a trained model that is not created by data frame - * analytics. + * Create a trained model. Enable you to supply a trained model that is not + * created by data frame analytics. * * @param fn * a function that initializes a builder to create the @@ -1784,7 +1790,7 @@ public final PutTrainedModelResponse putTrainedModel( // ----- Endpoint: ml.put_trained_model_alias /** - * Creates or updates a trained model alias. A trained model alias is a logical + * Create or update a trained model alias. A trained model alias is a logical * name used to reference a single trained model. You can use aliases instead of * trained model identifiers to make it easier to reference your models. For * example, you can use aliases in inference aggregations and processors. An @@ -1812,7 +1818,7 @@ public PutTrainedModelAliasResponse putTrainedModelAlias(PutTrainedModelAliasReq } /** - * Creates or updates a trained model alias. A trained model alias is a logical + * Create or update a trained model alias. A trained model alias is a logical * name used to reference a single trained model. You can use aliases instead of * trained model identifiers to make it easier to reference your models. For * example, you can use aliases in inference aggregations and processors. An @@ -1843,7 +1849,7 @@ public final PutTrainedModelAliasResponse putTrainedModelAlias( // ----- Endpoint: ml.put_trained_model_definition_part /** - * Creates part of a trained model definition. + * Create part of a trained model definition. * * @see Documentation @@ -1859,7 +1865,7 @@ public PutTrainedModelDefinitionPartResponse putTrainedModelDefinitionPart( } /** - * Creates part of a trained model definition. + * Create part of a trained model definition. * * @param fn * a function that initializes a builder to create the @@ -1878,7 +1884,7 @@ public final PutTrainedModelDefinitionPartResponse putTrainedModelDefinitionPart // ----- Endpoint: ml.put_trained_model_vocabulary /** - * Creates a trained model vocabulary. This API is supported only for natural + * Create a trained model vocabulary. This API is supported only for natural * language processing (NLP) models. The vocabulary is stored in the index as * described in inference_config.*.vocabulary of the trained model * definition. @@ -1897,7 +1903,7 @@ public PutTrainedModelVocabularyResponse putTrainedModelVocabulary(PutTrainedMod } /** - * Creates a trained model vocabulary. This API is supported only for natural + * Create a trained model vocabulary. This API is supported only for natural * language processing (NLP) models. The vocabulary is stored in the index as * described in inference_config.*.vocabulary of the trained model * definition. @@ -1919,7 +1925,7 @@ public final PutTrainedModelVocabularyResponse putTrainedModelVocabulary( // ----- Endpoint: ml.reset_job /** - * Resets an anomaly detection job. All model state and results are deleted. The + * Reset an anomaly detection job. All model state and results are deleted. The * job is ready to start over as if it had just been created. It is not * currently possible to reset multiple jobs using wildcards or a comma * separated list. @@ -1937,7 +1943,7 @@ public ResetJobResponse resetJob(ResetJobRequest request) throws IOException, El } /** - * Resets an anomaly detection job. All model state and results are deleted. The + * Reset an anomaly detection job. All model state and results are deleted. The * job is ready to start over as if it had just been created. It is not * currently possible to reset multiple jobs using wildcards or a comma * separated list. @@ -1958,7 +1964,7 @@ public final ResetJobResponse resetJob(Functionindex.number_of_shards and @@ -1984,7 +1990,7 @@ public StartDataFrameAnalyticsResponse startDataFrameAnalytics(StartDataFrameAna } /** - * Starts a data frame analytics job. A data frame analytics job can be started + * Start a data frame analytics job. A data frame analytics job can be started * and stopped multiple times throughout its lifecycle. If the destination index * does not exist, it is created automatically the first time you start the data * frame analytics job. The index.number_of_shards and @@ -2013,7 +2019,7 @@ public final StartDataFrameAnalyticsResponse startDataFrameAnalytics( // ----- Endpoint: ml.start_datafeed /** - * Starts one or more datafeeds. + * Start datafeeds. *

* A datafeed must be started in order to retrieve data from Elasticsearch. A * datafeed can be started and stopped multiple times throughout its lifecycle. @@ -2045,7 +2051,7 @@ public StartDatafeedResponse startDatafeed(StartDatafeedRequest request) } /** - * Starts one or more datafeeds. + * Start datafeeds. *

* A datafeed must be started in order to retrieve data from Elasticsearch. A * datafeed can be started and stopped multiple times throughout its lifecycle. @@ -2080,7 +2086,7 @@ public final StartDatafeedResponse startDatafeed( // ----- Endpoint: ml.start_trained_model_deployment /** - * Starts a trained model deployment, which allocates the model to every machine + * Start a trained model deployment. It allocates the model to every machine * learning node. * * @see Documentation @@ -2134,8 +2140,8 @@ public StopDataFrameAnalyticsResponse stopDataFrameAnalytics(StopDataFrameAnalyt } /** - * Stops one or more data frame analytics jobs. A data frame analytics job can - * be started and stopped multiple times throughout its lifecycle. + * Stop data frame analytics jobs. A data frame analytics job can be started and + * stopped multiple times throughout its lifecycle. * * @param fn * a function that initializes a builder to create the @@ -2154,8 +2160,8 @@ public final StopDataFrameAnalyticsResponse stopDataFrameAnalytics( // ----- Endpoint: ml.stop_datafeed /** - * Stops one or more datafeeds. A datafeed that is stopped ceases to retrieve - * data from Elasticsearch. A datafeed can be started and stopped multiple times + * Stop datafeeds. A datafeed that is stopped ceases to retrieve data from + * Elasticsearch. A datafeed can be started and stopped multiple times * throughout its lifecycle. * * @see Documentation @@ -2208,7 +2214,7 @@ public StopTrainedModelDeploymentResponse stopTrainedModelDeployment(StopTrained } /** - * Stops a trained model deployment. + * Stop a trained model deployment. * * @param fn * a function that initializes a builder to create the @@ -2227,7 +2233,7 @@ public final StopTrainedModelDeploymentResponse stopTrainedModelDeployment( // ----- Endpoint: ml.update_data_frame_analytics /** - * Updates an existing data frame analytics job. + * Update a data frame analytics job. * * @see Documentation @@ -2243,7 +2249,7 @@ public UpdateDataFrameAnalyticsResponse updateDataFrameAnalytics(UpdateDataFrame } /** - * Updates an existing data frame analytics job. + * Update a data frame analytics job. * * @param fn * a function that initializes a builder to create the @@ -2262,11 +2268,11 @@ public final UpdateDataFrameAnalyticsResponse updateDataFrameAnalytics( // ----- Endpoint: ml.update_datafeed /** - * Updates the properties of a datafeed. You must stop and start the datafeed - * for the changes to be applied. When Elasticsearch security features are - * enabled, your datafeed remembers which roles the user who updated it had at - * the time of the update and runs the query using those same roles. If you - * provide secondary authorization headers, those credentials are used instead. + * Update a datafeed. You must stop and start the datafeed for the changes to be + * applied. When Elasticsearch security features are enabled, your datafeed + * remembers which roles the user who updated it had at the time of the update + * and runs the query using those same roles. If you provide secondary + * authorization headers, those credentials are used instead. * * @see Documentation @@ -2282,11 +2288,11 @@ public UpdateDatafeedResponse updateDatafeed(UpdateDatafeedRequest request) } /** - * Updates the properties of a datafeed. You must stop and start the datafeed - * for the changes to be applied. When Elasticsearch security features are - * enabled, your datafeed remembers which roles the user who updated it had at - * the time of the update and runs the query using those same roles. If you - * provide secondary authorization headers, those credentials are used instead. + * Update a datafeed. You must stop and start the datafeed for the changes to be + * applied. When Elasticsearch security features are enabled, your datafeed + * remembers which roles the user who updated it had at the time of the update + * and runs the query using those same roles. If you provide secondary + * authorization headers, those credentials are used instead. * * @param fn * a function that initializes a builder to create the @@ -2305,8 +2311,8 @@ public final UpdateDatafeedResponse updateDatafeed( // ----- Endpoint: ml.update_filter /** - * Updates the description of a filter, adds items, or removes items from the - * list. + * Update a filter. Updates the description of a filter, adds items, or removes + * items from the list. * * @see Documentation @@ -2321,8 +2327,8 @@ public UpdateFilterResponse updateFilter(UpdateFilterRequest request) throws IOE } /** - * Updates the description of a filter, adds items, or removes items from the - * list. + * Update a filter. Updates the description of a filter, adds items, or removes + * items from the list. * * @param fn * a function that initializes a builder to create the @@ -2341,7 +2347,8 @@ public final UpdateFilterResponse updateFilter( // ----- Endpoint: ml.update_job /** - * Updates certain properties of an anomaly detection job. + * Update an anomaly detection job. Updates certain properties of an anomaly + * detection job. * * @see Documentation @@ -2356,7 +2363,8 @@ public UpdateJobResponse updateJob(UpdateJobRequest request) throws IOException, } /** - * Updates certain properties of an anomaly detection job. + * Update an anomaly detection job. Updates certain properties of an anomaly + * detection job. * * @param fn * a function that initializes a builder to create the @@ -2374,8 +2382,7 @@ public final UpdateJobResponse updateJob(FunctionDocumentation @@ -2391,8 +2398,7 @@ public UpdateTrainedModelDeploymentResponse updateTrainedModelDeployment( } /** - * Starts a trained model deployment, which allocates the model to every machine - * learning node. + * Update a trained model deployment. * * @param fn * a function that initializes a builder to create the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java index 1b126a9d5..9f9d1d7e9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java @@ -58,9 +58,9 @@ // typedef: ml.estimate_model_memory.Request /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java index 529e09874..e410019d9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java @@ -57,11 +57,11 @@ // typedef: ml.evaluate_data_frame.Request /** - * Evaluates the data frame analytics for an annotated index. The API packages - * together commonly used evaluation metrics for various types of machine - * learning features. This has been designed for use on indexes created by data - * frame analytics. Evaluation requires both a ground truth field and an - * analytics result field to be present. + * Evaluate data frame analytics. The API packages together commonly used + * evaluation metrics for various types of machine learning features. This has + * been designed for use on indexes created by data frame analytics. Evaluation + * requires both a ground truth field and an analytics result field to be + * present. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java index 8c36c7ccb..dd33103fe 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java @@ -60,14 +60,14 @@ // typedef: ml.flush_job.Request /** - * Forces any buffered data to be processed by the job. The flush jobs API is - * only applicable when sending data for analysis using the post data API. - * Depending on the content of the buffer, then it might additionally calculate - * new results. Both flush and close operations are similar, however the flush - * is more efficient if you are expecting to send more data for analysis. When - * flushing, the job remains open and is available to continue analyzing data. A - * close operation additionally prunes and persists the model state to disk and - * the job must be opened again before analyzing further data. + * Force buffered data to be processed. The flush jobs API is only applicable + * when sending data for analysis using the post data API. Depending on the + * content of the buffer, then it might additionally calculate new results. Both + * flush and close operations are similar, however the flush is more efficient + * if you are expecting to send more data for analysis. When flushing, the job + * remains open and is available to continue analyzing data. A close operation + * additionally prunes and persists the model state to disk and the job must be + * opened again before analyzing further data. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java index 502335144..ae515543d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java @@ -57,7 +57,7 @@ // typedef: ml.get_calendar_events.Request /** - * Retrieves information about the scheduled events in calendars. + * Get info about events in calendars. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java index 77d997fb9..d72bf26ee 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java @@ -57,7 +57,7 @@ // typedef: ml.get_calendars.Request /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java index f90d2bf6f..f95b5a1fd 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java @@ -56,10 +56,9 @@ // typedef: ml.get_data_frame_analytics.Request /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java index 8dac370bd..e3fffbd1b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java @@ -56,7 +56,7 @@ // typedef: ml.get_data_frame_analytics_stats.Request /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java index 77b2dd2c9..96b2667b5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java @@ -58,10 +58,10 @@ // typedef: ml.get_datafeed_stats.Request /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java index 2c3464dcd..1d316b5ad 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java @@ -58,10 +58,10 @@ // typedef: ml.get_datafeeds.Request /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java index d7b2388cf..a140b57a8 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java @@ -58,7 +58,7 @@ // typedef: ml.get_filters.Request /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java index 5fe10de5a..025900dac 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java @@ -55,7 +55,7 @@ // typedef: ml.get_job_stats.Request /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java index f42898708..790c1a1b4 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java @@ -58,12 +58,12 @@ // typedef: ml.get_jobs.Request /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java index 0e0639ff8..205e34852 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java @@ -62,8 +62,10 @@ // typedef: ml.get_overall_buckets.Request /** - * Retrieves overall bucket results that summarize the bucket results of - * multiple anomaly detection jobs. + * Get overall bucket results. + *

+ * Retrievs overall bucket results that summarize the bucket results of multiple + * anomaly detection jobs. *

* The overall_score is calculated by combining the scores of all * the buckets within the overall bucket span. First, the maximum diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java index 0b1ab0cc1..31d96413d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java @@ -59,7 +59,7 @@ // typedef: ml.get_trained_models.Request /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java index 2d53ddc0b..503c29688 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java @@ -59,9 +59,9 @@ // typedef: ml.get_trained_models_stats.Request /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java index e4f670aac..76adfd83d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java @@ -60,7 +60,7 @@ // typedef: ml.infer_trained_model.Request /** - * Evaluates a trained model. + * Evaluate a trained model. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferenceResponseResult.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferenceResponseResult.java index 63b857ce1..1b229c7a3 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferenceResponseResult.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferenceResponseResult.java @@ -69,7 +69,7 @@ public class InferenceResponseResult implements JsonpSerializable { @Nullable private final Boolean isTruncated; - private final List predictedValue; + private final List> predictedValue; @Nullable private final String predictedValueSequence; @@ -139,7 +139,7 @@ public final Boolean isTruncated() { *

* API name: {@code predicted_value} */ - public final List predictedValue() { + public final List> predictedValue() { return this.predictedValue; } @@ -233,8 +233,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (ApiTypeHelper.isDefined(this.predictedValue)) { generator.writeKey("predicted_value"); generator.writeStartArray(); - for (FieldValue item0 : this.predictedValue) { - item0.serialize(generator, mapper); + for (List item0 : this.predictedValue) { + generator.writeStartArray(); + if (item0 != null) { + for (FieldValue item1 : item0) { + item1.serialize(generator, mapper); + + } + } + generator.writeEnd(); } generator.writeEnd(); @@ -304,7 +311,7 @@ public static class Builder extends WithJsonObjectBuilderBase private Boolean isTruncated; @Nullable - private List predictedValue; + private List> predictedValue; @Nullable private String predictedValueSequence; @@ -386,7 +393,7 @@ public final Builder isTruncated(@Nullable Boolean value) { *

* Adds all elements of list to predictedValue. */ - public final Builder predictedValue(List list) { + public final Builder predictedValue(List> list) { this.predictedValue = _listAddAll(this.predictedValue, list); return this; } @@ -404,28 +411,11 @@ public final Builder predictedValue(List list) { *

* Adds one or more values to predictedValue. */ - public final Builder predictedValue(FieldValue value, FieldValue... values) { + public final Builder predictedValue(List value, List... values) { this.predictedValue = _listAdd(this.predictedValue, value, values); return this; } - /** - * If the model is trained for a text classification or zero shot classification - * task, the response is the predicted class. For named entity recognition (NER) - * tasks, it contains the annotated text output. For fill mask tasks, it - * contains the top prediction for replacing the mask token. For text embedding - * tasks, it contains the raw numerical text embedding values. For regression - * models, its a numerical value For classification models, it may be an - * integer, double, boolean or string depending on prediction type - *

- * API name: {@code predicted_value} - *

- * Adds a value to predictedValue using a builder lambda. - */ - public final Builder predictedValue(Function> fn) { - return predictedValue(fn.apply(new FieldValue.Builder()).build()); - } - /** * For fill mask tasks, the response contains the input text sequence with the * mask token replaced by the predicted value. Additionally @@ -576,7 +566,8 @@ protected static void setupInferenceResponseResultDeserializer( op.add(Builder::entities, JsonpDeserializer.arrayDeserializer(TrainedModelEntities._DESERIALIZER), "entities"); op.add(Builder::isTruncated, JsonpDeserializer.booleanDeserializer(), "is_truncated"); - op.add(Builder::predictedValue, JsonpDeserializer.arrayDeserializer(FieldValue._DESERIALIZER), + op.add(Builder::predictedValue, + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.arrayDeserializer(FieldValue._DESERIALIZER)), "predicted_value"); op.add(Builder::predictedValueSequence, JsonpDeserializer.stringDeserializer(), "predicted_value_sequence"); op.add(Builder::predictionProbability, JsonpDeserializer.doubleDeserializer(), "prediction_probability"); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java index 06d0eed2d..05ff426f3 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java @@ -59,12 +59,12 @@ // typedef: ml.open_job.Request /** - * Open anomaly detection jobs. An anomaly detection job must be opened in order - * for it to be ready to receive and analyze data. It can be opened and closed - * multiple times throughout its lifecycle. When you open a new job, it starts - * with an empty model. When you open an existing job, the most recent model - * state is automatically loaded. The job is ready to resume its analysis from - * where it left off, once new data is received. + * Open anomaly detection jobs. An anomaly detection job must be opened to be + * ready to receive and analyze data. It can be opened and closed multiple times + * throughout its lifecycle. When you open a new job, it starts with an empty + * model. When you open an existing job, the most recent model state is + * automatically loaded. The job is ready to resume its analysis from where it + * left off, once new data is received. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java index 1466adc61..891b044be 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java @@ -59,7 +59,7 @@ // typedef: ml.post_calendar_events.Request /** - * Adds scheduled events to a calendar. + * Add scheduled events to the calendar. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java index 5925cbd97..564caa85a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java @@ -58,7 +58,8 @@ // typedef: ml.preview_data_frame_analytics.Request /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java index 695097c5f..a82cac241 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java @@ -57,7 +57,7 @@ // typedef: ml.preview_datafeed.Request /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java index 7f7015320..7d83c284f 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java @@ -58,7 +58,7 @@ // typedef: ml.put_calendar_job.Request /** - * Adds an anomaly detection job to a calendar. + * Add anomaly detection job to calendar. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java index 931c1285f..42d8c9681 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java @@ -59,7 +59,7 @@ // typedef: ml.put_calendar.Request /** - * Creates a calendar. + * Create a calendar. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java index b592f2e29..850e50251 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java @@ -61,9 +61,9 @@ // typedef: ml.put_data_frame_analytics.Request /** - * Instantiates a data frame analytics job. This API creates a data frame - * analytics job that performs an analysis on the source indices and stores the - * outcome in a destination index. + * Create a data frame analytics job. This API creates a data frame analytics + * job that performs an analysis on the source indices and stores the outcome in + * a destination index. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java index 1f2a23d37..15a9fc453 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java @@ -68,11 +68,11 @@ // typedef: ml.put_datafeed.Request /** - * Instantiates a datafeed. Datafeeds retrieve data from Elasticsearch for - * analysis by an anomaly detection job. You can associate only one datafeed - * with each anomaly detection job. The datafeed contains a query that runs at a - * defined interval (frequency). If you are concerned about delayed - * data, you can add a delay + * Create a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by + * an anomaly detection job. You can associate only one datafeed with each + * anomaly detection job. The datafeed contains a query that runs at a defined + * interval (frequency). If you are concerned about delayed data, + * you can add a delay * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` * index. * diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java index 410124696..94b1847de 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java @@ -59,9 +59,9 @@ // typedef: ml.put_filter.Request /** - * Instantiates a filter. A filter contains a list of strings. It can be used by - * one or more anomaly detection jobs. Specifically, filters are referenced in - * the custom_rules property of detector configuration objects. + * Create a filter. A filter contains a list of strings. It can be used by one + * or more anomaly detection jobs. Specifically, filters are referenced in the + * custom_rules property of detector configuration objects. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java index d5cf42412..4e0a44d8b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java @@ -56,7 +56,7 @@ // typedef: ml.put_trained_model_alias.Request /** - * Creates or updates a trained model alias. A trained model alias is a logical + * Create or update a trained model alias. A trained model alias is a logical * name used to reference a single trained model. You can use aliases instead of * trained model identifiers to make it easier to reference your models. For * example, you can use aliases in inference aggregations and processors. An diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java index cf1884af4..10630e94b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java @@ -60,7 +60,7 @@ // typedef: ml.put_trained_model_definition_part.Request /** - * Creates part of a trained model definition. + * Create part of a trained model definition. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java index 4c17d7248..05fd389fc 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java @@ -63,8 +63,8 @@ // typedef: ml.put_trained_model.Request /** - * Enables you to supply a trained model that is not created by data frame - * analytics. + * Create a trained model. Enable you to supply a trained model that is not + * created by data frame analytics. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java index 04b60e764..a53878fd5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java @@ -60,7 +60,7 @@ // typedef: ml.put_trained_model_vocabulary.Request /** - * Creates a trained model vocabulary. This API is supported only for natural + * Create a trained model vocabulary. This API is supported only for natural * language processing (NLP) models. The vocabulary is stored in the index as * described in inference_config.*.vocabulary of the trained model * definition. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java index 6e8a6bf9d..c14419d73 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java @@ -56,7 +56,7 @@ // typedef: ml.reset_job.Request /** - * Resets an anomaly detection job. All model state and results are deleted. The + * Reset an anomaly detection job. All model state and results are deleted. The * job is ready to start over as if it had just been created. It is not * currently possible to reset multiple jobs using wildcards or a comma * separated list. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java index af88160e1..eae117834 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java @@ -56,7 +56,7 @@ // typedef: ml.start_data_frame_analytics.Request /** - * Starts a data frame analytics job. A data frame analytics job can be started + * Start a data frame analytics job. A data frame analytics job can be started * and stopped multiple times throughout its lifecycle. If the destination index * does not exist, it is created automatically the first time you start the data * frame analytics job. The index.number_of_shards and diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java index 9e5f06e5f..5dd7e4487 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java @@ -60,7 +60,7 @@ // typedef: ml.start_datafeed.Request /** - * Starts one or more datafeeds. + * Start datafeeds. *

* A datafeed must be started in order to retrieve data from Elasticsearch. A * datafeed can be started and stopped multiple times throughout its lifecycle. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java index 695b6ea56..515e7b3c3 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java @@ -57,7 +57,7 @@ // typedef: ml.start_trained_model_deployment.Request /** - * Starts a trained model deployment, which allocates the model to every machine + * Start a trained model deployment. It allocates the model to every machine * learning node. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java index 08d8d12db..6fc33948c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java @@ -60,8 +60,8 @@ // typedef: ml.stop_datafeed.Request /** - * Stops one or more datafeeds. A datafeed that is stopped ceases to retrieve - * data from Elasticsearch. A datafeed can be started and stopped multiple times + * Stop datafeeds. A datafeed that is stopped ceases to retrieve data from + * Elasticsearch. A datafeed can be started and stopped multiple times * throughout its lifecycle. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java index 2d5c8d8a7..7e35541a7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java @@ -56,7 +56,7 @@ // typedef: ml.stop_trained_model_deployment.Request /** - * Stops a trained model deployment. + * Stop a trained model deployment. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentStats.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentStats.java index 8207c697f..1169dff4e 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentStats.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentStats.java @@ -33,6 +33,7 @@ import java.lang.Integer; import java.lang.Long; import java.lang.String; +import java.util.List; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -75,7 +76,7 @@ public class TrainedModelDeploymentStats implements JsonpSerializable { private final String modelId; - private final TrainedModelDeploymentNodesStats nodes; + private final List nodes; private final int numberOfAllocations; @@ -103,7 +104,7 @@ private TrainedModelDeploymentStats(Builder builder) { this.errorCount = ApiTypeHelper.requireNonNull(builder.errorCount, this, "errorCount"); this.inferenceCount = ApiTypeHelper.requireNonNull(builder.inferenceCount, this, "inferenceCount"); this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); - this.nodes = ApiTypeHelper.requireNonNull(builder.nodes, this, "nodes"); + this.nodes = ApiTypeHelper.unmodifiableRequired(builder.nodes, this, "nodes"); this.numberOfAllocations = ApiTypeHelper.requireNonNull(builder.numberOfAllocations, this, "numberOfAllocations"); this.queueCapacity = ApiTypeHelper.requireNonNull(builder.queueCapacity, this, "queueCapacity"); @@ -184,7 +185,7 @@ public final String modelId() { *

* API name: {@code nodes} */ - public final TrainedModelDeploymentNodesStats nodes() { + public final List nodes() { return this.nodes; } @@ -298,9 +299,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("model_id"); generator.write(this.modelId); - generator.writeKey("nodes"); - this.nodes.serialize(generator, mapper); + if (ApiTypeHelper.isDefined(this.nodes)) { + generator.writeKey("nodes"); + generator.writeStartArray(); + for (TrainedModelDeploymentNodesStats item0 : this.nodes) { + item0.serialize(generator, mapper); + } + generator.writeEnd(); + + } generator.writeKey("number_of_allocations"); generator.write(this.numberOfAllocations); @@ -353,7 +361,7 @@ public static class Builder extends WithJsonObjectBuilderBase private String modelId; - private TrainedModelDeploymentNodesStats nodes; + private List nodes; private Integer numberOfAllocations; @@ -447,9 +455,11 @@ public final Builder modelId(String value) { * node. *

* API name: {@code nodes} + *

+ * Adds all elements of list to nodes. */ - public final Builder nodes(TrainedModelDeploymentNodesStats value) { - this.nodes = value; + public final Builder nodes(List list) { + this.nodes = _listAddAll(this.nodes, list); return this; } @@ -459,10 +469,26 @@ public final Builder nodes(TrainedModelDeploymentNodesStats value) { * node. *

* API name: {@code nodes} + *

+ * Adds one or more values to nodes. + */ + public final Builder nodes(TrainedModelDeploymentNodesStats value, TrainedModelDeploymentNodesStats... values) { + this.nodes = _listAdd(this.nodes, value, values); + return this; + } + + /** + * Required - The deployment stats for each node that currently has the model + * allocated. In serverless, stats are reported for a single unnamed virtual + * node. + *

+ * API name: {@code nodes} + *

+ * Adds a value to nodes using a builder lambda. */ public final Builder nodes( Function> fn) { - return this.nodes(fn.apply(new TrainedModelDeploymentNodesStats.Builder()).build()); + return nodes(fn.apply(new TrainedModelDeploymentNodesStats.Builder()).build()); } /** @@ -587,7 +613,8 @@ protected static void setupTrainedModelDeploymentStatsDeserializer( op.add(Builder::errorCount, JsonpDeserializer.integerDeserializer(), "error_count"); op.add(Builder::inferenceCount, JsonpDeserializer.integerDeserializer(), "inference_count"); op.add(Builder::modelId, JsonpDeserializer.stringDeserializer(), "model_id"); - op.add(Builder::nodes, TrainedModelDeploymentNodesStats._DESERIALIZER, "nodes"); + op.add(Builder::nodes, JsonpDeserializer.arrayDeserializer(TrainedModelDeploymentNodesStats._DESERIALIZER), + "nodes"); op.add(Builder::numberOfAllocations, JsonpDeserializer.integerDeserializer(), "number_of_allocations"); op.add(Builder::queueCapacity, JsonpDeserializer.integerDeserializer(), "queue_capacity"); op.add(Builder::rejectedExecutionCount, JsonpDeserializer.integerDeserializer(), "rejected_execution_count"); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelInferenceStats.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelInferenceStats.java index f22ba270c..3cdbec9a9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelInferenceStats.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelInferenceStats.java @@ -27,14 +27,13 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.DateTime; import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; +import java.lang.Long; import java.util.Objects; import java.util.function.Function; -import javax.annotation.Nullable; //---------------------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. @@ -69,7 +68,7 @@ public class TrainedModelInferenceStats implements JsonpSerializable { private final int missingAllFieldsCount; - private final DateTime timestamp; + private final long timestamp; // --------------------------------------------------------------------------------------------- @@ -135,7 +134,7 @@ public final int missingAllFieldsCount() { *

* API name: {@code timestamp} */ - public final DateTime timestamp() { + public final long timestamp() { return this.timestamp; } @@ -163,7 +162,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.missingAllFieldsCount); generator.writeKey("timestamp"); - this.timestamp.serialize(generator, mapper); + generator.write(this.timestamp); } @@ -189,7 +188,7 @@ public static class Builder extends WithJsonObjectBuilderBase private Integer missingAllFieldsCount; - private DateTime timestamp; + private Long timestamp; /** * Required - The number of times the model was loaded for inference and was not @@ -242,7 +241,7 @@ public final Builder missingAllFieldsCount(int value) { *

* API name: {@code timestamp} */ - public final Builder timestamp(DateTime value) { + public final Builder timestamp(long value) { this.timestamp = value; return this; } @@ -280,7 +279,7 @@ protected static void setupTrainedModelInferenceStatsDeserializer( op.add(Builder::failureCount, JsonpDeserializer.integerDeserializer(), "failure_count"); op.add(Builder::inferenceCount, JsonpDeserializer.integerDeserializer(), "inference_count"); op.add(Builder::missingAllFieldsCount, JsonpDeserializer.integerDeserializer(), "missing_all_fields_count"); - op.add(Builder::timestamp, DateTime._DESERIALIZER, "timestamp"); + op.add(Builder::timestamp, JsonpDeserializer.longDeserializer(), "timestamp"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelSizeStats.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelSizeStats.java index 12fe840d6..e2ad33d65 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelSizeStats.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelSizeStats.java @@ -30,7 +30,6 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; -import java.lang.Integer; import java.lang.String; import java.util.Objects; import java.util.function.Function; @@ -62,7 +61,7 @@ public class TrainedModelSizeStats implements JsonpSerializable { private final String modelSizeBytes; - private final int requiredNativeMemoryBytes; + private final String requiredNativeMemoryBytes; // --------------------------------------------------------------------------------------------- @@ -92,7 +91,7 @@ public final String modelSizeBytes() { *

* API name: {@code required_native_memory_bytes} */ - public final int requiredNativeMemoryBytes() { + public final String requiredNativeMemoryBytes() { return this.requiredNativeMemoryBytes; } @@ -131,7 +130,7 @@ public static class Builder extends WithJsonObjectBuilderBase ObjectBuilder { private String modelSizeBytes; - private Integer requiredNativeMemoryBytes; + private String requiredNativeMemoryBytes; /** * Required - The size of the model in bytes. @@ -148,7 +147,7 @@ public final Builder modelSizeBytes(String value) { *

* API name: {@code required_native_memory_bytes} */ - public final Builder requiredNativeMemoryBytes(int value) { + public final Builder requiredNativeMemoryBytes(String value) { this.requiredNativeMemoryBytes = value; return this; } @@ -182,7 +181,7 @@ public TrainedModelSizeStats build() { protected static void setupTrainedModelSizeStatsDeserializer(ObjectDeserializer op) { op.add(Builder::modelSizeBytes, JsonpDeserializer.stringDeserializer(), "model_size_bytes"); - op.add(Builder::requiredNativeMemoryBytes, JsonpDeserializer.integerDeserializer(), + op.add(Builder::requiredNativeMemoryBytes, JsonpDeserializer.stringDeserializer(), "required_native_memory_bytes"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java index 85657f097..ae28dd5d8 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java @@ -60,7 +60,7 @@ // typedef: ml.update_data_frame_analytics.Request /** - * Updates an existing data frame analytics job. + * Update a data frame analytics job. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java index 219244e61..f502d7243 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java @@ -68,11 +68,11 @@ // typedef: ml.update_datafeed.Request /** - * Updates the properties of a datafeed. You must stop and start the datafeed - * for the changes to be applied. When Elasticsearch security features are - * enabled, your datafeed remembers which roles the user who updated it had at - * the time of the update and runs the query using those same roles. If you - * provide secondary authorization headers, those credentials are used instead. + * Update a datafeed. You must stop and start the datafeed for the changes to be + * applied. When Elasticsearch security features are enabled, your datafeed + * remembers which roles the user who updated it had at the time of the update + * and runs the query using those same roles. If you provide secondary + * authorization headers, those credentials are used instead. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java index a8817b7ad..6be77d51b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java @@ -59,8 +59,8 @@ // typedef: ml.update_filter.Request /** - * Updates the description of a filter, adds items, or removes items from the - * list. + * Update a filter. Updates the description of a filter, adds items, or removes + * items from the list. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java index b68496da0..1c0f308c0 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java @@ -63,7 +63,8 @@ // typedef: ml.update_job.Request /** - * Updates certain properties of an anomaly detection job. + * Update an anomaly detection job. Updates certain properties of an anomaly + * detection job. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateTrainedModelDeploymentRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateTrainedModelDeploymentRequest.java index 7a35ee534..61c818a59 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateTrainedModelDeploymentRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateTrainedModelDeploymentRequest.java @@ -59,8 +59,7 @@ // typedef: ml.update_trained_model_deployment.Request /** - * Starts a trained model deployment, which allocates the model to every machine - * learning node. + * Update a trained model deployment. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/query_rules/QueryRuleType.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/query_rules/QueryRuleType.java index 3ee3d4434..c96ecda28 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/query_rules/QueryRuleType.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/query_rules/QueryRuleType.java @@ -48,6 +48,8 @@ public enum QueryRuleType implements JsonEnum { Pinned("pinned"), + Exclude("exclude"), + ; private final String jsonValue; diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java index 6f3f2ece0..f1a8037d5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java @@ -50,12 +50,14 @@ // typedef: security.authenticate.Request /** - * Enables you to submit a request with a basic auth header to authenticate a - * user and retrieve information about the authenticated user. A successful call - * returns a JSON structure that shows user information such as their username, - * the roles that are assigned to the user, any assigned metadata, and - * information about the realms that authenticated and authorized the user. If - * the user cannot be authenticated, this API returns a 401 status code. + * Authenticate a user. Authenticates a user and returns information about the + * authenticated user. Include the user information in a + * basic + * auth header. A successful call returns a JSON structure that shows user + * information such as their username, the roles that are assigned to the user, + * any assigned metadata, and information about the realms that authenticated + * and authorized the user. If the user cannot be authenticated, this API + * returns a 401 status code. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java index e4823b8b9..c2f678172 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java @@ -61,11 +61,12 @@ // typedef: security.create_api_key.Request /** - * Creates an API key for access without requiring basic authentication. A - * successful request returns a JSON structure that contains the API key, its - * unique id, and its name. If applicable, it also returns expiration - * information for the API key in milliseconds. NOTE: By default, API keys never - * expire. You can specify expiration information when you create the API keys. + * Create an API key. Creates an API key for access without requiring basic + * authentication. A successful request returns a JSON structure that contains + * the API key, its unique id, and its name. If applicable, it also returns + * expiration information for the API key in milliseconds. NOTE: By default, API + * keys never expire. You can specify expiration information when you create the + * API keys. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java index d584bcb5b..cfbe6da89 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java @@ -70,12 +70,14 @@ public ElasticsearchSecurityAsyncClient withTransportOptions(@Nullable Transport // ----- Endpoint: security.authenticate /** - * Enables you to submit a request with a basic auth header to authenticate a - * user and retrieve information about the authenticated user. A successful call - * returns a JSON structure that shows user information such as their username, - * the roles that are assigned to the user, any assigned metadata, and - * information about the realms that authenticated and authorized the user. If - * the user cannot be authenticated, this API returns a 401 status code. + * Authenticate a user. Authenticates a user and returns information about the + * authenticated user. Include the user information in a + * basic + * auth header. A successful call returns a JSON structure that shows user + * information such as their username, the roles that are assigned to the user, + * any assigned metadata, and information about the realms that authenticated + * and authorized the user. If the user cannot be authenticated, this API + * returns a 401 status code. * * @see Documentation @@ -89,11 +91,12 @@ public CompletableFuture authenticate() { // ----- Endpoint: security.create_api_key /** - * Creates an API key for access without requiring basic authentication. A - * successful request returns a JSON structure that contains the API key, its - * unique id, and its name. If applicable, it also returns expiration - * information for the API key in milliseconds. NOTE: By default, API keys never - * expire. You can specify expiration information when you create the API keys. + * Create an API key. Creates an API key for access without requiring basic + * authentication. A successful request returns a JSON structure that contains + * the API key, its unique id, and its name. If applicable, it also returns + * expiration information for the API key in milliseconds. NOTE: By default, API + * keys never expire. You can specify expiration information when you create the + * API keys. * * @see Documentation @@ -108,11 +111,12 @@ public CompletableFuture createApiKey(CreateApiKeyRequest } /** - * Creates an API key for access without requiring basic authentication. A - * successful request returns a JSON structure that contains the API key, its - * unique id, and its name. If applicable, it also returns expiration - * information for the API key in milliseconds. NOTE: By default, API keys never - * expire. You can specify expiration information when you create the API keys. + * Create an API key. Creates an API key for access without requiring basic + * authentication. A successful request returns a JSON structure that contains + * the API key, its unique id, and its name. If applicable, it also returns + * expiration information for the API key in milliseconds. NOTE: By default, API + * keys never expire. You can specify expiration information when you create the + * API keys. * * @param fn * a function that initializes a builder to create the @@ -128,11 +132,12 @@ public final CompletableFuture createApiKey( } /** - * Creates an API key for access without requiring basic authentication. A - * successful request returns a JSON structure that contains the API key, its - * unique id, and its name. If applicable, it also returns expiration - * information for the API key in milliseconds. NOTE: By default, API keys never - * expire. You can specify expiration information when you create the API keys. + * Create an API key. Creates an API key for access without requiring basic + * authentication. A successful request returns a JSON structure that contains + * the API key, its unique id, and its name. If applicable, it also returns + * expiration information for the API key in milliseconds. NOTE: By default, API + * keys never expire. You can specify expiration information when you create the + * API keys. * * @see Documentation @@ -147,12 +152,12 @@ public CompletableFuture createApiKey() { // ----- Endpoint: security.get_api_key /** - * Retrieves information for one or more API keys. NOTE: If you have only the - * manage_own_api_key privilege, this API returns only the API keys - * that you own. If you have read_security, - * manage_api_key or greater privileges (including - * manage_security), this API returns all API keys regardless of - * ownership. + * Get API key information. Retrieves information for one or more API keys. + * NOTE: If you have only the manage_own_api_key privilege, this + * API returns only the API keys that you own. If you have + * read_security, manage_api_key or greater privileges + * (including manage_security), this API returns all API keys + * regardless of ownership. * * @see Documentation @@ -167,12 +172,12 @@ public CompletableFuture getApiKey(GetApiKeyRequest request) } /** - * Retrieves information for one or more API keys. NOTE: If you have only the - * manage_own_api_key privilege, this API returns only the API keys - * that you own. If you have read_security, - * manage_api_key or greater privileges (including - * manage_security), this API returns all API keys regardless of - * ownership. + * Get API key information. Retrieves information for one or more API keys. + * NOTE: If you have only the manage_own_api_key privilege, this + * API returns only the API keys that you own. If you have + * read_security, manage_api_key or greater privileges + * (including manage_security), this API returns all API keys + * regardless of ownership. * * @param fn * a function that initializes a builder to create the @@ -188,12 +193,12 @@ public final CompletableFuture getApiKey( } /** - * Retrieves information for one or more API keys. NOTE: If you have only the - * manage_own_api_key privilege, this API returns only the API keys - * that you own. If you have read_security, - * manage_api_key or greater privileges (including - * manage_security), this API returns all API keys regardless of - * ownership. + * Get API key information. Retrieves information for one or more API keys. + * NOTE: If you have only the manage_own_api_key privilege, this + * API returns only the API keys that you own. If you have + * read_security, manage_api_key or greater privileges + * (including manage_security), this API returns all API keys + * regardless of ownership. * * @see Documentation @@ -208,7 +213,8 @@ public CompletableFuture getApiKey() { // ----- Endpoint: security.has_privileges /** - * Determines whether the specified user has a specified list of privileges. + * Check user privileges. Determines whether the specified user has a specified + * list of privileges. * * @see Documentation @@ -223,7 +229,8 @@ public CompletableFuture hasPrivileges(HasPrivilegesReque } /** - * Determines whether the specified user has a specified list of privileges. + * Check user privileges. Determines whether the specified user has a specified + * list of privileges. * * @param fn * a function that initializes a builder to create the @@ -239,7 +246,8 @@ public final CompletableFuture hasPrivileges( } /** - * Determines whether the specified user has a specified list of privileges. + * Check user privileges. Determines whether the specified user has a specified + * list of privileges. * * @see Documentation @@ -254,11 +262,11 @@ public CompletableFuture hasPrivileges() { // ----- Endpoint: security.invalidate_api_key /** - * Invalidates one or more API keys. The manage_api_key privilege - * allows deleting any API keys. The manage_own_api_key only allows - * deleting API keys that are owned by the user. In addition, with the - * manage_own_api_key privilege, an invalidation request must be - * issued in one of the three formats: + * Invalidate API keys. Invalidates one or more API keys. The + * manage_api_key privilege allows deleting any API keys. The + * manage_own_api_key only allows deleting API keys that are owned + * by the user. In addition, with the manage_own_api_key privilege, + * an invalidation request must be issued in one of the three formats: *