diff --git a/.ci/test-matrix.yml b/.ci/test-matrix.yml index 6e8bd79c3d4..57d90418091 100755 --- a/.ci/test-matrix.yml +++ b/.ci/test-matrix.yml @@ -1,13 +1,13 @@ --- STACK_VERSION: - - 7.x-SNAPSHOT + - 7.12.0-SNAPSHOT TEST_SUITE: - free - platinum DOTNET_VERSION: - - 5.0.103 + - 5.0.103 exclude: ~ diff --git a/src/ApiGenerator/Domain/ApiQueryParametersPatcher.cs b/src/ApiGenerator/Domain/ApiQueryParametersPatcher.cs index 86014b61d85..27d003abbe8 100644 --- a/src/ApiGenerator/Domain/ApiQueryParametersPatcher.cs +++ b/src/ApiGenerator/Domain/ApiQueryParametersPatcher.cs @@ -65,8 +65,8 @@ private static string CreateCSharpName(string queryStringKey, string endpointNam { if (string.IsNullOrWhiteSpace(queryStringKey)) return "UNKNOWN"; - if (queryStringKey == "format" && endpointName == "ml.find_file_structure") - return "MachineLearningFindFileStructureFormat"; + if (queryStringKey == "format" && endpointName == "text_structure.find_structure") + return "TextStructureFindStructureFormat"; var cased = queryStringKey.ToPascalCase(); switch (cased) diff --git a/src/ApiGenerator/RestSpecification/Core/indices.close.json b/src/ApiGenerator/RestSpecification/Core/indices.close.json index 0738216d1ee..00900819924 100644 --- a/src/ApiGenerator/RestSpecification/Core/indices.close.json +++ b/src/ApiGenerator/RestSpecification/Core/indices.close.json @@ -56,7 +56,7 @@ }, "wait_for_active_shards":{ "type":"string", - "description":"Sets the number of active shards to wait for before the operation returns." + "description":"Sets the number of active shards to wait for before the operation returns. Set to `index-setting` to wait according to the index setting `index.write.wait_for_active_shards`, or `all` to wait for all shards, or an integer. Defaults to `0`." } } } diff --git a/src/ApiGenerator/RestSpecification/Core/search.json b/src/ApiGenerator/RestSpecification/Core/search.json index 4db4f0e3b7c..d127b188c77 100644 --- a/src/ApiGenerator/RestSpecification/Core/search.json +++ b/src/ApiGenerator/RestSpecification/Core/search.json @@ -248,6 +248,10 @@ "type":"boolean", "description":"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default":false + }, + "min_compatible_shard_node":{ + "type":"string", + "description":"The minimum compatible version that all shards involved in search should have for this request to be successful" } }, "body":{ diff --git a/src/ApiGenerator/RestSpecification/Core/snapshot.get_features.json b/src/ApiGenerator/RestSpecification/Core/snapshot.get_features.json new file mode 100644 index 00000000000..76b340d329d --- /dev/null +++ b/src/ApiGenerator/RestSpecification/Core/snapshot.get_features.json @@ -0,0 +1,29 @@ +{ + "snapshot.get_features":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", + "description":"Returns a list of features which can be snapshotted in this cluster." + }, + "stability":"stable", + "visibility":"public", + "headers":{ + "accept": [ "application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_snapshottable_features", + "methods":[ + "GET" + ] + } + ] + }, + "params":{ + "master_timeout":{ + "type":"time", + "description":"Explicit operation timeout for connection to master node" + } + } + } +} diff --git a/src/ApiGenerator/RestSpecification/XPack/autoscaling.delete_autoscaling_policy.json b/src/ApiGenerator/RestSpecification/XPack/autoscaling.delete_autoscaling_policy.json index 9b2f363077d..7ddb1f1caf8 100644 --- a/src/ApiGenerator/RestSpecification/XPack/autoscaling.delete_autoscaling_policy.json +++ b/src/ApiGenerator/RestSpecification/XPack/autoscaling.delete_autoscaling_policy.json @@ -2,11 +2,10 @@ "autoscaling.delete_autoscaling_policy":{ "documentation":{ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html", - "description":"Deletes an autoscaling policy." + "description":"Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported." }, - "stability":"experimental", - "visibility":"feature_flag", - "feature_flag":"es.autoscaling_feature_flag_registered", + "stability":"stable", + "visibility":"public", "headers":{ "accept": [ "application/json"] }, diff --git a/src/ApiGenerator/RestSpecification/XPack/autoscaling.get_autoscaling_capacity.json b/src/ApiGenerator/RestSpecification/XPack/autoscaling.get_autoscaling_capacity.json index 76275fa9bcd..795507edfcc 100644 --- a/src/ApiGenerator/RestSpecification/XPack/autoscaling.get_autoscaling_capacity.json +++ b/src/ApiGenerator/RestSpecification/XPack/autoscaling.get_autoscaling_capacity.json @@ -2,11 +2,10 @@ "autoscaling.get_autoscaling_capacity":{ "documentation":{ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html", - "description": "Gets the current autoscaling capacity based on the configured autoscaling policy." + "description": "Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported." }, - "stability":"experimental", - "visibility":"feature_flag", - "feature_flag":"es.autoscaling_feature_flag_registered", + "stability":"stable", + "visibility":"public", "headers":{ "accept": [ "application/json"] }, diff --git a/src/ApiGenerator/RestSpecification/XPack/autoscaling.get_autoscaling_policy.json b/src/ApiGenerator/RestSpecification/XPack/autoscaling.get_autoscaling_policy.json index e71bb131dc5..e76df1ec25e 100644 --- a/src/ApiGenerator/RestSpecification/XPack/autoscaling.get_autoscaling_policy.json +++ b/src/ApiGenerator/RestSpecification/XPack/autoscaling.get_autoscaling_policy.json @@ -2,11 +2,10 @@ "autoscaling.get_autoscaling_policy":{ "documentation":{ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html", - "description": "Retrieves an autoscaling policy." + "description": "Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported." }, - "stability":"experimental", - "visibility":"feature_flag", - "feature_flag":"es.autoscaling_feature_flag_registered", + "stability":"stable", + "visibility":"public", "headers":{ "accept": [ "application/json"] }, diff --git a/src/ApiGenerator/RestSpecification/XPack/autoscaling.put_autoscaling_policy.json b/src/ApiGenerator/RestSpecification/XPack/autoscaling.put_autoscaling_policy.json index 2eac19c8c69..b51904a1bf1 100644 --- a/src/ApiGenerator/RestSpecification/XPack/autoscaling.put_autoscaling_policy.json +++ b/src/ApiGenerator/RestSpecification/XPack/autoscaling.put_autoscaling_policy.json @@ -2,11 +2,10 @@ "autoscaling.put_autoscaling_policy":{ "documentation":{ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html", - "description": "Creates a new autoscaling policy." + "description": "Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported." }, - "stability":"experimental", - "visibility":"feature_flag", - "feature_flag":"es.autoscaling_feature_flag_registered", + "stability":"stable", + "visibility":"public", "headers":{ "accept": [ "application/json"], "content_type": ["application/json"] diff --git a/src/ApiGenerator/RestSpecification/XPack/eql.get_status.json b/src/ApiGenerator/RestSpecification/XPack/eql.get_status.json new file mode 100644 index 00000000000..be8a4398933 --- /dev/null +++ b/src/ApiGenerator/RestSpecification/XPack/eql.get_status.json @@ -0,0 +1,31 @@ +{ + "eql.get_status": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html", + "description": "Returns the status of a previously submitted async or stored Event Query Language (EQL) search" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": [ + "application/json" + ] + }, + "url": { + "paths": [ + { + "path": "/_eql/search/status/{id}", + "methods": [ + "GET" + ], + "parts": { + "id": { + "type": "string", + "description": "The async search ID" + } + } + } + ] + } + } +} diff --git a/src/ApiGenerator/RestSpecification/XPack/logstash.delete_pipeline.json b/src/ApiGenerator/RestSpecification/XPack/logstash.delete_pipeline.json new file mode 100644 index 00000000000..8650f5f7cac --- /dev/null +++ b/src/ApiGenerator/RestSpecification/XPack/logstash.delete_pipeline.json @@ -0,0 +1,28 @@ +{ + "logstash.delete_pipeline":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html", + "description":"Deletes Logstash Pipelines used by Central Management" + }, + "stability":"stable", + "visibility":"public", + "headers":{ + "accept": [ "application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_logstash/pipeline/{id}", + "methods":[ "DELETE" ], + "parts":{ + "id":{ + "type":"string", + "description":"The ID of the Pipeline" + } + } + } + ] + }, + "params":{} + } +} diff --git a/src/ApiGenerator/RestSpecification/XPack/logstash.get_pipeline.json b/src/ApiGenerator/RestSpecification/XPack/logstash.get_pipeline.json new file mode 100644 index 00000000000..061e49e0290 --- /dev/null +++ b/src/ApiGenerator/RestSpecification/XPack/logstash.get_pipeline.json @@ -0,0 +1,28 @@ +{ + "logstash.get_pipeline":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html", + "description":"Retrieves Logstash Pipelines used by Central Management" + }, + "stability":"stable", + "visibility":"public", + "headers":{ + "accept": [ "application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_logstash/pipeline/{id}", + "methods":[ "GET" ], + "parts":{ + "id":{ + "type":"string", + "description":"A comma-separated list of Pipeline IDs" + } + } + } + ] + }, + "params":{} + } +} diff --git a/src/ApiGenerator/RestSpecification/XPack/logstash.put_pipeline.json b/src/ApiGenerator/RestSpecification/XPack/logstash.put_pipeline.json new file mode 100644 index 00000000000..e8ec9b0d991 --- /dev/null +++ b/src/ApiGenerator/RestSpecification/XPack/logstash.put_pipeline.json @@ -0,0 +1,34 @@ +{ + "logstash.put_pipeline":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html", + "description":"Adds and updates Logstash Pipelines used for Central Management" + }, + "stability":"stable", + "visibility":"public", + "headers":{ + "accept": [ "application/json"], + "content_type": ["application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_logstash/pipeline/{id}", + "methods":[ "PUT" ], + "parts":{ + "id":{ + "type":"string", + "description":"The ID of the Pipeline" + } + } + } + ] + }, + "params":{ + }, + "body":{ + "description":"The Pipeline to add or update", + "required":true + } + } +} diff --git a/src/ApiGenerator/RestSpecification/XPack/searchable_snapshots.mount.json b/src/ApiGenerator/RestSpecification/XPack/searchable_snapshots.mount.json index a7a127feef5..61cff6a67b1 100644 --- a/src/ApiGenerator/RestSpecification/XPack/searchable_snapshots.mount.json +++ b/src/ApiGenerator/RestSpecification/XPack/searchable_snapshots.mount.json @@ -39,6 +39,11 @@ "type":"boolean", "description":"Should this request wait until the operation has completed before returning", "default":false + }, + "storage":{ + "type":"string", + "description":"Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy`", + "default":false } }, "body":{ diff --git a/src/ApiGenerator/RestSpecification/XPack/searchable_snapshots.stats.json b/src/ApiGenerator/RestSpecification/XPack/searchable_snapshots.stats.json index 2063d417bd1..23c6953ff3b 100644 --- a/src/ApiGenerator/RestSpecification/XPack/searchable_snapshots.stats.json +++ b/src/ApiGenerator/RestSpecification/XPack/searchable_snapshots.stats.json @@ -30,6 +30,18 @@ } } ] + }, + "params": { + "level":{ + "type":"enum", + "description":"Return stats aggregated at cluster, index or shard level", + "options":[ + "cluster", + "indices", + "shards" + ], + "default":"indices" + } } } } diff --git a/src/ApiGenerator/RestSpecification/XPack/ml.find_file_structure.json b/src/ApiGenerator/RestSpecification/XPack/text_structure.find_structure.json similarity index 96% rename from src/ApiGenerator/RestSpecification/XPack/ml.find_file_structure.json rename to src/ApiGenerator/RestSpecification/XPack/text_structure.find_structure.json index 1eae145d0d4..934bc7859e4 100644 --- a/src/ApiGenerator/RestSpecification/XPack/ml.find_file_structure.json +++ b/src/ApiGenerator/RestSpecification/XPack/text_structure.find_structure.json @@ -1,7 +1,7 @@ { - "ml.find_file_structure":{ + "text_structure.find_structure":{ "documentation":{ - "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html", + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html", "description":"Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch." }, "stability":"experimental", @@ -13,7 +13,7 @@ "url":{ "paths":[ { - "path":"/_ml/find_file_structure", + "path":"/_text_structure/find_structure", "methods":[ "POST" ] diff --git a/src/ApiGenerator/last_downloaded_version.txt b/src/ApiGenerator/last_downloaded_version.txt index b2343a0c853..13634b2c782 100644 --- a/src/ApiGenerator/last_downloaded_version.txt +++ b/src/ApiGenerator/last_downloaded_version.txt @@ -1 +1 @@ -c5c9c1b14918f852399c86da53181f4b6a82e948 \ No newline at end of file +61c3b8cb7bf3e410ee21657756f079ea035d15f5 \ No newline at end of file diff --git a/src/Elasticsearch.Net/Api/Enums.Generated.cs b/src/Elasticsearch.Net/Api/Enums.Generated.cs index e94851cd175..0fff5cce418 100644 --- a/src/Elasticsearch.Net/Api/Enums.Generated.cs +++ b/src/Elasticsearch.Net/Api/Enums.Generated.cs @@ -411,19 +411,6 @@ public enum IndicesShardStoresStatus All } - [StringEnum] - public enum MachineLearningFindFileStructureFormat - { - [EnumMember(Value = "ndjson")] - Ndjson, - [EnumMember(Value = "xml")] - Xml, - [EnumMember(Value = "delimited")] - Delimited, - [EnumMember(Value = "semi_structured_text")] - SemiStructuredText - } - [StringEnum] public enum ThreadType { @@ -446,6 +433,19 @@ public enum GroupBy None } + [StringEnum] + public enum TextStructureFindStructureFormat + { + [EnumMember(Value = "ndjson")] + Ndjson, + [EnumMember(Value = "xml")] + Xml, + [EnumMember(Value = "delimited")] + Delimited, + [EnumMember(Value = "semi_structured_text")] + SemiStructuredText + } + public static class KnownEnums { private static readonly ConcurrentDictionary> EnumStringResolvers = new ConcurrentDictionary>(); @@ -474,9 +474,9 @@ static KnownEnums() EnumStringResolvers.TryAdd(typeof(Conflicts), (e) => GetStringValue((Conflicts)e)); EnumStringResolvers.TryAdd(typeof(OpType), (e) => GetStringValue((OpType)e)); EnumStringResolvers.TryAdd(typeof(IndicesShardStoresStatus), (e) => GetStringValue((IndicesShardStoresStatus)e)); - EnumStringResolvers.TryAdd(typeof(MachineLearningFindFileStructureFormat), (e) => GetStringValue((MachineLearningFindFileStructureFormat)e)); EnumStringResolvers.TryAdd(typeof(ThreadType), (e) => GetStringValue((ThreadType)e)); EnumStringResolvers.TryAdd(typeof(GroupBy), (e) => GetStringValue((GroupBy)e)); + EnumStringResolvers.TryAdd(typeof(TextStructureFindStructureFormat), (e) => GetStringValue((TextStructureFindStructureFormat)e)); } private class EnumDictionary : Dictionary @@ -947,23 +947,6 @@ public static string GetStringValue(this IndicesShardStoresStatus enumValue) throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'IndicesShardStoresStatus'"); } - public static string GetStringValue(this MachineLearningFindFileStructureFormat enumValue) - { - switch (enumValue) - { - case MachineLearningFindFileStructureFormat.Ndjson: - return "ndjson"; - case MachineLearningFindFileStructureFormat.Xml: - return "xml"; - case MachineLearningFindFileStructureFormat.Delimited: - return "delimited"; - case MachineLearningFindFileStructureFormat.SemiStructuredText: - return "semi_structured_text"; - } - - throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'MachineLearningFindFileStructureFormat'"); - } - public static string GetStringValue(this ThreadType enumValue) { switch (enumValue) @@ -994,6 +977,23 @@ public static string GetStringValue(this GroupBy enumValue) throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'GroupBy'"); } + public static string GetStringValue(this TextStructureFindStructureFormat enumValue) + { + switch (enumValue) + { + case TextStructureFindStructureFormat.Ndjson: + return "ndjson"; + case TextStructureFindStructureFormat.Xml: + return "xml"; + case TextStructureFindStructureFormat.Delimited: + return "delimited"; + case TextStructureFindStructureFormat.SemiStructuredText: + return "semi_structured_text"; + } + + throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'TextStructureFindStructureFormat'"); + } + public static string GetStringValue(this Enum e) { var type = e.GetType(); diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Eql.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Eql.cs index 7fbea2fb508..62fccbd2c10 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Eql.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Eql.cs @@ -51,6 +51,13 @@ public TimeSpan WaitForCompletionTimeout } } + ///Request options for GetStatus https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + public class GetStatusRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + ///Request options for Search https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html public class SearchRequestParameters : RequestParameters { diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Indices.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Indices.cs index d1355f1b9a0..eac6fff11ab 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Indices.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Indices.cs @@ -216,7 +216,10 @@ public TimeSpan Timeout set => Q("timeout", value); } - ///Sets the number of active shards to wait for before the operation returns. + /// + /// Sets the number of active shards to wait for before the operation returns. Set to `index-setting` to wait according to the index setting + /// `index.write.wait_for_active_shards`, or `all` to wait for all shards, or an integer. Defaults to `0`. + /// public string WaitForActiveShards { get => Q("wait_for_active_shards"); diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Logstash.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Logstash.cs new file mode 100644 index 00000000000..c11656ac8bb --- /dev/null +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Logstash.cs @@ -0,0 +1,47 @@ +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ----------------------------------------------- +// +// This file is automatically generated +// Please do not edit these files manually +// Run the following in the root of the repos: +// +// *NIX : ./build.sh codegen +// Windows : build.bat codegen +// +// ----------------------------------------------- +// ReSharper disable RedundantUsingDirective +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Linq.Expressions; + +// ReSharper disable once CheckNamespace +namespace Elasticsearch.Net.Specification.LogstashApi +{ + ///Request options for DeletePipeline https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html + public class DeletePipelineRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + } + + ///Request options for GetPipeline https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html + public class GetPipelineRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + ///Request options for PutPipeline https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html + public class PutPipelineRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => true; + } +} \ No newline at end of file diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs index cd2d921e8e2..b0984831e8d 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs @@ -215,110 +215,6 @@ public class ExplainDataFrameAnalyticsRequestParameters : RequestParameters true; } - ///Request options for FindFileStructure https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html - public class FindFileStructureRequestParameters : RequestParameters - { - public override HttpMethod DefaultHttpMethod => HttpMethod.POST; - public override bool SupportsBody => true; - ///Optional parameter to specify the character set of the file - public string Charset - { - get => Q("charset"); - set => Q("charset", value); - } - - ///Optional parameter containing a comma separated list of the column names for a delimited file - public string[] ColumnNames - { - get => Q("column_names"); - set => Q("column_names", value); - } - - ///Optional parameter to specify the delimiter character for a delimited file - must be a single character - public string Delimiter - { - get => Q("delimiter"); - set => Q("delimiter", value); - } - - ///Whether to include a commentary on how the structure was derived - public bool? Explain - { - get => Q("explain"); - set => Q("explain", value); - } - - ///Optional parameter to specify the high level file format - public MachineLearningFindFileStructureFormat? MachineLearningFindFileStructureFormat - { - get => Q("format"); - set => Q("format", value); - } - - ///Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file - public string GrokPattern - { - get => Q("grok_pattern"); - set => Q("grok_pattern", value); - } - - ///Optional parameter to specify whether a delimited file includes the column names in its first row - public bool? HasHeaderRow - { - get => Q("has_header_row"); - set => Q("has_header_row", value); - } - - ///Maximum number of characters permitted in a single message when lines are merged to create messages. - public int? LineMergeSizeLimit - { - get => Q("line_merge_size_limit"); - set => Q("line_merge_size_limit", value); - } - - ///How many lines of the file should be included in the analysis - public int? LinesToSample - { - get => Q("lines_to_sample"); - set => Q("lines_to_sample", value); - } - - ///Optional parameter to specify the quote character for a delimited file - must be a single character - public string Quote - { - get => Q("quote"); - set => Q("quote", value); - } - - ///Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them - public bool? ShouldTrimFields - { - get => Q("should_trim_fields"); - set => Q("should_trim_fields", value); - } - - ///Timeout after which the analysis will be aborted - public TimeSpan Timeout - { - get => Q("timeout"); - set => Q("timeout", value); - } - - ///Optional parameter to specify the timestamp field in the file - public string TimestampField - { - get => Q("timestamp_field"); - set => Q("timestamp_field", value); - } - - ///Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format - public string TimestampFormat - { - get => Q("timestamp_format"); - set => Q("timestamp_format", value); - } - } - ///Request options for FlushJob https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html public class FlushJobRequestParameters : RequestParameters { diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs index 81b5cc7d085..e1975c57be7 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs @@ -1761,6 +1761,13 @@ public long? MaxConcurrentShardRequests set => Q("max_concurrent_shard_requests", value); } + ///The minimum compatible version that all shards involved in search should have for this request to be successful + public string MinCompatibleShardNode + { + get => Q("min_compatible_shard_node"); + set => Q("min_compatible_shard_node", value); + } + /// /// A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search /// request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.SearchableSnapshots.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.SearchableSnapshots.cs index 412062db1c4..84c5f010ec1 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.SearchableSnapshots.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.SearchableSnapshots.cs @@ -73,6 +73,13 @@ public TimeSpan MasterTimeout set => Q("master_timeout", value); } + ///Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy` + public string Storage + { + get => Q("storage"); + set => Q("storage", value); + } + ///Should this request wait until the operation has completed before returning public bool? WaitForCompletion { @@ -93,5 +100,11 @@ public class StatsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; + ///Return stats aggregated at cluster, index or shard level + public Level? Level + { + get => Q("level"); + set => Q("level", value); + } } } \ No newline at end of file diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Snapshot.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Snapshot.cs index 2aa6166e53f..9d41fb36822 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Snapshot.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Snapshot.cs @@ -164,6 +164,19 @@ public bool? Verbose } } + ///Request options for GetFeatures https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + public class GetFeaturesRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + ///Explicit operation timeout for connection to master node + public TimeSpan MasterTimeout + { + get => Q("master_timeout"); + set => Q("master_timeout", value); + } + } + ///Request options for GetRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public class GetRepositoryRequestParameters : RequestParameters { diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.TextStructure.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.TextStructure.cs new file mode 100644 index 00000000000..7fdf9dedccb --- /dev/null +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.TextStructure.cs @@ -0,0 +1,130 @@ +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ----------------------------------------------- +// +// This file is automatically generated +// Please do not edit these files manually +// Run the following in the root of the repos: +// +// *NIX : ./build.sh codegen +// Windows : build.bat codegen +// +// ----------------------------------------------- +// ReSharper disable RedundantUsingDirective +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Linq.Expressions; + +// ReSharper disable once CheckNamespace +namespace Elasticsearch.Net.Specification.TextStructureApi +{ + ///Request options for FindStructure https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html + public class FindStructureRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => true; + ///Optional parameter to specify the character set of the file + public string Charset + { + get => Q("charset"); + set => Q("charset", value); + } + + ///Optional parameter containing a comma separated list of the column names for a delimited file + public string[] ColumnNames + { + get => Q("column_names"); + set => Q("column_names", value); + } + + ///Optional parameter to specify the delimiter character for a delimited file - must be a single character + public string Delimiter + { + get => Q("delimiter"); + set => Q("delimiter", value); + } + + ///Whether to include a commentary on how the structure was derived + public bool? Explain + { + get => Q("explain"); + set => Q("explain", value); + } + + ///Optional parameter to specify the high level file format + public TextStructureFindStructureFormat? TextStructureFindStructureFormat + { + get => Q("format"); + set => Q("format", value); + } + + ///Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file + public string GrokPattern + { + get => Q("grok_pattern"); + set => Q("grok_pattern", value); + } + + ///Optional parameter to specify whether a delimited file includes the column names in its first row + public bool? HasHeaderRow + { + get => Q("has_header_row"); + set => Q("has_header_row", value); + } + + ///Maximum number of characters permitted in a single message when lines are merged to create messages. + public int? LineMergeSizeLimit + { + get => Q("line_merge_size_limit"); + set => Q("line_merge_size_limit", value); + } + + ///How many lines of the file should be included in the analysis + public int? LinesToSample + { + get => Q("lines_to_sample"); + set => Q("lines_to_sample", value); + } + + ///Optional parameter to specify the quote character for a delimited file - must be a single character + public string Quote + { + get => Q("quote"); + set => Q("quote", value); + } + + ///Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them + public bool? ShouldTrimFields + { + get => Q("should_trim_fields"); + set => Q("should_trim_fields", value); + } + + ///Timeout after which the analysis will be aborted + public TimeSpan Timeout + { + get => Q("timeout"); + set => Q("timeout", value); + } + + ///Optional parameter to specify the timestamp field in the file + public string TimestampField + { + get => Q("timestamp_field"); + set => Q("timestamp_field", value); + } + + ///Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format + public string TimestampFormat + { + get => Q("timestamp_format"); + set => Q("timestamp_format", value); + } + } +} \ No newline at end of file diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Autoscaling.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Autoscaling.cs index acfcc8262d7..ef773f5e1e3 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Autoscaling.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Autoscaling.cs @@ -46,37 +46,31 @@ internal LowLevelAutoscalingNamespace(ElasticLowLevelClient client): base(client ///DELETE on /_autoscaling/policy/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html ///the name of the autoscaling policy ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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 DeletePolicy(string name, DeleteAutoscalingPolicyRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"_autoscaling/policy/{name:name}"), null, RequestParams(requestParameters)); ///DELETE on /_autoscaling/policy/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html ///the name of the autoscaling policy ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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("autoscaling.delete_autoscaling_policy", "name")] public Task DeletePolicyAsync(string name, DeleteAutoscalingPolicyRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_autoscaling/policy/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /_autoscaling/capacity https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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 GetCapacity(GetAutoscalingCapacityRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_autoscaling/capacity", null, RequestParams(requestParameters)); ///GET on /_autoscaling/capacity https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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("autoscaling.get_autoscaling_capacity", "")] public Task GetCapacityAsync(GetAutoscalingCapacityRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_autoscaling/capacity", ctx, null, RequestParams(requestParameters)); ///GET on /_autoscaling/policy/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html ///the name of the autoscaling policy ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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 GetPolicy(string name, GetAutoscalingPolicyRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_autoscaling/policy/{name:name}"), null, RequestParams(requestParameters)); ///GET on /_autoscaling/policy/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html ///the name of the autoscaling policy ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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("autoscaling.get_autoscaling_policy", "name")] public Task GetPolicyAsync(string name, GetAutoscalingPolicyRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_autoscaling/policy/{name:name}"), ctx, null, RequestParams(requestParameters)); @@ -84,14 +78,12 @@ public Task GetPolicyAsync(string name, GetAutoscalingPoli ///the name of the autoscaling policy ///the specification of the autoscaling policy ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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 PutPolicy(string name, PostData body, PutAutoscalingPolicyRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_autoscaling/policy/{name:name}"), body, RequestParams(requestParameters)); ///PUT on /_autoscaling/policy/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html ///the name of the autoscaling policy ///the specification of the autoscaling policy ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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("autoscaling.put_autoscaling_policy", "name, body")] public Task PutPolicyAsync(string name, PostData body, PutAutoscalingPolicyRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_autoscaling/policy/{name:name}"), ctx, body, RequestParams(requestParameters)); diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Eql.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Eql.cs index b5af9a37043..3418418d439 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Eql.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Eql.cs @@ -65,6 +65,17 @@ public TResponse Get(string id, GetRequestParameters requestParameter [MapsApi("eql.get", "id")] public Task GetAsync(string id, GetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_eql/search/{id:id}"), ctx, null, RequestParams(requestParameters)); + ///GET on /_eql/search/status/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + ///The async search ID + ///Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetStatus(string id, GetStatusRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_eql/search/status/{id:id}"), null, RequestParams(requestParameters)); + ///GET on /_eql/search/status/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + ///The async search ID + ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("eql.get_status", "id")] + public Task GetStatusAsync(string id, GetStatusRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_eql/search/status/{id:id}"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_eql/search https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html ///The name of the index to scope the operation ///Eql request body. Use the `query` to limit the query scope. diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Logstash.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Logstash.cs new file mode 100644 index 00000000000..a5bb810f6e5 --- /dev/null +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Logstash.cs @@ -0,0 +1,82 @@ +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ----------------------------------------------- +// +// This file is automatically generated +// Please do not edit these files manually +// Run the following in the root of the repos: +// +// *NIX : ./build.sh codegen +// Windows : build.bat codegen +// +// ----------------------------------------------- +// ReSharper disable RedundantUsingDirective +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; +using static Elasticsearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace Elasticsearch.Net.Specification.LogstashApi +{ + /// + /// Logstash APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelLogstashNamespace : NamespacedClientProxy + { + internal LowLevelLogstashNamespace(ElasticLowLevelClient client): base(client) + { + } + + ///DELETE on /_logstash/pipeline/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html + ///The ID of the Pipeline + ///Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse DeletePipeline(string id, DeletePipelineRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"_logstash/pipeline/{id:id}"), null, RequestParams(requestParameters)); + ///DELETE on /_logstash/pipeline/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html + ///The ID of the Pipeline + ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("logstash.delete_pipeline", "id")] + public Task DeletePipelineAsync(string id, DeletePipelineRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_logstash/pipeline/{id:id}"), ctx, null, RequestParams(requestParameters)); + ///GET on /_logstash/pipeline/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html + ///A comma-separated list of Pipeline IDs + ///Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetPipeline(string id, GetPipelineRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_logstash/pipeline/{id:id}"), null, RequestParams(requestParameters)); + ///GET on /_logstash/pipeline/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html + ///A comma-separated list of Pipeline IDs + ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("logstash.get_pipeline", "id")] + public Task GetPipelineAsync(string id, GetPipelineRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_logstash/pipeline/{id:id}"), ctx, null, RequestParams(requestParameters)); + ///PUT on /_logstash/pipeline/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html + ///The ID of the Pipeline + ///The Pipeline to add or update + ///Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse PutPipeline(string id, PostData body, PutPipelineRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_logstash/pipeline/{id:id}"), body, RequestParams(requestParameters)); + ///PUT on /_logstash/pipeline/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html + ///The ID of the Pipeline + ///The Pipeline to add or update + ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("logstash.put_pipeline", "id, body")] + public Task PutPipelineAsync(string id, PostData body, PutPipelineRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_logstash/pipeline/{id:id}"), ctx, body, RequestParams(requestParameters)); + } +} \ No newline at end of file diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs index a58b50a629f..081fcf85b4a 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs @@ -254,19 +254,6 @@ public TResponse ExplainDataFrameAnalytics(string id, PostData body, [MapsApi("ml.explain_data_frame_analytics", "id, body")] public Task ExplainDataFrameAnalyticsAsync(string id, PostData body, ExplainDataFrameAnalyticsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/data_frame/analytics/{id:id}/_explain"), ctx, body, RequestParams(requestParameters)); - ///POST on /_ml/find_file_structure https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html - ///The contents of the file to be analyzed - ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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 FindFileStructure(PostData body, FindFileStructureRequestParameters requestParameters = null) - where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_ml/find_file_structure", body, RequestParams(requestParameters)); - ///POST on /_ml/find_file_structure https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html - ///The contents of the file to be analyzed - ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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("ml.find_file_structure", "body")] - public Task FindFileStructureAsync(PostData body, FindFileStructureRequestParameters requestParameters = null, CancellationToken ctx = default) - where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_ml/find_file_structure", ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/_flush https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html ///The name of the job to flush ///Flush parameters diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs index c8b8c967fc8..9ea34e0eb2c 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs @@ -36,6 +36,7 @@ using Elasticsearch.Net.Specification.IndicesApi; using Elasticsearch.Net.Specification.IngestApi; using Elasticsearch.Net.Specification.LicenseApi; +using Elasticsearch.Net.Specification.LogstashApi; using Elasticsearch.Net.Specification.MachineLearningApi; using Elasticsearch.Net.Specification.MigrationApi; using Elasticsearch.Net.Specification.NodesApi; @@ -46,6 +47,7 @@ using Elasticsearch.Net.Specification.SnapshotLifecycleManagementApi; using Elasticsearch.Net.Specification.SqlApi; using Elasticsearch.Net.Specification.TasksApi; +using Elasticsearch.Net.Specification.TextStructureApi; using Elasticsearch.Net.Specification.TransformApi; using Elasticsearch.Net.Specification.WatcherApi; using Elasticsearch.Net.Specification.XPackApi; @@ -138,6 +140,12 @@ public LowLevelLicenseNamespace License private set; } + public LowLevelLogstashNamespace Logstash + { + get; + private set; + } + public LowLevelMachineLearningNamespace MachineLearning { get; @@ -198,6 +206,12 @@ public LowLevelTasksNamespace Tasks private set; } + public LowLevelTextStructureNamespace TextStructure + { + get; + private set; + } + public LowLevelTransformNamespace Transform { get; @@ -231,6 +245,7 @@ partial void SetupNamespaces() Indices = new LowLevelIndicesNamespace(this); Ingest = new LowLevelIngestNamespace(this); License = new LowLevelLicenseNamespace(this); + Logstash = new LowLevelLogstashNamespace(this); MachineLearning = new LowLevelMachineLearningNamespace(this); Migration = new LowLevelMigrationNamespace(this); Nodes = new LowLevelNodesNamespace(this); @@ -241,6 +256,7 @@ partial void SetupNamespaces() SnapshotLifecycleManagement = new LowLevelSnapshotLifecycleManagementNamespace(this); Sql = new LowLevelSqlNamespace(this); Tasks = new LowLevelTasksNamespace(this); + TextStructure = new LowLevelTextStructureNamespace(this); Transform = new LowLevelTransformNamespace(this); Watcher = new LowLevelWatcherNamespace(this); XPack = new LowLevelXPackNamespace(this); diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Snapshot.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Snapshot.cs index b139df46920..5a042f6483e 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Snapshot.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Snapshot.cs @@ -138,6 +138,15 @@ public TResponse Get(string repository, string snapshot, GetSnapshotR [MapsApi("snapshot.get", "repository, snapshot")] public Task GetAsync(string repository, string snapshot, GetSnapshotRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}"), ctx, null, RequestParams(requestParameters)); + ///GET on /_snapshottable_features https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse GetFeatures(GetFeaturesRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_snapshottable_features", null, RequestParams(requestParameters)); + ///GET on /_snapshottable_features https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.get_features", "")] + public Task GetFeaturesAsync(GetFeaturesRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_snapshottable_features", ctx, null, RequestParams(requestParameters)); ///GET on /_snapshot https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse GetRepository(GetRepositoryRequestParameters requestParameters = null) diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.TextStructure.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.TextStructure.cs new file mode 100644 index 00000000000..f9b202e92f8 --- /dev/null +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.TextStructure.cs @@ -0,0 +1,60 @@ +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ----------------------------------------------- +// +// This file is automatically generated +// Please do not edit these files manually +// Run the following in the root of the repos: +// +// *NIX : ./build.sh codegen +// Windows : build.bat codegen +// +// ----------------------------------------------- +// ReSharper disable RedundantUsingDirective +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; +using static Elasticsearch.Net.HttpMethod; + +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable once CheckNamespace +// ReSharper disable InterpolatedStringExpressionIsNotIFormattable +// ReSharper disable RedundantExtendsListEntry +namespace Elasticsearch.Net.Specification.TextStructureApi +{ + /// + /// Text Structure APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class LowLevelTextStructureNamespace : NamespacedClientProxy + { + internal LowLevelTextStructureNamespace(ElasticLowLevelClient client): base(client) + { + } + + ///POST on /_text_structure/find_structure https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html + ///The contents of the file to be analyzed + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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 FindStructure(PostData body, FindStructureRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_text_structure/find_structure", body, RequestParams(requestParameters)); + ///POST on /_text_structure/find_structure https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html + ///The contents of the file to be analyzed + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental 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("text_structure.find_structure", "body")] + public Task FindStructureAsync(PostData body, FindStructureRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_text_structure/find_structure", ctx, body, RequestParams(requestParameters)); + } +} \ No newline at end of file diff --git a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs index f9d423c4ed0..9cb9c60b23c 100644 --- a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs +++ b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs @@ -36,6 +36,7 @@ using Elasticsearch.Net.Specification.IndicesApi; using Elasticsearch.Net.Specification.IngestApi; using Elasticsearch.Net.Specification.LicenseApi; +using Elasticsearch.Net.Specification.LogstashApi; using Elasticsearch.Net.Specification.MachineLearningApi; using Elasticsearch.Net.Specification.MigrationApi; using Elasticsearch.Net.Specification.NodesApi; @@ -46,6 +47,7 @@ using Elasticsearch.Net.Specification.SnapshotLifecycleManagementApi; using Elasticsearch.Net.Specification.SqlApi; using Elasticsearch.Net.Specification.TasksApi; +using Elasticsearch.Net.Specification.TextStructureApi; using Elasticsearch.Net.Specification.TransformApi; using Elasticsearch.Net.Specification.WatcherApi; using Elasticsearch.Net.Specification.XPackApi; @@ -135,6 +137,12 @@ LowLevelLicenseNamespace License get; } + ///Logstash APIs + LowLevelLogstashNamespace Logstash + { + get; + } + ///Machine Learning APIs LowLevelMachineLearningNamespace MachineLearning { @@ -1209,6 +1217,12 @@ LowLevelTasksNamespace Tasks get; } + ///Text Structure APIs + LowLevelTextStructureNamespace TextStructure + { + get; + } + ///Transform APIs LowLevelTransformNamespace Transform { diff --git a/tests/Tests.YamlRunner/Models.fs b/tests/Tests.YamlRunner/Models.fs index 7940b3897ac..fb5b1593b75 100644 --- a/tests/Tests.YamlRunner/Models.fs +++ b/tests/Tests.YamlRunner/Models.fs @@ -121,6 +121,7 @@ type Do = { ApiCall: string * YamlMap Catch:DoCatch option Warnings:option + AllowedWarnings:option NodeSelector:NodeSelector option Headers: Headers option AutoFail: bool diff --git a/tests/Tests.YamlRunner/SkipList.fs b/tests/Tests.YamlRunner/SkipList.fs index 3c5f59da051..b128d8a50b8 100644 --- a/tests/Tests.YamlRunner/SkipList.fs +++ b/tests/Tests.YamlRunner/SkipList.fs @@ -183,6 +183,9 @@ let SkipList = dict [ // TODO investigate post 7.11.0 SkipFile "nodes.info/10_basic.yml", Section "node_info role test" + // TODO investigate post 7.11.0 + SkipFile "nodes.info/10_basic.yml", Section "node_info role test" + ] diff --git a/tests/Tests.YamlRunner/TestsReader.fs b/tests/Tests.YamlRunner/TestsReader.fs index 55e37c743bd..0fdc773a379 100644 --- a/tests/Tests.YamlRunner/TestsReader.fs +++ b/tests/Tests.YamlRunner/TestsReader.fs @@ -150,6 +150,8 @@ let private mapDo section (operation:YamlMap) = | None -> None let warnings = tryPickList operation "warnings" id + // TODO: we don't support this feature yet but do parse it out so we don't crash our yaml parser + let allowedWarnings = tryPickList operation "allowed_warnings" id let nodeSelector = mapNodeSelector operation let last = operation.Last() @@ -161,6 +163,7 @@ let private mapDo section (operation:YamlMap) = ApiCall = (lastKey, lastValue) Catch = catch Warnings = warnings + AllowedWarnings = allowedWarnings NodeSelector = nodeSelector Headers = headers AutoFail = match section with | "setup" | "teardown" -> false | _ -> false