Skip to content

[codegen] 7.12 synchronization #5517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions src/ApiGenerator/RestSpecification/XPack/ml.find_file_structure.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"ml.find_file_structure":{
"documentation":{
"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",
"visibility":"public",
"headers":{
"accept": [ "application/json"],
"content_type": ["application/x-ndjson"]
},
"url":{
"paths":[
{
"path":"/_ml/find_file_structure",
"methods":[
"POST"
],
"deprecated":{
"version":"7.12.0",
"description":"This endpoint has changed to _text_structure/find_structure, please use that API instead"
}
}
]
},
"params":{
"lines_to_sample":{
"type":"int",
"description":"How many lines of the file should be included in the analysis",
"default":1000
},
"line_merge_size_limit":{
"type":"int",
"description":"Maximum number of characters permitted in a single message when lines are merged to create messages.",
"default":10000
},
"timeout":{
"type":"time",
"description":"Timeout after which the analysis will be aborted",
"default":"25s"
},
"charset":{
"type":"string",
"description":"Optional parameter to specify the character set of the file"
},
"format":{
"type":"enum",
"options":[
"ndjson",
"xml",
"delimited",
"semi_structured_text"
],
"description":"Optional parameter to specify the high level file format"
},
"has_header_row":{
"type":"boolean",
"description":"Optional parameter to specify whether a delimited file includes the column names in its first row"
},
"column_names":{
"type":"list",
"description":"Optional parameter containing a comma separated list of the column names for a delimited file"
},
"delimiter":{
"type":"string",
"description":"Optional parameter to specify the delimiter character for a delimited file - must be a single character"
},
"quote":{
"type":"string",
"description":"Optional parameter to specify the quote character for a delimited file - must be a single character"
},
"should_trim_fields":{
"type":"boolean",
"description":"Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them"
},
"grok_pattern":{
"type":"string",
"description":"Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file"
},
"timestamp_field":{
"type":"string",
"description":"Optional parameter to specify the timestamp field in the file"
},
"timestamp_format":{
"type":"string",
"description":"Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format"
},
"explain":{
"type":"boolean",
"description":"Whether to include a commentary on how the structure was derived",
"default":false
}
},
"body":{
"description":"The contents of the file to be analyzed",
"required":true,
"serialize":"bulk"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"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",
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"],
Expand Down
2 changes: 0 additions & 2 deletions src/Elasticsearch.Net/ElasticLowLevelClient.TextStructure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ internal LowLevelTextStructureNamespace(ElasticLowLevelClient client): base(clie
///<summary>POST on /_text_structure/find_structure <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html</para></summary>
///<param name = "body">The contents of the file to be analyzed</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
///<remarks>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.</remarks>
public TResponse FindStructure<TResponse>(PostData body, FindStructureRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(POST, "_text_structure/find_structure", body, RequestParams(requestParameters));
///<summary>POST on /_text_structure/find_structure <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html</para></summary>
///<param name = "body">The contents of the file to be analyzed</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
///<remarks>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.</remarks>
[MapsApi("text_structure.find_structure", "body")]
public Task<TResponse> FindStructureAsync<TResponse>(PostData body, FindStructureRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(POST, "_text_structure/find_structure", ctx, body, RequestParams(requestParameters));
Expand Down