From 5b8386162b93e6b144bf15eed600f99b467ac342 Mon Sep 17 00:00:00 2001 From: Mpdreamz Date: Thu, 8 Apr 2021 12:07:41 +0000 Subject: [PATCH] [codegen] 7.11 synchronization --- src/Elasticsearch.Net/Api/Enums.Generated.cs | 31 ------ .../RequestParameters.MachineLearning.cs | 104 ------------------ .../ElasticLowLevelClient.MachineLearning.cs | 13 --- 3 files changed, 148 deletions(-) diff --git a/src/Elasticsearch.Net/Api/Enums.Generated.cs b/src/Elasticsearch.Net/Api/Enums.Generated.cs index e94851cd175..6642ac9bf71 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 { @@ -474,7 +461,6 @@ 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)); } @@ -947,23 +933,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) 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/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