From 72a2f6ec6f43b3b17fe7939bce05e190dd4b70f7 Mon Sep 17 00:00:00 2001 From: Mpdreamz Date: Wed, 12 May 2021 18:15:39 +0000 Subject: [PATCH] [codegen] master synchronization --- .../Core/security.enroll_node.json | 24 +++++++++++++ .../RestSpecification/Core/termsenum.json | 35 +++++++++++++++++++ .../RequestParameters.NoNamespace.cs | 5 +++ .../RequestParameters.Security.cs | 5 +++ .../ElasticLowLevelClient.NoNamespace.cs | 15 ++++++++ .../ElasticLowLevelClient.Security.cs | 9 +++++ .../IElasticLowLevelClient.Generated.cs | 14 ++++++++ 7 files changed, 107 insertions(+) create mode 100644 src/ApiGenerator/RestSpecification/Core/security.enroll_node.json create mode 100644 src/ApiGenerator/RestSpecification/Core/termsenum.json diff --git a/src/ApiGenerator/RestSpecification/Core/security.enroll_node.json b/src/ApiGenerator/RestSpecification/Core/security.enroll_node.json new file mode 100644 index 00000000000..e01a88b22de --- /dev/null +++ b/src/ApiGenerator/RestSpecification/Core/security.enroll_node.json @@ -0,0 +1,24 @@ +{ + "security.enroll_node":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-enroll-node.html", + "description":"Allows a new node to enroll to an existing cluster with security enabled." + }, + "stability":"stable", + "visibility":"public", + "headers":{ + "accept": [ "application/json"], + "content_type": ["application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_security/enroll_node", + "methods":[ + "GET" + ] + } + ] + } + } +} diff --git a/src/ApiGenerator/RestSpecification/Core/termsenum.json b/src/ApiGenerator/RestSpecification/Core/termsenum.json new file mode 100644 index 00000000000..8d66107dac3 --- /dev/null +++ b/src/ApiGenerator/RestSpecification/Core/termsenum.json @@ -0,0 +1,35 @@ +{ + "termsenum":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html", + "description": "The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios." + }, + "stability":"beta", + "visibility":"public", + "headers":{ + "accept": [ "application/json"], + "content_type": ["application/json"] + }, + "url":{ + "paths":[ + { + "path": "/{index}/_terms_enum", + "methods": [ + "GET", + "POST" + ], + "parts": { + "index": { + "type": "list", + "description": "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices" + } + } + } + ] + }, + "params":{}, + "body":{ + "description":"field name, string which is the prefix expected in matching terms, timeout and size for max number of results" + } + } +} diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs index 0fd24708ab3..d2e44620228 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs @@ -1972,6 +1972,11 @@ public bool? TypedKeys } } + ///Request options for Termsenum https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html + public class TermsenumRequestParameters : RequestParameters + { + } + ///Request options for TermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html public class TermVectorsRequestParameters : RequestParameters { diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs index 06f12705ce5..bde21dbebf8 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs @@ -204,6 +204,11 @@ public Refresh? Refresh } } + ///Request options for EnrollNode https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-enroll-node.html + public class EnrollNodeRequestParameters : RequestParameters + { + } + ///Request options for GetApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html public class GetApiKeyRequestParameters : RequestParameters { diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs index 268bb3a2e51..b545ad4f188 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs @@ -1001,6 +1001,21 @@ public TResponse SearchTemplate(string index, PostData body, SearchTe [MapsApi("search_template", "index, body")] public Task SearchTemplateAsync(string index, PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, ITransportResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search/template"), ctx, body, RequestParams(requestParameters)); + ///POST on /{index}/_terms_enum https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html + ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices + ///field name, string which is the prefix expected in matching terms, timeout and size for max number of results + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + public TResponse Termsenum(string index, PostData body, TermsenumRequestParameters requestParameters = null) + where TResponse : class, ITransportResponse, new() => DoRequest(POST, Url($"{index:index}/_terms_enum"), body, RequestParams(requestParameters)); + ///POST on /{index}/_terms_enum https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html + ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices + ///field name, string which is the prefix expected in matching terms, timeout and size for max number of results + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + [MapsApi("termsenum", "index, body")] + public Task TermsenumAsync(string index, PostData body, TermsenumRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, ITransportResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_terms_enum"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_termvectors/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The id of the document, when not specified a doc param should be supplied. diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs index 8a85ff7117d..c8d38cbd5aa 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs @@ -278,6 +278,15 @@ public TResponse EnableUser(string username, EnableUserRequestParamet [MapsApi("security.enable_user", "username")] public Task EnableUserAsync(string username, EnableUserRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, ITransportResponse, new() => DoRequestAsync(PUT, Url($"_security/user/{username:username}/_enable"), ctx, null, RequestParams(requestParameters)); + ///GET on /_security/enroll_node https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-enroll-node.html + ///Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse EnrollNode(EnrollNodeRequestParameters requestParameters = null) + where TResponse : class, ITransportResponse, new() => DoRequest(GET, "_security/enroll_node", null, RequestParams(requestParameters)); + ///GET on /_security/enroll_node https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-enroll-node.html + ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.enroll_node", "")] + public Task EnrollNodeAsync(EnrollNodeRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, ITransportResponse, new() => DoRequestAsync(GET, "_security/enroll_node", ctx, null, RequestParams(requestParameters)); ///GET on /_security/api_key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse GetApiKey(GetApiKeyRequestParameters requestParameters = null) diff --git a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs index 38338ee6c81..e1b3d21cecc 100644 --- a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs +++ b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs @@ -834,6 +834,20 @@ TResponse SearchTemplate(string index, PostData body, SearchTemplateR ///Request specific configuration such as querystring parameters & request specific connection settings. Task SearchTemplateAsync(string index, PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, ITransportResponse, new(); + ///POST on /{index}/_terms_enum https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html + ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices + ///field name, string which is the prefix expected in matching terms, timeout and size for max number of results + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + TResponse Termsenum(string index, PostData body, TermsenumRequestParameters requestParameters = null) + where TResponse : class, ITransportResponse, new(); + ///POST on /{index}/_terms_enum https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html + ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices + ///field name, string which is the prefix expected in matching terms, timeout and size for max number of results + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + Task TermsenumAsync(string index, PostData body, TermsenumRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, ITransportResponse, new(); ///POST on /{index}/_termvectors/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The id of the document, when not specified a doc param should be supplied.