diff --git a/src/CodeGeneration/CodeGeneration.LowLevelClient/Program.cs b/src/CodeGeneration/CodeGeneration.LowLevelClient/Program.cs index 4e0d9f49bc8..dc7bfbdf471 100644 --- a/src/CodeGeneration/CodeGeneration.LowLevelClient/Program.cs +++ b/src/CodeGeneration/CodeGeneration.LowLevelClient/Program.cs @@ -28,7 +28,7 @@ static void Main(string[] args) if (redownloadCoreSpecification) RestSpecDownloader.Download(downloadBranch); - ApiGenerator.Generate("Core", "DeleteByQuery"); + ApiGenerator.Generate("Core", "DeleteByQuery", "Graph"); //ApiGenerator.Generate("Core", "Graph", "License"); //ApiGenerator.Generate(); //generates everything under ApiSpecification } diff --git a/src/CodeGeneration/CodeGeneration.LowLevelClient/RestSpecification/XPack/Graph/graph.explore.json b/src/CodeGeneration/CodeGeneration.LowLevelClient/RestSpecification/XPack/Graph/graph.explore.json index 02ea75fcadd..940472639ae 100644 --- a/src/CodeGeneration/CodeGeneration.LowLevelClient/RestSpecification/XPack/Graph/graph.explore.json +++ b/src/CodeGeneration/CodeGeneration.LowLevelClient/RestSpecification/XPack/Graph/graph.explore.json @@ -7,8 +7,9 @@ "paths": ["/{index}/_graph/explore", "/{index}/{type}/_graph/explore"], "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" + "required" : true, + "type": "list", + "description": "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices" }, "type": { "type" : "list", diff --git a/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs b/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs index 035f2cec237..c69632e152b 100644 --- a/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs +++ b/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs @@ -4515,4 +4515,30 @@ public class DeleteByQueryRequestParameters : FluentRequestParameters this.AddQueryString("filter_path", filter_path); } + + ///Request parameters descriptor for GraphExplore + ///
+	///https://www.elastic.co/guide/en/graph/current/explore.html
+	///
+ ///
+ public class GraphExploreRequestParameters : FluentRequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + + ///Specific routing value + public GraphExploreRequestParameters Routing(string routing) => this.AddQueryString("routing", routing); + + + ///Explicit operation timeout + public GraphExploreRequestParameters Timeout(TimeSpan timeout) => this.AddQueryString("timeout", timeout.ToTimeUnit()); + + + ///The URL-encoded request definition + public GraphExploreRequestParameters Source(string source) => this.AddQueryString("source", source); + + + ///Comma separated list of filters used to reduce the response returned by Elasticsearch + public GraphExploreRequestParameters FilterPath(string filter_path) => this.AddQueryString("filter_path", filter_path); + + } } \ No newline at end of file diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs index be2c5c5f578..e366c53bac4 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs @@ -8285,6 +8285,126 @@ public ElasticsearchResponse DeleteByQuery(string index, string type, Post public Task> DeleteByQueryAsync(string index, string type, PostData body, Func requestParameters = null) where T : class => this.DoRequestAsync(DELETE, Url($"{index.NotNull("index")}/{type.NotNull("type")}/_query"), body, _params(requestParameters)); + ///Represents a GET on /{index}/_graph/explore + ///Returns: ElasticsearchResponse<T> where the behavior depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public ElasticsearchResponse GraphExploreGet(string index, Func requestParameters = null) + where T : class => this.DoRequest(GET, Url($"{index.NotNull("index")}/_graph/explore"), null, _params(requestParameters)); + + ///Represents a GET on /{index}/_graph/explore + ///Returns: A task of ElasticsearchResponse<T> where the behaviour depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task> GraphExploreGetAsync(string index, Func requestParameters = null) + where T : class => this.DoRequestAsync(GET, Url($"{index.NotNull("index")}/_graph/explore"), null, _params(requestParameters)); + + ///Represents a GET on /{index}/{type}/_graph/explore + ///Returns: ElasticsearchResponse<T> where the behavior depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A comma-separated list of document types to search; leave empty to perform the operation on all types + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public ElasticsearchResponse GraphExploreGet(string index, string type, Func requestParameters = null) + where T : class => this.DoRequest(GET, Url($"{index.NotNull("index")}/{type.NotNull("type")}/_graph/explore"), null, _params(requestParameters)); + + ///Represents a GET on /{index}/{type}/_graph/explore + ///Returns: A task of ElasticsearchResponse<T> where the behaviour depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A comma-separated list of document types to search; leave empty to perform the operation on all types + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task> GraphExploreGetAsync(string index, string type, Func requestParameters = null) + where T : class => this.DoRequestAsync(GET, Url($"{index.NotNull("index")}/{type.NotNull("type")}/_graph/explore"), null, _params(requestParameters)); + + ///Represents a POST on /{index}/_graph/explore + ///Returns: ElasticsearchResponse<T> where the behavior depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///Graph Query DSL + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public ElasticsearchResponse GraphExplore(string index, PostData body, Func requestParameters = null) + where T : class => this.DoRequest(POST, Url($"{index.NotNull("index")}/_graph/explore"), body, _params(requestParameters)); + + ///Represents a POST on /{index}/_graph/explore + ///Returns: A task of ElasticsearchResponse<T> where the behaviour depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///Graph Query DSL + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task> GraphExploreAsync(string index, PostData body, Func requestParameters = null) + where T : class => this.DoRequestAsync(POST, Url($"{index.NotNull("index")}/_graph/explore"), body, _params(requestParameters)); + + ///Represents a POST on /{index}/{type}/_graph/explore + ///Returns: ElasticsearchResponse<T> where the behavior depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A comma-separated list of document types to search; leave empty to perform the operation on all types + ///Graph Query DSL + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public ElasticsearchResponse GraphExplore(string index, string type, PostData body, Func requestParameters = null) + where T : class => this.DoRequest(POST, Url($"{index.NotNull("index")}/{type.NotNull("type")}/_graph/explore"), body, _params(requestParameters)); + + ///Represents a POST on /{index}/{type}/_graph/explore + ///Returns: A task of ElasticsearchResponse<T> where the behaviour depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A comma-separated list of document types to search; leave empty to perform the operation on all types + ///Graph Query DSL + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task> GraphExploreAsync(string index, string type, PostData body, Func requestParameters = null) + where T : class => this.DoRequestAsync(POST, Url($"{index.NotNull("index")}/{type.NotNull("type")}/_graph/explore"), body, _params(requestParameters)); + } } diff --git a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs index 10275be8e2b..eff68fe4c79 100644 --- a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs +++ b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs @@ -7716,5 +7716,117 @@ public partial interface IElasticLowLevelClient ///A func that allows you to describe the querystring parameters & request specific connection settings. Task> DeleteByQueryAsync(string index, string type, PostData body, Func requestParameters = null) where T : class; + ///Represents a GET on /{index}/_graph/explore + ///Returns: ElasticsearchResponse<T> where the behavior depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A func that allows you to describe the querystring parameters & request specific connection settings. + ElasticsearchResponse GraphExploreGet(string index, Func requestParameters = null) where T : class; + + ///Represents a GET on /{index}/_graph/explore + ///Returns: A task of ElasticsearchResponse<T> where the behaviour depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task> GraphExploreGetAsync(string index, Func requestParameters = null) where T : class; + + ///Represents a GET on /{index}/{type}/_graph/explore + ///Returns: ElasticsearchResponse<T> where the behavior depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A comma-separated list of document types to search; leave empty to perform the operation on all types + ///A func that allows you to describe the querystring parameters & request specific connection settings. + ElasticsearchResponse GraphExploreGet(string index, string type, Func requestParameters = null) where T : class; + + ///Represents a GET on /{index}/{type}/_graph/explore + ///Returns: A task of ElasticsearchResponse<T> where the behaviour depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A comma-separated list of document types to search; leave empty to perform the operation on all types + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task> GraphExploreGetAsync(string index, string type, Func requestParameters = null) where T : class; + + ///Represents a POST on /{index}/_graph/explore + ///Returns: ElasticsearchResponse<T> where the behavior depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///Graph Query DSL + ///A func that allows you to describe the querystring parameters & request specific connection settings. + ElasticsearchResponse GraphExplore(string index, PostData body, Func requestParameters = null) where T : class; + + ///Represents a POST on /{index}/_graph/explore + ///Returns: A task of ElasticsearchResponse<T> where the behaviour depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///Graph Query DSL + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task> GraphExploreAsync(string index, PostData body, Func requestParameters = null) where T : class; + + ///Represents a POST on /{index}/{type}/_graph/explore + ///Returns: ElasticsearchResponse<T> where the behavior depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A comma-separated list of document types to search; leave empty to perform the operation on all types + ///Graph Query DSL + ///A func that allows you to describe the querystring parameters & request specific connection settings. + ElasticsearchResponse GraphExplore(string index, string type, PostData body, Func requestParameters = null) where T : class; + + ///Represents a POST on /{index}/{type}/_graph/explore + ///Returns: A task of ElasticsearchResponse<T> where the behaviour depends on the type of T: + /// - T, an object you own that the elasticsearch response will be deserialized to + /// - byte[], no deserialization, but the response stream will be closed + /// - Stream, no deserialization, response stream is your responsibility + /// - VoidResponse, no deserialization, response stream never read and closed + /// - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth + ///See also: https://www.elastic.co/guide/en/graph/current/explore.html + /// + ///A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + ///A comma-separated list of document types to search; leave empty to perform the operation on all types + ///Graph Query DSL + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task> GraphExploreAsync(string index, string type, PostData body, Func requestParameters = null) where T : class; + } } \ No newline at end of file diff --git a/src/Nest/Nest.csproj b/src/Nest/Nest.csproj index 5368b0aa5fc..b28822c7b80 100644 --- a/src/Nest/Nest.csproj +++ b/src/Nest/Nest.csproj @@ -1185,6 +1185,16 @@ + + + + + + + + + + @@ -1216,6 +1226,7 @@ +